Use DEF_GM everywhere

BUG=skia:1902

Review URL: https://codereview.chromium.org/1518893002
This commit is contained in:
scroggo 2015-12-10 13:31:59 -08:00 committed by Commit bot
parent 4e56772432
commit 96f16e835e
15 changed files with 36 additions and 87 deletions

View File

@ -164,5 +164,4 @@ private:
///////////////////////////////////////////////////////////////////////////////
static skiagm::GM* MyFactory(void*) { return new ArithmodeGM; }
static skiagm::GMRegistry reg(MyFactory);
DEF_GM( return new ArithmodeGM; )

View File

@ -80,5 +80,4 @@ private:
typedef skiagm::GM INHERITED;
};
static skiagm::GM* F0(void*) { return new BeziersGM; }
static skiagm::GMRegistry R0(F0);
DEF_GM( return new BeziersGM; )

View File

@ -273,23 +273,12 @@ DEF_GM( return new BitmapRectRounding; )
//////////////////////////////////////////////////////////////////////////////
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

View File

@ -388,5 +388,4 @@ private:
typedef skiagm::GM INHERITED;
};
static skiagm::GM* F0(void*) { return new ConcavePathsGM; }
static skiagm::GMRegistry R0(F0);
DEF_GM( return new ConcavePathsGM; )

View File

@ -68,6 +68,5 @@ private:
typedef GM INHERITED;
};
static skiagm::GM* MyFactory(void*) { return new DrawFilterGM; }
static skiagm::GMRegistry reg(MyFactory);
DEF_GM( return new DrawFilterGM; )

View File

@ -99,5 +99,4 @@ private:
//////////////////////////////////////////////////////////////////////////////
static skiagm::GM* MyFactory(void*) { return new DrawLooperGM; }
static skiagm::GMRegistry reg(MyFactory);
DEF_GM( return new DrawLooperGM; )

View File

@ -169,5 +169,4 @@ private:
///////////////////////////////////////////////////////////////////////////////
static skiagm::GM* MyFactory(void*) { return new DropShadowImageFilterGM; }
static skiagm::GMRegistry reg(MyFactory);
DEF_GM( return new DropShadowImageFilterGM; )

View File

@ -122,30 +122,16 @@ private:
///////////////////////////////////////////////////////////////////////////////
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); )

View File

@ -170,5 +170,4 @@ private:
///////////////////////////////////////////////////////////////////////////////
static skiagm::GM* MyFactory(void*) { return new ImageFiltersCropExpandGM; }
static skiagm::GMRegistry reg(MyFactory);
DEF_GM( return new ImageFiltersCropExpandGM; )

View File

@ -197,5 +197,4 @@ private:
///////////////////////////////////////////////////////////////////////////////
static skiagm::GM* MyFactory(void*) { return new ImageFiltersCroppedGM; }
static skiagm::GMRegistry reg(MyFactory);
DEF_GM( return new ImageFiltersCroppedGM; )

View File

@ -215,8 +215,5 @@ private:
///////////////////////////////////////////////////////////////////////////////
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; )

View File

@ -110,5 +110,4 @@ private:
//////////////////////////////////////////////////////////////////////////////
static skiagm::GM* MyFactory(void*) { return new PathInteriorGM; }
static skiagm::GMRegistry reg(MyFactory);
DEF_GM( return new PathInteriorGM; )

View File

@ -48,12 +48,5 @@ private:
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); )

View File

@ -483,17 +483,11 @@ private:
//////////////////////////////////////////////////////////////////////////////
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; )

View File

@ -141,5 +141,4 @@ private:
//////////////////////////////////////////////////////////////////////////////
static skiagm::GM* MyFactory(void*) { return new TestImageFiltersGM; }
static skiagm::GMRegistry reg(MyFactory);
DEF_GM( return new TestImageFiltersGM; )