Index: gm/stroketext.cpp |
diff --git a/gm/stroketext.cpp b/gm/stroketext.cpp |
index 75ce164bcf733fed37cf96d6896a96dd5df18986..d0a9882256ba5a12fb0cb0badd3bd91a63a57eb7 100644 |
--- a/gm/stroketext.cpp |
+++ b/gm/stroketext.cpp |
@@ -59,28 +59,14 @@ static void draw_text_set(SkCanvas* canvas, const SkPaint& paint) { |
draw_text_stroked(canvas, p, 10); |
} |
-class StrokeTextGM : public skiagm::GM { |
- // Skia has a threshold above which it draws text via paths instead of using scalercontext |
- // and caching the glyph. This GM wants to ensure that we draw stroking correctly on both |
- // sides of this threshold. |
+namespace { |
enum { |
kBelowThreshold_TextSize = 255, |
kAboveThreshold_TextSize = 257 |
}; |
-public: |
- StrokeTextGM() {} |
- |
-protected: |
- |
- SkString onShortName() override { |
- return SkString("stroketext"); |
- } |
- |
- SkISize onISize() override { |
- return SkISize::Make(1200, 480); |
- } |
+} |
- void onDraw(SkCanvas* canvas) override { |
+DEF_SIMPLE_GM(stroketext, canvas, 1200, 480) { |
if (true) { test_nulldev(canvas); } |
SkPaint paint; |
paint.setAntiAlias(true); |
@@ -92,10 +78,4 @@ protected: |
canvas->translate(600, 0); |
paint.setTextSize(kAboveThreshold_TextSize); |
draw_text_set(canvas, paint); |
- } |
- |
-private: |
- typedef skiagm::GM INHERITED; |
-}; |
- |
-DEF_GM(return new StrokeTextGM;) |
+} |