aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-03-14 11:27:13 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-14 15:57:03 +0000
commit73e627074839bc00569117235eb4e7d4fc3cc39f (patch)
tree344fcfeba2fc78066f59347adce4c0d55bc19c06 /include
parentdce25909ac0e84ee73640fd49dd3b82f66dd4ce1 (diff)
Expose SkColorSpaceTransferFn inversion function
Also adds tolerance to checks against zero BUG=skia: Change-Id: I2ad5737c6eef7e3ed52a685dceb347a434607336 Reviewed-on: https://skia-review.googlesource.com/9643 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/core/SkColorSpace.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/core/SkColorSpace.h b/include/core/SkColorSpace.h
index c945703549..ebc0ca1d91 100644
--- a/include/core/SkColorSpace.h
+++ b/include/core/SkColorSpace.h
@@ -48,6 +48,12 @@ struct SK_API SkColorSpaceTransferFn {
float fD;
float fE;
float fF;
+
+ /**
+ * Produces a new parametric transfer function equation that is the mathematical inverse of
+ * this one.
+ */
+ SkColorSpaceTransferFn invert() const;
};
class SK_API SkColorSpace : public SkRefCnt {