DescriptionRemove overly complicated GR_CREATE_STATIC_PROCESSOR macro
This macro was responsible for producing code like:
static SkAlignedStorage<sizeof(Foo)> g_gFoo_Storage;
static Foo* gFoo = new(g_gFoo_Storage.get()) Foo;
static SkAutoTDestroy<Foo> gFoo_ad(gFoo);
which would allocate static storage for an object of type Foo
(g_gFoo_Storage), lazily instantiate the object in that memory (via
gFoo's initializer), and then ensure that at global destruction time
the object is destroyed (via gFoo_Ad's destructor).
However, the exact same effect is achieved by just writing:
static Foo gFoo;
Committed: https://skia.googlesource.com/skia/+/38f1f6f9e590fc20b81015ceca9d642cbe02a2d9
Patch Set 1 #
Messages
Total messages: 9 (4 generated)
|