aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/core/SkColorSpace.h8
-rw-r--r--src/core/SkColorSpace.cpp4
2 files changed, 12 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.
*/
diff --git a/src/core/SkColorSpace.cpp b/src/core/SkColorSpace.cpp
index 399a1617cc..c9dbf67851 100644
--- a/src/core/SkColorSpace.cpp
+++ b/src/core/SkColorSpace.cpp
@@ -285,6 +285,10 @@ bool SkColorSpace::gammaIsLinear() const {
return as_CSB(this)->onGammaIsLinear();
}
+bool SkColorSpace::isNumericalTransferFn(SkColorSpaceTransferFn* fn) const {
+ return as_CSB(this)->onIsNumericalTransferFn(fn);
+}
+
bool SkColorSpace::toXYZD50(SkMatrix44* toXYZD50) const {
const SkMatrix44* matrix = as_CSB(this)->toXYZD50();
if (matrix) {