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

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: Return null on error 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 ea3e6726b2079fe7d582c7368cc2e2df69bb43f2..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,16 @@ public:
return kSRGB_GammaNamed == fGammaNamed || k2Dot2Curve_GammaNamed == fGammaNamed;
}
-protected:
+ /**
+ * Returns nullptr on failure. Fails when we fallback to serializing ICC data and
msarett 2016/06/21 21:48:54 Also meant to mention that I changed these comment
+ * the data is too large to serialize.
+ */
+ sk_sp<SkData> serialize() const;
- SkColorSpace(GammaNamed gammaNamed, const SkMatrix44& toXYZD50, Named named);
+ static sk_sp<SkColorSpace> Deserialize(const void* data, size_t length);
kjlubick 2016/06/22 12:30:58 That's a perfect method signature to fuzz. I'll b
- friend Named sk_deduce_named_from_colorspace(SkColorSpace*);
+protected:
+ SkColorSpace(GammaNamed gammaNamed, const SkMatrix44& toXYZD50, Named named);
const GammaNamed fGammaNamed;
const SkMatrix44 fToXYZD50;
« 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