diff options
Diffstat (limited to 'gm/bigmatrix.cpp')
-rw-r--r-- | gm/bigmatrix.cpp | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/gm/bigmatrix.cpp b/gm/bigmatrix.cpp index c7c3b0dd07..2d2b7d9f7e 100644 --- a/gm/bigmatrix.cpp +++ b/gm/bigmatrix.cpp @@ -11,24 +11,8 @@ #include "SkPath.h" #include "SkShader.h" -namespace skiagm { - -class BigMatrixGM : public GM { -public: - BigMatrixGM() { - this->setBGColor(sk_tool_utils::color_to_565(0xFF66AA99)); - } - -protected: - virtual SkString onShortName() { - return SkString("bigmatrix"); - } - - virtual SkISize onISize() { - return SkISize::Make(50, 50); - } - - virtual void onDraw(SkCanvas* canvas) { +DEF_SIMPLE_GM_BG(bigmatrix, canvas, 50, 50, + sk_tool_utils::color_to_565(0xFF66AA99)) { SkMatrix m; m.reset(); m.setRotate(33 * SK_Scalar1); @@ -82,15 +66,4 @@ protected: rect.setLTRB(pt.fX - small, pt.fY - small, pt.fX + small, pt.fY + small); canvas->drawRect(rect, paint); - } - -private: - typedef GM INHERITED; -}; - -////////////////////////////////////////////////////////////////////////////// - -static GM* MyFactory(void*) { return new BigMatrixGM; } -static GMRegistry reg(MyFactory); - } |