aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2016-01-13 08:47:54 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-01-13 08:47:54 -0800
commit6054d686e6fecc7261eeb328f27e9e16cd1d3b1e (patch)
tree7355e41ad35a45a5092beeeee9773313d87f01c2 /include
parentf5883a6d75a18c581507214d3057b5c721ed1ffc (diff)
reorg global initialization, separating core from optional
Chrome will be changed to just inherit our files, with no need to have their own copy. see https://codereview.chromium.org/1581533007/ BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1580873002 Review URL: https://codereview.chromium.org/1580873002
Diffstat (limited to 'include')
-rw-r--r--include/core/SkFlattenable.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/core/SkFlattenable.h b/include/core/SkFlattenable.h
index bccabc18fa..10cba1a2ec 100644
--- a/include/core/SkFlattenable.h
+++ b/include/core/SkFlattenable.h
@@ -49,7 +49,7 @@ class SkPrivateEffectInitializer;
#define SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(flattenable) \
private: \
static SkFlattenable* CreateProc(SkReadBuffer&); \
- friend class ::SkPrivateEffectInitializer; \
+ friend class SkFlattenable::PrivateInitializer; \
public: \
Factory getFactory() const override { return CreateProc; }
@@ -108,6 +108,13 @@ public:
*/
virtual void flatten(SkWriteBuffer&) const {}
+protected:
+ class PrivateInitializer {
+ public:
+ static void InitCore();
+ static void InitEffects();
+ };
+
private:
static void InitializeFlattenablesIfNeeded();