diff --git a/gm/aarectmodes.cpp b/gm/aarectmodes.cpp index ef379a4ebe..df11e5bdce 100644 --- a/gm/aarectmodes.cpp +++ b/gm/aarectmodes.cpp @@ -171,7 +171,5 @@ namespace skiagm { ////////////////////////////////////////////////////////////////////////////// - static GM* MyFactory(void*) { return new AARectModesGM; } - static GMRegistry reg(MyFactory); - + DEF_GM( return new AARectModesGM; ); } diff --git a/gm/bitmapcopy.cpp b/gm/bitmapcopy.cpp index 469bf71ae1..547ebe0579 100644 --- a/gm/bitmapcopy.cpp +++ b/gm/bitmapcopy.cpp @@ -130,6 +130,5 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new BitmapCopyGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new BitmapCopyGM; ) } diff --git a/gm/bitmapimage.cpp b/gm/bitmapimage.cpp index 225d56cebb..82f9626d8b 100644 --- a/gm/bitmapimage.cpp +++ b/gm/bitmapimage.cpp @@ -72,7 +72,6 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new BitmapImageGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new BitmapImageGM; ) } diff --git a/gm/bitmapshader.cpp b/gm/bitmapshader.cpp index dfe3a22fa0..91bd5a73d9 100644 --- a/gm/bitmapshader.cpp +++ b/gm/bitmapshader.cpp @@ -138,7 +138,6 @@ DEF_SIMPLE_GM(hugebitmapshader, canvas, 100, 100) { ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new BitmapShaderGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new BitmapShaderGM; ) } diff --git a/gm/circles.cpp b/gm/circles.cpp index 4c4a3a5263..9127c0a8fe 100644 --- a/gm/circles.cpp +++ b/gm/circles.cpp @@ -200,7 +200,6 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new CircleGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new CircleGM; ) } diff --git a/gm/coloremoji_blendmodes.cpp b/gm/coloremoji_blendmodes.cpp index a28389e23f..e24ba53591 100644 --- a/gm/coloremoji_blendmodes.cpp +++ b/gm/coloremoji_blendmodes.cpp @@ -171,7 +171,6 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new ColorEmojiBlendModesGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new ColorEmojiBlendModesGM; ) } diff --git a/gm/convexpaths.cpp b/gm/convexpaths.cpp index 766a6cee18..63548327af 100644 --- a/gm/convexpaths.cpp +++ b/gm/convexpaths.cpp @@ -292,7 +292,6 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new ConvexPathsGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new ConvexPathsGM; ) } diff --git a/gm/copyTo4444.cpp b/gm/copyTo4444.cpp index ec9b72610d..bdc2fe6068 100644 --- a/gm/copyTo4444.cpp +++ b/gm/copyTo4444.cpp @@ -50,8 +50,7 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new CopyTo4444GM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new CopyTo4444GM; ) } diff --git a/gm/degeneratesegments.cpp b/gm/degeneratesegments.cpp index a2c9e43a20..0ebca10030 100644 --- a/gm/degeneratesegments.cpp +++ b/gm/degeneratesegments.cpp @@ -367,7 +367,6 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new DegenerateSegmentsGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new DegenerateSegmentsGM; ) } diff --git a/gm/distantclip.cpp b/gm/distantclip.cpp index fa752659a5..eb963f8f67 100644 --- a/gm/distantclip.cpp +++ b/gm/distantclip.cpp @@ -67,7 +67,6 @@ private: /////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new DistantClipGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new DistantClipGM; ) } diff --git a/gm/dstreadshuffle.cpp b/gm/dstreadshuffle.cpp index 68dcfc412c..fbaac15743 100644 --- a/gm/dstreadshuffle.cpp +++ b/gm/dstreadshuffle.cpp @@ -182,7 +182,6 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new DstReadShuffle; } -static GMRegistry reg(MyFactory); +DEF_GM( return new DstReadShuffle; ) } diff --git a/gm/extractbitmap.cpp b/gm/extractbitmap.cpp index c0ca9ee02a..41eacce3f6 100644 --- a/gm/extractbitmap.cpp +++ b/gm/extractbitmap.cpp @@ -78,7 +78,6 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new ExtractBitmapGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new ExtractBitmapGM; ) } diff --git a/gm/filltypes.cpp b/gm/filltypes.cpp index cf6c26f0a2..c1e0526328 100644 --- a/gm/filltypes.cpp +++ b/gm/filltypes.cpp @@ -90,7 +90,6 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new FillTypeGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new FillTypeGM; ) } diff --git a/gm/filltypespersp.cpp b/gm/filltypespersp.cpp index 0722004662..01c930d751 100644 --- a/gm/filltypespersp.cpp +++ b/gm/filltypespersp.cpp @@ -125,7 +125,6 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new FillTypePerspGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new FillTypePerspGM; ) } diff --git a/gm/fontscaler.cpp b/gm/fontscaler.cpp index 72071cb58b..51d84251eb 100644 --- a/gm/fontscaler.cpp +++ b/gm/fontscaler.cpp @@ -76,7 +76,6 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new FontScalerGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new FontScalerGM; ) } diff --git a/gm/fontscalerdistortable.cpp b/gm/fontscalerdistortable.cpp index 0d2dc2da87..b060a0af18 100644 --- a/gm/fontscalerdistortable.cpp +++ b/gm/fontscalerdistortable.cpp @@ -96,7 +96,6 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new FontScalerDistortableGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new FontScalerDistortableGM; ) } diff --git a/gm/gradientDirtyLaundry.cpp b/gm/gradientDirtyLaundry.cpp index b43ce7edb4..b7f78d3847 100644 --- a/gm/gradientDirtyLaundry.cpp +++ b/gm/gradientDirtyLaundry.cpp @@ -95,5 +95,4 @@ private: /////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new GradientsGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new GradientsGM; ) diff --git a/gm/gradtext.cpp b/gm/gradtext.cpp index b9cdb12ae7..873b5167fc 100644 --- a/gm/gradtext.cpp +++ b/gm/gradtext.cpp @@ -97,11 +97,8 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* CMyFactory(void*) { return new ChromeGradTextGM1; } -static GM* CMyFactory2(void*) { return new ChromeGradTextGM2; } - -static GMRegistry Creg(CMyFactory); -static GMRegistry Creg2(CMyFactory2); +DEF_GM( return new ChromeGradTextGM1; ) +DEF_GM( return new ChromeGradTextGM2; ) } DEF_SIMPLE_GM(gradtext, canvas, 500, 480) { diff --git a/gm/hairlines.cpp b/gm/hairlines.cpp index 6ec5bdeb77..6954207d15 100644 --- a/gm/hairlines.cpp +++ b/gm/hairlines.cpp @@ -258,7 +258,6 @@ DEF_SIMPLE_GM(squarehair, canvas, 240, 360) { ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new HairlinesGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new HairlinesGM; ) } diff --git a/gm/hairmodes.cpp b/gm/hairmodes.cpp index ca9352b437..151af3e890 100644 --- a/gm/hairmodes.cpp +++ b/gm/hairmodes.cpp @@ -120,7 +120,5 @@ namespace skiagm { ////////////////////////////////////////////////////////////////////////////// - static GM* MyFactory(void*) { return new HairModesGM; } - static GMRegistry reg(MyFactory); - + DEF_GM( return new HairModesGM; ) } diff --git a/gm/internal_links.cpp b/gm/internal_links.cpp index af54b5f6d6..51d5e2099c 100644 --- a/gm/internal_links.cpp +++ b/gm/internal_links.cpp @@ -70,7 +70,6 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new InternalLinksGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new InternalLinksGM; ) } diff --git a/gm/modecolorfilters.cpp b/gm/modecolorfilters.cpp index 59a7805eb4..6f933fe790 100644 --- a/gm/modecolorfilters.cpp +++ b/gm/modecolorfilters.cpp @@ -153,7 +153,6 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new ModeColorFilterGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new ModeColorFilterGM; ) } diff --git a/gm/ovals.cpp b/gm/ovals.cpp index df8d49fd2a..d9de1a52ba 100644 --- a/gm/ovals.cpp +++ b/gm/ovals.cpp @@ -299,7 +299,6 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new OvalGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new OvalGM; ) } diff --git a/gm/patheffects.cpp b/gm/patheffects.cpp index d3d69384d0..79e90d767c 100644 --- a/gm/patheffects.cpp +++ b/gm/patheffects.cpp @@ -160,8 +160,7 @@ private: typedef GM INHERITED; }; -static GM* PathEffectFactory(void*) { return new PathEffectGM; } -static GMRegistry regPathEffect(PathEffectFactory); +DEF_GM( return new PathEffectGM; ) } diff --git a/gm/pathopsinverse.cpp b/gm/pathopsinverse.cpp index 3a3d970534..32dcda9c60 100644 --- a/gm/pathopsinverse.cpp +++ b/gm/pathopsinverse.cpp @@ -109,7 +109,6 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new PathOpsInverseGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new PathOpsInverseGM; ) } diff --git a/gm/pathopsskpclip.cpp b/gm/pathopsskpclip.cpp index 18be681579..e6ebc9bb24 100644 --- a/gm/pathopsskpclip.cpp +++ b/gm/pathopsskpclip.cpp @@ -66,7 +66,6 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new PathOpsSkpClipGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new PathOpsSkpClipGM; ) } diff --git a/gm/points.cpp b/gm/points.cpp index 0aa6fd86de..8315a2a0f1 100644 --- a/gm/points.cpp +++ b/gm/points.cpp @@ -67,7 +67,6 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new PointsGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new PointsGM; ) } diff --git a/gm/quadpaths.cpp b/gm/quadpaths.cpp index 82fcd33278..6f4f7d0f9a 100644 --- a/gm/quadpaths.cpp +++ b/gm/quadpaths.cpp @@ -276,10 +276,8 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* QuadPathFactory(void*) { return new QuadPathGM; } -static GMRegistry regQuadPath(QuadPathFactory); +DEF_GM( return new QuadPathGM; ) -static GM* QuadClosePathFactory(void*) { return new QuadClosePathGM; } -static GMRegistry regQuadClosePath(QuadClosePathFactory); +DEF_GM( return new QuadClosePathGM; ) } diff --git a/gm/rects.cpp b/gm/rects.cpp index 9d7ac6dbb8..2786be74ad 100644 --- a/gm/rects.cpp +++ b/gm/rects.cpp @@ -279,7 +279,6 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new RectsGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new RectsGM; ) } diff --git a/gm/roundrects.cpp b/gm/roundrects.cpp index 5079b70383..12b0e71b1a 100644 --- a/gm/roundrects.cpp +++ b/gm/roundrects.cpp @@ -373,7 +373,6 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new RoundRectGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new RoundRectGM; ) } diff --git a/gm/samplerstress.cpp b/gm/samplerstress.cpp index 2e435a3313..538a385c7b 100644 --- a/gm/samplerstress.cpp +++ b/gm/samplerstress.cpp @@ -139,7 +139,6 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new SamplerStressGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new SamplerStressGM; ) } diff --git a/gm/shadertext3.cpp b/gm/shadertext3.cpp index f28b93a995..150e205af8 100644 --- a/gm/shadertext3.cpp +++ b/gm/shadertext3.cpp @@ -126,6 +126,5 @@ private: /////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new ShaderText3GM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new ShaderText3GM; ) } diff --git a/gm/shadows.cpp b/gm/shadows.cpp index 0319984f7c..1160e498f9 100644 --- a/gm/shadows.cpp +++ b/gm/shadows.cpp @@ -125,7 +125,6 @@ private: /////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new ShadowsGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new ShadowsGM; ) } diff --git a/gm/stlouisarch.cpp b/gm/stlouisarch.cpp index 7b31e54ec8..80d6a4a954 100644 --- a/gm/stlouisarch.cpp +++ b/gm/stlouisarch.cpp @@ -92,7 +92,6 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new StLouisArchGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new StLouisArchGM; ) } diff --git a/gm/strokerects.cpp b/gm/strokerects.cpp index fc5743eb74..3b1db5ece4 100644 --- a/gm/strokerects.cpp +++ b/gm/strokerects.cpp @@ -77,7 +77,6 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new StrokeRectsGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new StrokeRectsGM; ) } diff --git a/gm/thinrects.cpp b/gm/thinrects.cpp index 999028c7ec..e3d25fe669 100644 --- a/gm/thinrects.cpp +++ b/gm/thinrects.cpp @@ -117,7 +117,6 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new ThinRectsGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new ThinRectsGM; ) } diff --git a/gm/tinybitmap.cpp b/gm/tinybitmap.cpp index 08bd4c1e9f..3592915d45 100644 --- a/gm/tinybitmap.cpp +++ b/gm/tinybitmap.cpp @@ -48,7 +48,6 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new TinyBitmapGM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new TinyBitmapGM; ) } diff --git a/gm/xfermodes2.cpp b/gm/xfermodes2.cpp index 27f3dbc881..26de6fec31 100644 --- a/gm/xfermodes2.cpp +++ b/gm/xfermodes2.cpp @@ -140,7 +140,6 @@ private: ////////////////////////////////////////////////////////////////////////////// -static GM* MyFactory(void*) { return new Xfermodes2GM; } -static GMRegistry reg(MyFactory); +DEF_GM( return new Xfermodes2GM; ) }