Index: gm/imagemagnifier.cpp |
diff --git a/gm/imagemagnifier.cpp b/gm/imagemagnifier.cpp |
index 2bf22262dc225060d42e225009fafbfe584a27db..73639813a32d16cfc8f19e8c418a2f76a6e00169 100644 |
--- a/gm/imagemagnifier.cpp |
+++ b/gm/imagemagnifier.cpp |
@@ -12,25 +12,7 @@ |
#define WIDTH 500 |
#define HEIGHT 500 |
-namespace skiagm { |
- |
-class ImageMagnifierGM : public GM { |
-public: |
- ImageMagnifierGM() { |
- this->setBGColor(0xFF000000); |
- } |
- |
-protected: |
- |
- SkString onShortName() override { |
- return SkString("imagemagnifier"); |
- } |
- |
- SkISize onISize() override { |
- return SkISize::Make(WIDTH, HEIGHT); |
- } |
- |
- void onDraw(SkCanvas* canvas) override { |
+DEF_SIMPLE_GM_BG(imagemagnifier, canvas, WIDTH, HEIGHT, SK_ColorBLACK) { |
SkPaint filterPaint; |
filterPaint.setImageFilter( |
SkMagnifierImageFilter::Create( |
@@ -53,15 +35,4 @@ protected: |
SkIntToScalar(y), paint); |
} |
canvas->restore(); |
- } |
- |
-private: |
- typedef GM INHERITED; |
-}; |
- |
-////////////////////////////////////////////////////////////////////////////// |
- |
-static GM* MyFactory(void*) { return new ImageMagnifierGM; } |
-static GMRegistry reg(MyFactory); |
- |
} |