Index: gm/gradient_matrix.cpp |
diff --git a/gm/gradient_matrix.cpp b/gm/gradient_matrix.cpp |
index 77227599e666994dc212ff5c2b7ca8146e864474..8f665a1b945eb0db671f44840a92d6b27734a0b7 100644 |
--- a/gm/gradient_matrix.cpp |
+++ b/gm/gradient_matrix.cpp |
@@ -111,25 +111,8 @@ static void draw_gradients(SkCanvas* canvas, |
canvas->restore(); |
} |
-namespace skiagm { |
- |
-class GradientMatrixGM : public GM { |
-public: |
- GradientMatrixGM() { |
- this->setBGColor(sk_tool_utils::color_to_565(0xFFDDDDDD)); |
- } |
- |
-protected: |
- |
- SkString onShortName() override { |
- return SkString("gradient_matrix"); |
- } |
- |
- SkISize onISize() override { |
- return SkISize::Make(800, 800); |
- } |
- |
- void onDraw(SkCanvas* canvas) override { |
+DEF_SIMPLE_GM_BG(gradient_matrix, canvas, 800, 800, |
+ sk_tool_utils::color_to_565(0xFFDDDDDD)) { |
draw_gradients(canvas, &make_linear_gradient, |
linearPts, SK_ARRAY_COUNT(linearPts)); |
@@ -137,11 +120,4 @@ protected: |
draw_gradients(canvas, &make_radial_gradient, |
radialPts, SK_ARRAY_COUNT(radialPts)); |
- } |
- |
-private: |
- typedef GM INHERITED; |
-}; |
- |
-DEF_GM( return new GradientMatrixGM; ) |
} |