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

Unified Diff: gm/imageresizetiled.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/imagemagnifier.cpp ('k') | gm/inversepaths.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/imageresizetiled.cpp
diff --git a/gm/imageresizetiled.cpp b/gm/imageresizetiled.cpp
index 1da2bcea3af85720b15a5feeb9f2b9929d9f43d0..d925298adf1534abf08f1c53d35b9aaeb0fa8d9b 100644
--- a/gm/imageresizetiled.cpp
+++ b/gm/imageresizetiled.cpp
@@ -14,24 +14,7 @@
#define RESIZE_FACTOR SkIntToScalar(2)
-namespace skiagm {
-
-class ImageResizeTiledGM : public GM {
-public:
- ImageResizeTiledGM() {
- }
-
-protected:
-
- SkString onShortName() override {
- return SkString("imageresizetiled");
- }
-
- SkISize onISize() override {
- return SkISize::Make(WIDTH, HEIGHT);
- }
-
- void onDraw(SkCanvas* canvas) override {
+DEF_SIMPLE_GM(imageresizetiled, canvas, WIDTH, HEIGHT) {
SkPaint paint;
SkMatrix matrix;
matrix.setScale(RESIZE_FACTOR, RESIZE_FACTOR);
@@ -68,14 +51,4 @@ protected:
canvas->restore();
}
}
- }
-
-private:
- typedef GM INHERITED;
-};
-
-//////////////////////////////////////////////////////////////////////////////
-
-DEF_GM(return new ImageResizeTiledGM(); )
-
}
« no previous file with comments | « gm/imagemagnifier.cpp ('k') | gm/inversepaths.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698