Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Unified Diff: include/core/SkColorSpace.h

Issue 2085653003: Enable flattening and unflattening of SkColorSpace (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix unit tests Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | include/core/SkMatrix44.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | include/core/SkMatrix44.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698