diff options
author | msarett <msarett@google.com> | 2016-04-04 13:53:02 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-04 13:53:02 -0700 |
commit | 99d9231f6a4cb6b85b8637e9d8ae32f8bd7c466f (patch) | |
tree | afd7ff51e10b4860da79285cb19fb28d65c7f52d /include/core/SkFlattenable.h | |
parent | c19201f315d0fd91a6320c48ce18e5a87c4e8bda (diff) |
Delete SkFlattenable::Type
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1834303003
Review URL: https://codereview.chromium.org/1834303003
Diffstat (limited to 'include/core/SkFlattenable.h')
-rw-r--r-- | include/core/SkFlattenable.h | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/include/core/SkFlattenable.h b/include/core/SkFlattenable.h index c76f119c13..4d45e246a5 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 |