update to use DEF_GM
authorreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 8 Mar 2013 18:44:01 +0000 (18:44 +0000)
committerreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 8 Mar 2013 18:44:01 +0000 (18:44 +0000)
git-svn-id: http://skia.googlecode.com/svn/trunk@8048 2bbb7eff-a529-9590-31e7-b0007b416f81

gm/cubicpaths.cpp

index 1fc13c0..88f7ab1 100644 (file)
@@ -9,9 +9,7 @@
 #include "SkPaint.h"
 #include "SkRandom.h"
 
-namespace skiagm {
-
-class CubicPathGM : public GM {
+class CubicPathGM : public skiagm::GM {
 public:
     CubicPathGM() {}
 
@@ -20,7 +18,7 @@ protected:
         return SkString("cubicpath");
     }
 
-    SkISize onISize() { return make_isize(1240, 390); }
+    SkISize onISize() { return SkISize::Make(1240, 390); }
 
     void drawPath(SkPath& path,SkCanvas* canvas,SkColor color,
                   const SkRect& clip,SkPaint::Cap cap, SkPaint::Join join,
@@ -151,10 +149,10 @@ protected:
     }
 
 private:
-    typedef GM INHERITED;
+    typedef skiagm::GM INHERITED;
 };
 
-class CubicClosePathGM : public GM {
+class CubicClosePathGM : public skiagm::GM {
 public:
     CubicClosePathGM() {}
 
@@ -163,7 +161,7 @@ protected:
         return SkString("cubicclosepath");
     }
 
-    SkISize onISize() { return make_isize(1240, 390); }
+    SkISize onISize() { return SkISize::Make(1240, 390); }
 
     void drawPath(SkPath& path,SkCanvas* canvas,SkColor color,
                   const SkRect& clip,SkPaint::Cap cap, SkPaint::Join join,
@@ -295,15 +293,11 @@ protected:
     }
 
 private:
-    typedef GM INHERITED;
+    typedef skiagm::GM INHERITED;
 };
 
 //////////////////////////////////////////////////////////////////////////////
 
-static GM* CubicPathFactory(void*) { return new CubicPathGM; }
-static GMRegistry regCubicPath(CubicPathFactory);
-
-static GM* CubicClosePathFactory(void*) { return new CubicClosePathGM; }
-static GMRegistry regCubicClosePath(CubicClosePathFactory);
+DEF_GM( return new CubicPathGM; )
+DEF_GM( return new CubicClosePathGM; )
 
-}