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

Unified Diff: include/core/SkFlattenable.h

Issue 1834303003: Delete SkFlattenable::Type (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 4 years, 8 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 | « include/core/SkDrawLooper.h ('k') | include/core/SkFlattenableSerialization.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 c76f119c131d5daf2c2b990d51aa6b952932af22..4d45e246a5135c141980ee29de278c77a9c0eabf 100644
--- a/include/core/SkFlattenable.h
+++ b/include/core/SkFlattenable.h
@@ -43,8 +43,7 @@ class SkPrivateEffectInitializer;
}
#define SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(flattenable) \
- SkFlattenable::Register(#flattenable, flattenable::CreateProc, \
- flattenable::GetFlattenableType());
+ SkFlattenable::Register(#flattenable, flattenable::CreateProc);
#define SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(flattenable) \
private: \
@@ -53,14 +52,6 @@ class SkPrivateEffectInitializer;
public: \
Factory getFactory() const override { return CreateProc; }
-/** For SkFlattenable derived objects with a valid type
- This macro should only be used in base class objects in core
- */
-#define SK_DEFINE_FLATTENABLE_TYPE(flattenable) \
- static Type GetFlattenableType() { \
- return k##flattenable##_Type; \
- }
-
/** \class SkFlattenable
SkFlattenable is the base class for objects that need to be flattened
@@ -69,19 +60,6 @@ class SkPrivateEffectInitializer;
*/
class SK_API SkFlattenable : public SkRefCnt {
public:
- enum Type {
- kSkColorFilter_Type,
- kSkDrawLooper_Type,
- kSkImageFilter_Type,
- kSkMaskFilter_Type,
- kSkPathEffect_Type,
- kSkPixelRef_Type,
- kSkRasterizer_Type,
- kSkShader_Type,
- kSkUnused_Type, // used to be SkUnitMapper
- kSkXfermode_Type,
- };
-
typedef sk_sp<SkFlattenable> (*Factory)(SkReadBuffer&);
SkFlattenable() {}
@@ -98,9 +76,8 @@ public:
static Factory NameToFactory(const char name[]);
static const char* FactoryToName(Factory);
- static bool NameToType(const char name[], Type* type);
- static void Register(const char name[], Factory, Type);
+ static void Register(const char name[], Factory);
/**
* Override this if your subclass needs to record data that it will need to recreate itself
« no previous file with comments | « include/core/SkDrawLooper.h ('k') | include/core/SkFlattenableSerialization.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698