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

Unified Diff: include/core/SkFlattenable.h

Issue 841753002: Remove macros that make it look like it's a good idea to not be able to flatten. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: DummyRasterizer too Created 5 years, 11 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/effects/Sk2DPathEffect.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 3cfa85af48787e1636062d8bc44899ac087a89f1..e45627dbcc4210e42217e567d63d6cf6c3f072f9 100644
--- a/include/core/SkFlattenable.h
+++ b/include/core/SkFlattenable.h
@@ -40,9 +40,6 @@ class SkWriteBuffer;
#define SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END \
}
-#define SK_DECLARE_UNFLATTENABLE_OBJECT() \
- virtual Factory getFactory() const SK_OVERRIDE { return NULL; }
-
#define SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(flattenable) \
SkFlattenable::Registrar(#flattenable, flattenable::CreateProc, \
flattenable::GetFlattenableType());
@@ -54,10 +51,6 @@ class SkWriteBuffer;
public: \
virtual Factory getFactory() const SK_OVERRIDE { return CreateProc; }
-// If your subclass will *never* need to be unflattened, declare this.
-#define SK_DECLARE_NOT_FLATTENABLE_PROCS(flattenable) \
- virtual Factory getFactory() const SK_OVERRIDE { return ReturnNullCreateProc; }
-
/** For SkFlattenable derived objects with a valid type
This macro should only be used in base class objects in core
*/
@@ -122,11 +115,6 @@ public:
*/
virtual void flatten(SkWriteBuffer&) const {}
-protected:
- static SkFlattenable* ReturnNullCreateProc(SkReadBuffer&) {
- return NULL;
- }
-
private:
static void InitializeFlattenablesIfNeeded();
« no previous file with comments | « no previous file | include/effects/Sk2DPathEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698