Use DEF_GM everywhere

BUG=skia:1902

Review URL: https://codereview.chromium.org/1518893002
diff --git a/gm/arithmode.cpp b/gm/arithmode.cpp
index 1e50e89..eb2ecb8 100644
--- a/gm/arithmode.cpp
+++ b/gm/arithmode.cpp
@@ -164,5 +164,4 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-static skiagm::GM* MyFactory(void*) { return new ArithmodeGM; }
-static skiagm::GMRegistry reg(MyFactory);
+DEF_GM( return new ArithmodeGM; )
diff --git a/gm/beziers.cpp b/gm/beziers.cpp
index 68960ed..20abb03 100755
--- a/gm/beziers.cpp
+++ b/gm/beziers.cpp
@@ -80,5 +80,4 @@
     typedef skiagm::GM INHERITED;
 };
 
-static skiagm::GM* F0(void*) { return new BeziersGM; }
-static skiagm::GMRegistry R0(F0);
+DEF_GM( return new BeziersGM; )
diff --git a/gm/bitmaprect.cpp b/gm/bitmaprect.cpp
index 077f0ee..f855ad7 100644
--- a/gm/bitmaprect.cpp
+++ b/gm/bitmaprect.cpp
@@ -273,23 +273,12 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
-static skiagm::GM* MyFactory0(void*) { return new DrawBitmapRect2(false); }
-static skiagm::GM* MyFactory1(void*) { return new DrawBitmapRect2(true); }
-
-static skiagm::GM* MyFactory2(void*) { return new DrawBitmapRect3(); }
+DEF_GM( return new DrawBitmapRect2(false); )
+DEF_GM( return new DrawBitmapRect2(true); )
+DEF_GM( return new DrawBitmapRect3(); )
 
 #ifndef SK_BUILD_FOR_ANDROID
-static skiagm::GM* MyFactory3(void*) { return new DrawBitmapRect4(false); }
-static skiagm::GM* MyFactory4(void*) { return new DrawBitmapRect4(true); }
-#endif
-
-static skiagm::GMRegistry reg0(MyFactory0);
-static skiagm::GMRegistry reg1(MyFactory1);
-
-static skiagm::GMRegistry reg2(MyFactory2);
-
-#ifndef SK_BUILD_FOR_ANDROID
-static skiagm::GMRegistry reg3(MyFactory3);
-static skiagm::GMRegistry reg4(MyFactory4);
+DEF_GM( return new DrawBitmapRect4(false); )
+DEF_GM( return new DrawBitmapRect4(true); )
 #endif
 
diff --git a/gm/concavepaths.cpp b/gm/concavepaths.cpp
index 37635f8..4008a64 100644
--- a/gm/concavepaths.cpp
+++ b/gm/concavepaths.cpp
@@ -388,5 +388,4 @@
     typedef skiagm::GM INHERITED;
 };
 
-static skiagm::GM* F0(void*) { return new ConcavePathsGM; }
-static skiagm::GMRegistry R0(F0);
+DEF_GM( return new ConcavePathsGM; )
diff --git a/gm/drawfilter.cpp b/gm/drawfilter.cpp
index b0a21e9..cd1bbb0 100644
--- a/gm/drawfilter.cpp
+++ b/gm/drawfilter.cpp
@@ -68,6 +68,5 @@
     typedef GM INHERITED;
 };
 
-static skiagm::GM* MyFactory(void*) { return new DrawFilterGM; }
-static skiagm::GMRegistry reg(MyFactory);
+DEF_GM( return new DrawFilterGM; )
 
