Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Unified Diff: gm/hittestpath.cpp

Issue 1333553002: GM: replace boilerplate with macros (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-09-09 (Wednesday) 11:01:10 EDT Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/gradient_matrix.cpp ('k') | gm/imageblur.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/hittestpath.cpp
diff --git a/gm/hittestpath.cpp b/gm/hittestpath.cpp
index b5f01cd2fdf822eefb3d9a97b9b74176777870db..d0fe1aabb377e892a8be1564eff42a020514e41a 100644
--- a/gm/hittestpath.cpp
+++ b/gm/hittestpath.cpp
@@ -30,19 +30,7 @@ static void test_hittest(SkCanvas* canvas, const SkPath& path) {
}
}
-class HitTestPathGM : public skiagm::GM {
-public:
- HitTestPathGM () {}
-
-protected:
-
- SkString onShortName() override {
- return SkString("hittestpath");
- }
-
- SkISize onISize() override { return SkISize::Make(700, 460); }
-
- void onDraw(SkCanvas* canvas) override {
+DEF_SIMPLE_GM(hittestpath, canvas, 700, 460) {
SkPath path;
SkRandom rand;
@@ -70,13 +58,4 @@ protected:
path.setFillType(SkPath::kWinding_FillType);
test_hittest(canvas, path);
- }
-
-private:
- typedef GM INHERITED;
-};
-
-//////////////////////////////////////////////////////////////////////////////
-
-static skiagm::GM* MyFactory(void*) { return new HitTestPathGM; }
-static skiagm::GMRegistry reg(MyFactory);
+}
« no previous file with comments | « gm/gradient_matrix.cpp ('k') | gm/imageblur.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698