aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Matt Sarett <msarett@google.com>2017-02-28 14:24:31 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-28 20:00:07 +0000
commit6722553135613010b4dd6eac1b6f572cfa8aabe8 (patch)
treed5ee7432ce190ad5d2adb70b4f5b6dddec37ac99 /include
parent61cd31a5d3cacb13ff3bbc3ada7e25fa98c6810c (diff)
Add SkColorSpace::isNumericalTransferFn() to the public API
This adds a little more flexibility for clients wanting to handle color space transformation outside of the codecs. Ex: they can leave the encoded data as is and apply the numerical transfer fn in a later step. BUG=skia: Change-Id: Ieca53b01648d4cb9cf0995715deacd4c4876900f Reviewed-on: https://skia-review.googlesource.com/9077 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/core/SkColorSpace.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/core/SkColorSpace.h b/include/core/SkColorSpace.h
index 87ef0ceb0b..978660b135 100644
--- a/include/core/SkColorSpace.h
+++ b/include/core/SkColorSpace.h
@@ -115,6 +115,14 @@ public:
bool gammaIsLinear() const;
/**
+ * If the transfer function can be represented as coefficients to the standard
+ * equation, returns true and sets |fn| to the proper values.
+ *
+ * If not, returns false.
+ */
+ bool isNumericalTransferFn(SkColorSpaceTransferFn* fn) const;
+
+ /**
* Returns true and sets |toXYZD50| if the color gamut can be described as a matrix.
* Returns false otherwise.
*/