diff --git a/gm/drawlooper.cpp b/gm/drawlooper.cpp
index ffa7d6c..9f922a5 100644
--- a/gm/drawlooper.cpp
+++ b/gm/drawlooper.cpp
@@ -99,5 +99,4 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
-static skiagm::GM* MyFactory(void*) { return new DrawLooperGM; }
-static skiagm::GMRegistry reg(MyFactory);
+DEF_GM( return new DrawLooperGM; )
diff --git a/gm/dropshadowimagefilter.cpp b/gm/dropshadowimagefilter.cpp
index 1b6bca4..81824ab 100644
--- a/gm/dropshadowimagefilter.cpp
+++ b/gm/dropshadowimagefilter.cpp
@@ -169,5 +169,4 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-static skiagm::GM* MyFactory(void*) { return new DropShadowImageFilterGM; }
-static skiagm::GMRegistry reg(MyFactory);
+DEF_GM( return new DropShadowImageFilterGM; )
diff --git a/gm/giantbitmap.cpp b/gm/giantbitmap.cpp
index 571dbd8..4005359 100644
--- a/gm/giantbitmap.cpp
+++ b/gm/giantbitmap.cpp
@@ -122,30 +122,16 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-static skiagm::GM* G000(void*) { return new GiantBitmapGM(SkShader::kClamp_TileMode, false, false); }
-static skiagm::GM* G100(void*) { return new GiantBitmapGM(SkShader::kRepeat_TileMode, false, false); }
-static skiagm::GM* G200(void*) { return new GiantBitmapGM(SkShader::kMirror_TileMode, false, false); }
-static skiagm::GM* G010(void*) { return new GiantBitmapGM(SkShader::kClamp_TileMode, true, false); }
-static skiagm::GM* G110(void*) { return new GiantBitmapGM(SkShader::kRepeat_TileMode, true, false); }
-static skiagm::GM* G210(void*) { return new GiantBitmapGM(SkShader::kMirror_TileMode, true, false); }
+DEF_GM( return new GiantBitmapGM(SkShader::kClamp_TileMode, false, false); )
+DEF_GM( return new GiantBitmapGM(SkShader::kRepeat_TileMode, false, false); )
+DEF_GM( return new GiantBitmapGM(SkShader::kMirror_TileMode, false, false); )
+DEF_GM( return new GiantBitmapGM(SkShader::kClamp_TileMode, true, false); )
+DEF_GM( return new GiantBitmapGM(SkShader::kRepeat_TileMode, true, false); )
+DEF_GM( return new GiantBitmapGM(SkShader::kMirror_TileMode, true, false); )
 
-static skiagm::GM* G001(void*) { return new GiantBitmapGM(SkShader::kClamp_TileMode, false, true); }
-static skiagm::GM* G101(void*) { return new GiantBitmapGM(SkShader::kRepeat_TileMode, false, true); }
-static skiagm::GM* G201(void*) { return new GiantBitmapGM(SkShader::kMirror_TileMode, false, true); }
-static skiagm::GM* G011(void*) { return new GiantBitmapGM(SkShader::kClamp_TileMode, true, true); }
-static skiagm::GM* G111(void*) { return new GiantBitmapGM(SkShader::kRepeat_TileMode, true, true); }
-static skiagm::GM* G211(void*) { return new GiantBitmapGM(SkShader::kMirror_TileMode, true, true); }
-
-static skiagm::GMRegistry reg000(G000);
-static skiagm::GMRegistry reg100(G100);
-static skiagm::GMRegistry reg200(G200);
-static skiagm::GMRegistry reg010(G010);
-static skiagm::GMRegistry reg110(G110);
-static skiagm::GMRegistry reg210(G210);
-
-static skiagm::GMRegistry reg001(G001);
-static skiagm::GMRegistry reg101(G101);
-static skiagm::GMRegistry reg201(G201);
-static skiagm::GMRegistry reg011(G011);
-static skiagm::GMRegistry reg111(G111);
-static skiagm::GMRegistry reg211(G211);
+DEF_GM( return new GiantBitmapGM(SkShader::kClamp_TileMode, false, true); )
+DEF_GM( return new GiantBitmapGM(SkShader::kRepeat_TileMode, false, true); )
+DEF_GM( return new GiantBitmapGM(SkShader::kMirror_TileMode, false, true); )
+DEF_GM( return new GiantBitmapGM(SkShader::kClamp_TileMode, true, true); )
+DEF_GM( return new GiantBitmapGM(SkShader::kRepeat_TileMode, true, true); )
+DEF_GM( return new GiantBitmapGM(SkShader::kMirror_TileMode, true, true); )
diff --git a/gm/imagefilterscropexpand.cpp b/gm/imagefilterscropexpand.cpp
index 2e452ee..b173648 100644
--- a/gm/imagefilterscropexpand.cpp
+++ b/gm/imagefilterscropexpand.cpp
@@ -170,5 +170,4 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-static skiagm::GM* MyFactory(void*) { return new ImageFiltersCropExpandGM; }
-static skiagm::GMRegistry reg(MyFactory);
+DEF_GM( return new ImageFiltersCropExpandGM; )
diff --git a/gm/imagefilterscropped.cpp b/gm/imagefilterscropped.cpp
index 82d5389..745e898 100644
--- a/gm/imagefilterscropped.cpp
+++ b/gm/imagefilterscropped.cpp
@@ -197,5 +197,4 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-static skiagm::GM* MyFactory(void*) { return new ImageFiltersCroppedGM; }
-static skiagm::GMRegistry reg(MyFactory);
+DEF_GM( return new ImageFiltersCroppedGM; )
diff --git a/gm/pathfill.cpp b/gm/pathfill.cpp
index f4e42e8..a524588 100644
--- a/gm/pathfill.cpp
+++ b/gm/pathfill.cpp
@@ -215,8 +215,5 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-static skiagm::GM* MyFactory(void*) { return new PathFillGM; }
-static skiagm::GMRegistry reg(MyFactory);
-
-static skiagm::GM* F1(void*) { return new PathInverseFillGM; }
-static skiagm::GMRegistry gR1(F1);
+DEF_GM( return new PathFillGM; )
+DEF_GM( return new PathInverseFillGM; )
diff --git a/gm/pathinterior.cpp b/gm/pathinterior.cpp
index f1cbfc4..f93e682 100644
--- a/gm/pathinterior.cpp
+++ b/gm/pathinterior.cpp
@@ -110,5 +110,4 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
-static skiagm::GM* MyFactory(void*) { return new PathInteriorGM; }
-static skiagm::GMRegistry reg(MyFactory);
+DEF_GM( return new PathInteriorGM; )
diff --git a/gm/selftest.cpp b/gm/selftest.cpp
index 332a0cd..b54a528 100644
--- a/gm/selftest.cpp
+++ b/gm/selftest.cpp
@@ -48,12 +48,5 @@
 static SkColor kTranslucentGreen = 0x7700EE00;
 static SkColor kTranslucentBlue  = 0x770000DD;
 
