aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
authorGravatar Matt Sarett <msarett@google.com>2017-03-02 12:42:35 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-04 20:24:02 +0000
commit5b4599f137ce0966a88d2ba2bdbb6aa72b1ae082 (patch)
treec73cd53d90b9b55a47d71ac8158b2623252e4b8f /include/core
parent025e2444c1f5a0c3cdc0bf60d1fa59941a0b5db4 (diff)
Add SkImage::colorSpace() and SkImage::refColorSpace()
BUG=skia: Change-Id: I31c2a2731cd70e4e5162905de0ad129516dacc6b Reviewed-on: https://skia-review.googlesource.com/9152 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Reed <reed@google.com>
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkImage.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/core/SkImage.h b/include/core/SkImage.h
index 93d8564192..7235580481 100644
--- a/include/core/SkImage.h
+++ b/include/core/SkImage.h
@@ -181,6 +181,16 @@ public:
SkAlphaType alphaType() const;
/**
+ * Returns the color space of the SkImage.
+ *
+ * This is the color space that was supplied on creation of the SkImage or a color
+ * space that was parsed from encoded data. This color space is not guaranteed to be
+ * renderable. Can return nullptr if the SkImage was created without a color space.
+ */
+ SkColorSpace* colorSpace() const;
+ sk_sp<SkColorSpace> refColorSpace() const;
+
+ /**
* Returns true fi the image will be drawn as a mask, with no intrinsic color of its own.
*/
bool isAlphaOnly() const;