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

Unified Diff: include/core/SkFlattenable.h

Issue 1580873002: reorg global initialization, separating core from optional (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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
Index: include/core/SkFlattenable.h
diff --git a/include/core/SkFlattenable.h b/include/core/SkFlattenable.h
index bccabc18fa86d9cdf22babca2ea2f280157d2f72..10cba1a2ec293916d16c711b757e726fe1dd63d0 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();

Powered by Google App Engine
This is Rietveld 408576698