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: Save 12 floats instead of 16 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') | include/core/SkMatrix44.h » ('J')
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..5cdb1468fa0b05f67d38c690acccc6745dd875ef 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,15 @@ public:
return kSRGB_GammaNamed == fGammaNamed || k2Dot2Curve_GammaNamed == fGammaNamed;
}
-protected:
+ /**
+ * Caller takes ownership of SkData.
+ */
+ sk_sp<SkData> serialize() const;
- SkColorSpace(GammaNamed gammaNamed, const SkMatrix44& toXYZD50, Named named);
+ static sk_sp<SkColorSpace> Deserialize(const void* data, size_t length);
- 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') | include/core/SkMatrix44.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698