Index: include/core/SkColorSpace.h |
diff --git a/include/core/SkColorSpace.h b/include/core/SkColorSpace.h |
index 4b55c47feac0045970ebd77d7390c75c47213766..57f74e985d9a732b0d6416046cb13ed1b003249f 100644 |
--- a/include/core/SkColorSpace.h |
+++ b/include/core/SkColorSpace.h |
@@ -11,6 +11,8 @@ |
#include "SkMatrix44.h" |
#include "SkRefCnt.h" |
+class SkData; |
+ |
class SK_API SkColorSpace : public SkRefCnt { |
public: |
@@ -75,11 +77,17 @@ public: |
return kSRGB_GammaNamed == fGammaNamed || k2Dot2Curve_GammaNamed == fGammaNamed; |
} |
+ /** |
+ * Returns nullptr on failure. Fails when we fallback to serializing ICC data and |
+ * the data is too large to serialize. |
+ */ |
+ sk_sp<SkData> serialize() const; |
+ |
+ static sk_sp<SkColorSpace> Deserialize(const void* data, size_t length); |
+ |
protected: |
SkColorSpace(GammaNamed gammaNamed, const SkMatrix44& toXYZD50, Named named); |
- friend Named sk_deduce_named_from_colorspace(SkColorSpace*); |
- |
const GammaNamed fGammaNamed; |
const SkMatrix44 fToXYZD50; |
const Named fNamed; |