-static skiagm::GM* F1(void*) {
-    return new SelfTestGM("selftest1", kTranslucentGreen);
-}
-static skiagm::GM* F2(void*) {
-    return new SelfTestGM("selftest2", kTranslucentBlue);
-}
-
-static skiagm::GMRegistry gR1(F1);
-static skiagm::GMRegistry gR2(F2);
+DEF_GM( return new SelfTestGM("selftest1", kTranslucentGreen); )
+DEF_GM( return new SelfTestGM("selftest2", kTranslucentBlue); )
diff --git a/gm/strokes.cpp b/gm/strokes.cpp
index 303d4a5..f2abb0b 100644
--- a/gm/strokes.cpp
+++ b/gm/strokes.cpp
@@ -483,17 +483,11 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
-static skiagm::GM* F0(void*) { return new StrokesGM; }
-static skiagm::GM* F1(void*) { return new Strokes2GM; }
-static skiagm::GM* F2(void*) { return new Strokes3GM; }
-static skiagm::GM* F3(void*) { return new Strokes4GM; }
-static skiagm::GM* F4(void*) { return new Strokes5GM; }
-
-static skiagm::GMRegistry R0(F0);
-static skiagm::GMRegistry R1(F1);
-static skiagm::GMRegistry R2(F2);
-static skiagm::GMRegistry R3(F3);
-static skiagm::GMRegistry R4(F4);
+DEF_GM( return new StrokesGM; )
+DEF_GM( return new Strokes2GM; )
+DEF_GM( return new Strokes3GM; )
+DEF_GM( return new Strokes4GM; )
+DEF_GM( return new Strokes5GM; )
 
 DEF_GM( return new ZeroLenStrokesGM; )
 DEF_GM( return new TeenyStrokesGM; )
diff --git a/gm/testimagefilters.cpp b/gm/testimagefilters.cpp
index 2c4fadb..1ea9575 100644
--- a/gm/testimagefilters.cpp
+++ b/gm/testimagefilters.cpp
@@ -141,5 +141,4 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
-static skiagm::GM* MyFactory(void*) { return new TestImageFiltersGM; }
-static skiagm::GMRegistry reg(MyFactory);
+DEF_GM( return new TestImageFiltersGM; )