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

Unified Diff: gm/lerpmode.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/largeglyphblur.cpp ('k') | gm/linepaths.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/lerpmode.cpp
diff --git a/gm/lerpmode.cpp b/gm/lerpmode.cpp
index bcf17c37a817e60ea8e4e7bdc70d6e09bd9c5baf..ea30b6b5a44f5910cf98d02cf0a3304d10ef88d4 100644
--- a/gm/lerpmode.cpp
+++ b/gm/lerpmode.cpp
@@ -34,30 +34,9 @@ static void show_circlelayers(SkCanvas* canvas, SkXfermode* mode) {
canvas->restore();
}
-class LerpXfermodeGM : public skiagm::GM {
-public:
- LerpXfermodeGM() {}
-
-protected:
- SkString onShortName() override {
- return SkString("lerpmode");
- }
-
- SkISize onISize() override {
- return SkISize::Make(240, 120);
- }
-
- void onDraw(SkCanvas* canvas) override {
+DEF_SIMPLE_GM(lerpmode, canvas, 240, 120) {
show_circlelayers(canvas, nullptr);
canvas->translate(150, 0);
SkAutoTUnref<SkXfermode> mode(SkLerpXfermode::Create(0.5f));
show_circlelayers(canvas, mode.get());
- }
-
-private:
- typedef skiagm::GM INHERITED;
-};
-
-//////////////////////////////////////////////////////////////////////////////
-
-DEF_GM(return new LerpXfermodeGM;)
+}
« no previous file with comments | « gm/largeglyphblur.cpp ('k') | gm/linepaths.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698