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

Unified Diff: include/core/SkFlattenable.h

Issue 769953002: Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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 | « include/core/SkDrawLooper.h ('k') | include/core/SkMaskFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkFlattenable.h
diff --git a/include/core/SkFlattenable.h b/include/core/SkFlattenable.h
index 679f640d3c4012a7868486f9a02bdef4b3325d5f..3cfa85af48787e1636062d8bc44899ac087a89f1 100644
--- a/include/core/SkFlattenable.h
+++ b/include/core/SkFlattenable.h
@@ -13,8 +13,6 @@
class SkReadBuffer;
class SkWriteBuffer;
-#define SK_SUPPORT_LEGACY_DEEPFLATTENING
-
/*
* Flattening is straight-forward:
* 1. call getFactory() so we have a function-ptr to recreate the subclass
@@ -45,24 +43,6 @@ class SkWriteBuffer;
#define SK_DECLARE_UNFLATTENABLE_OBJECT() \
virtual Factory getFactory() const SK_OVERRIDE { return NULL; }
-#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
-#define SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(flattenable) \
- SkFlattenable::Registrar(#flattenable, flattenable::DeepCreateProc, \
- flattenable::GetFlattenableType());
-
-#define SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(flattenable) \
- private: \
- static SkFlattenable* CreateProc(SkReadBuffer&); \
- static SkFlattenable* DeepCreateProc(SkReadBuffer& buffer) { \
- if (NeedsDeepUnflatten(buffer)) { \
- return SkNEW_ARGS(flattenable, (buffer)); \
- } \
- return CreateProc(buffer); \
- } \
- friend class SkPrivateEffectInitializer; \
- public: \
- virtual Factory getFactory() const SK_OVERRIDE {return DeepCreateProc;}
-#else
#define SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(flattenable) \
SkFlattenable::Registrar(#flattenable, flattenable::CreateProc, \
flattenable::GetFlattenableType());
@@ -73,7 +53,6 @@ class SkWriteBuffer;
friend class SkPrivateEffectInitializer; \
public: \
virtual Factory getFactory() const SK_OVERRIDE { return CreateProc; }
-#endif
// If your subclass will *never* need to be unflattened, declare this.
#define SK_DECLARE_NOT_FLATTENABLE_PROCS(flattenable) \
@@ -144,11 +123,6 @@ public:
virtual void flatten(SkWriteBuffer&) const {}
protected:
-#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
- static bool NeedsDeepUnflatten(const SkReadBuffer&);
- SkFlattenable(SkReadBuffer&) {}
-#endif
-
static SkFlattenable* ReturnNullCreateProc(SkReadBuffer&) {
return NULL;
}
« no previous file with comments | « include/core/SkDrawLooper.h ('k') | include/core/SkMaskFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698