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

Unified Diff: gm/fatpathfill.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/dcshader.cpp ('k') | gm/getpostextpath.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/fatpathfill.cpp
diff --git a/gm/fatpathfill.cpp b/gm/fatpathfill.cpp
index be5fbc4d56092b74ecb398d3974f939ed5625573..d76cd463add59c4b79c802367c60fa68463d43d4 100644
--- a/gm/fatpathfill.cpp
+++ b/gm/fatpathfill.cpp
@@ -46,21 +46,9 @@ static void draw_fatpath(SkCanvas* canvas, SkSurface* surface, const SkPath& pat
draw_pixel_centers(canvas);
}
-class FatPathFillGM : public skiagm::GM {
-public:
- FatPathFillGM() {}
-
-protected:
-
- SkString onShortName() override {
- return SkString("fatpathfill");
- }
-
- SkISize onISize() override {
- return SkISize::Make(SMALL_W * ZOOM, SMALL_H * ZOOM * REPEAT_LOOP);
- }
-
- void onDraw(SkCanvas* canvas) override {
+DEF_SIMPLE_GM(fatpathfill, canvas,
+ SMALL_W * ZOOM,
+ SMALL_H * ZOOM * REPEAT_LOOP) {
SkAutoTUnref<SkSurface> surface(new_surface(SMALL_W, SMALL_H));
canvas->scale(ZOOM, ZOOM);
@@ -78,12 +66,4 @@ protected:
canvas->translate(0, SMALL_H);
}
- }
-
-private:
- typedef skiagm::GM INHERITED;
-};
-
-///////////////////////////////////////////////////////////////////////////////
-
-DEF_GM(return new FatPathFillGM;)
+}
« no previous file with comments | « gm/dcshader.cpp ('k') | gm/getpostextpath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698