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

Unified Diff: gm/texteffects.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/textblobuseaftergpufree.cpp ('k') | gm/texturedomaineffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/texteffects.cpp
diff --git a/gm/texteffects.cpp b/gm/texteffects.cpp
index 902bed3ea89cced2017728eacc91d67a6f7b3dab..53395f0732f2e22a42e50bd9779f2e35d3fce72e 100644
--- a/gm/texteffects.cpp
+++ b/gm/texteffects.cpp
@@ -170,20 +170,7 @@ static void apply_shader(SkPaint* paint, int index) {
paint->setColor(SK_ColorBLUE);
}
-class TextEffectsGM : public skiagm::GM {
-public:
- TextEffectsGM() {}
-
-protected:
- SkString onShortName() override {
- return SkString("texteffects");
- }
-
- SkISize onISize() override {
- return SkISize::Make(460, 680);
- }
-
- void onDraw(SkCanvas* canvas) override {
+DEF_SIMPLE_GM(texteffects, canvas, 460, 680) {
canvas->save();
SkPaint paint;
@@ -208,13 +195,4 @@ protected:
}
canvas->restore();
- }
-
-private:
- typedef skiagm::GM INHERITED;
-};
-
-//////////////////////////////////////////////////////////////////////////////
-
-static skiagm::GM* MyFactory(void*) { return new TextEffectsGM; }
-static skiagm::GMRegistry reg(MyFactory);
+}
« no previous file with comments | « gm/textblobuseaftergpufree.cpp ('k') | gm/texturedomaineffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698