From a0c2bc24381fea063008f9c8823756eb020603b3 Mon Sep 17 00:00:00 2001 From: "scroggo@google.com" Date: Fri, 21 Sep 2012 17:54:46 +0000 Subject: Make flattenables no longer depend on global static initializers. Instead, force all builds to call InitializeFlattenables. Remove the make_debugger script, which was created to force rebuilding without global static initializers so that all flattenables would be linked. It is no longer necessary since all flattenables will be linked thanks to InitializeFlattenables, which now can (and must) be called when global static initializers are turned on. BUG=https://code.google.com/p/skia/issues/detail?id=903 BUG=https://code.google.com/p/skia/issues/detail?id=902 Review URL: https://codereview.appspot.com/6548044 git-svn-id: http://skia.googlecode.com/svn/trunk@5642 2bbb7eff-a529-9590-31e7-b0007b416f81 --- include/core/SkFlattenable.h | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'include') diff --git a/include/core/SkFlattenable.h b/include/core/SkFlattenable.h index 6df9f9b068..0b21abcc76 100644 --- a/include/core/SkFlattenable.h +++ b/include/core/SkFlattenable.h @@ -15,22 +15,6 @@ class SkFlattenableReadBuffer; class SkFlattenableWriteBuffer; -#if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS - -#define SK_DEFINE_FLATTENABLE_REGISTRAR(flattenable) \ - static SkFlattenable::Registrar g##flattenable##Reg(#flattenable, \ - flattenable::CreateProc); -#define SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(flattenable) \ - static SkFlattenable::Registrar g##flattenable##Reg(#flattenable, \ - flattenable::CreateProc); - -#define SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() -#define SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(flattenable) -#define SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END - -#else - -#define SK_DEFINE_FLATTENABLE_REGISTRAR(flattenable) #define SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(flattenable) \ SkFlattenable::Registrar(#flattenable, flattenable::CreateProc); @@ -42,8 +26,6 @@ class SkFlattenableWriteBuffer; #define SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END \ } -#endif - #define SK_DECLARE_UNFLATTENABLE_OBJECT() \ virtual Factory getFactory() SK_OVERRIDE { return NULL; }; \ @@ -93,9 +75,7 @@ protected: virtual void flatten(SkFlattenableWriteBuffer&) const; private: -#if !SK_ALLOW_STATIC_GLOBAL_INITIALIZERS static void InitializeFlattenables(); -#endif friend class SkGraphics; friend class SkFlattenableWriteBuffer; -- cgit v1.2.3