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

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: 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/SkFlattenable.h » ('j') | src/core/SkColorSpace.cpp » ('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..2bc9a332518a972b6e5724649bb18320161e8912 100644
--- a/include/core/SkColorSpace.h
+++ b/include/core/SkColorSpace.h
@@ -9,9 +9,9 @@
#define SkColorSpace_DEFINED
#include "SkMatrix44.h"
-#include "SkRefCnt.h"
+#include "SkFlattenable.h"
-class SK_API SkColorSpace : public SkRefCnt {
+class SK_API SkColorSpace : public SkFlattenable {
msarett 2016/06/20 22:41:59 We can flatten/unflatten without making SkColorSpa
public:
/**
@@ -75,11 +75,14 @@ public:
return kSRGB_GammaNamed == fGammaNamed || k2Dot2Curve_GammaNamed == fGammaNamed;
}
-protected:
+ SK_DEFINE_FLATTENABLE_TYPE(SkColorSpace)
+ static sk_sp<SkFlattenable> CreateProc(SkReadBuffer&);
+protected:
SkColorSpace(GammaNamed gammaNamed, const SkMatrix44& toXYZD50, Named named);
- friend Named sk_deduce_named_from_colorspace(SkColorSpace*);
+ void flatten(SkWriteBuffer&) const override;
+ Factory getFactory() const override { return CreateProc; }
const GammaNamed fGammaNamed;
const SkMatrix44 fToXYZD50;
« no previous file with comments | « no previous file | include/core/SkFlattenable.h » ('j') | src/core/SkColorSpace.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698