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

Unified Diff: gm/largeglyphblur.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/inversepaths.cpp ('k') | gm/lerpmode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/largeglyphblur.cpp
diff --git a/gm/largeglyphblur.cpp b/gm/largeglyphblur.cpp
index b74f9024b83d3570ed259d722c12ba8ef962b9b2..a4c112328d1e3d7afe2f5ae6c9117f4dc0b94c09 100644
--- a/gm/largeglyphblur.cpp
+++ b/gm/largeglyphblur.cpp
@@ -14,21 +14,7 @@
// This test ensures that glyphs whose point size is less than the SkGlyphCache's maxmium, but
// who have a large blur, are still handled correctly
-namespace skiagm {
-class LargeGlyphBlur : public GM {
-public:
- LargeGlyphBlur() {}
-
-protected:
- SkString onShortName() override {
- return SkString("largeglyphblur");
- }
-
- SkISize onISize() override {
- return SkISize::Make(kWidth, kHeight);
- }
-
- void onDraw(SkCanvas* canvas) override {
+DEF_SIMPLE_GM(largeglyphblur, canvas, 1920, 600) {
const char text[] = "Hamburgefons";
SkPaint paint;
@@ -54,16 +40,4 @@ protected:
size_t len = strlen(text);
canvas->drawText(text, len, 10, 500, blurPaint);
canvas->drawText(text, len, 10, 500, paint);
- }
-
-private:
- static const int kWidth = 1920;
- static const int kHeight = 600;
-
- typedef GM INHERITED;
-};
-
-//////////////////////////////////////////////////////////////////////////////
-
-DEF_GM(return new LargeGlyphBlur;)
}
« no previous file with comments | « gm/inversepaths.cpp ('k') | gm/lerpmode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698