aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2018-05-10 14:29:21 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-10 19:14:26 +0000
commit1d686a962c775a69b54f165a23c20c57e506023b (patch)
tree5e2d5912adf6a4fda85a662478a781dd4ff7d8d8 /include
parent52aacd602f792a01218ca903759f6b9d4ec28450 (diff)
Add SkColorSpace::toProfile
Now that A2B parsing is at least as strict as skcms_Parse, this can never fail, so switch to void. Also use the new programmatic profile helpers, which also ensures the data and profile space fields are set correctly. Bug: skia: Change-Id: Ifc4d89a919ca178c484839bdf88dae8a162c3e4f Reviewed-on: https://skia-review.googlesource.com/127336 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/core/SkColorSpace.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/include/core/SkColorSpace.h b/include/core/SkColorSpace.h
index 801ccf2098..97fb9a0357 100644
--- a/include/core/SkColorSpace.h
+++ b/include/core/SkColorSpace.h
@@ -139,6 +139,11 @@ public:
}
/**
+ * Convert this color space to an skcms ICC profile struct.
+ */
+ void toProfile(skcms_ICCProfile*) const;
+
+ /**
* Types of colorspaces.
*/
enum Type {
@@ -253,12 +258,6 @@ public:
*/
static bool Equals(const SkColorSpace* src, const SkColorSpace* dst);
- /**
- * If this color space was constructed from an ICC profile, return that profile data.
- * Otherise, return nullptr.
- */
- const SkData* profileData() const { return this->onProfileData(); }
-
virtual bool nonlinearBlending() const { return false; }
virtual sk_sp<SkColorSpace> makeNonlinearBlending() const { return nullptr; }