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

Unified Diff: gm/smallarc.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/skbug1719.cpp ('k') | gm/strokefill.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/smallarc.cpp
diff --git a/gm/smallarc.cpp b/gm/smallarc.cpp
index 6c0df8d8d78e201445c31b2ccaa14e931da7f97d..25755accc43eab3ca4c5f72b920374f314fdf29e 100644
--- a/gm/smallarc.cpp
+++ b/gm/smallarc.cpp
@@ -8,27 +8,10 @@
#include "gm.h"
#include "SkPath.h"
-namespace skiagm {
-
// this draws a small arc scaled up
// see https://code.google.com/p/chromium/issues/detail?id=102411
// and https://code.google.com/p/skia/issues/detail?id=2769
-class SmallArcGM : public GM {
-public:
- SmallArcGM() {
- }
-
-protected:
-
- SkString onShortName() override {
- return SkString("smallarc");
- }
-
- SkISize onISize() override {
- return SkISize::Make(762, 762);
- }
-
- void onDraw(SkCanvas* canvas) override {
+DEF_SIMPLE_GM(smallarc, canvas, 762, 762) {
SkPaint p;
p.setColor(SK_ColorRED);
p.setAntiAlias(true);
@@ -42,13 +25,4 @@ protected:
canvas->translate(-400, -400);
canvas->scale(8, 8);
canvas->drawPath(path, p);
- }
-
-private:
- typedef GM INHERITED;
-};
-
-//////////////////////////////////////////////////////////////////////////////
-
-DEF_GM(return new SmallArcGM;)
}
« no previous file with comments | « gm/skbug1719.cpp ('k') | gm/strokefill.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698