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

Unified Diff: gm/pathreverse.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/patch.cpp ('k') | gm/rrects.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/pathreverse.cpp
diff --git a/gm/pathreverse.cpp b/gm/pathreverse.cpp
index 4487f9ada224645d048e88b35406a5f7360e5495..33507650a2f302bf94ecb8a857928780c1c41b8d 100644
--- a/gm/pathreverse.cpp
+++ b/gm/pathreverse.cpp
@@ -68,25 +68,8 @@ static void test_rev(SkCanvas* canvas, const SkPath& path) {
canvas->restore();
}
-namespace skiagm {
-
-class PathReverseGM : public GM {
-public:
- PathReverseGM() {
-
- }
-
-protected:
-
- SkString onShortName() override {
- return SkString("path-reverse");
- }
-
- SkISize onISize() override {
- return SkISize::Make(640, 480);
- }
-
- void onDraw(SkCanvas* canvas) override {
+DEF_SIMPLE_GM_BG_NAME(pathreverse, canvas, 640, 480, SK_ColorWHITE,
+ SkString("path-reverse")) {
SkRect r = { 10, 10, 100, 60 };
SkPath path;
@@ -108,15 +91,4 @@ protected:
path = hiragino_maru_goth_pro_e();
canvas->translate(0, 100);
test_rev(canvas, path);
- }
-
-private:
- typedef GM INHERITED;
-};
-
-//////////////////////////////////////////////////////////////////////////////
-
-static GM* MyFactory(void*) { return new PathReverseGM; }
-static GMRegistry reg(MyFactory);
-
}
« no previous file with comments | « gm/patch.cpp ('k') | gm/rrects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698