aboutsummaryrefslogtreecommitdiffstats
path: root/gm/samplerstress.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gm/samplerstress.cpp')
-rw-r--r--gm/samplerstress.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/gm/samplerstress.cpp b/gm/samplerstress.cpp
index 5f41f3dbf8..2e435a3313 100644
--- a/gm/samplerstress.cpp
+++ b/gm/samplerstress.cpp
@@ -95,10 +95,9 @@ protected:
// stipple mask with a round rect soft clip
SkPaint paint;
paint.setAntiAlias(true);
- paint.setTextSize(72);
paint.setShader(fShader);
paint.setMaskFilter(fMaskFilter);
- sk_tool_utils::set_portable_typeface(&paint);
+ SkFont font(sk_tool_utils::create_portable_typeface(), 72);
SkRect temp;
temp.set(SkIntToScalar(115),
@@ -111,9 +110,7 @@ protected:
canvas->clipPath(path, true); // AA is on
- canvas->drawString("M",
- SkIntToScalar(100), SkIntToScalar(100),
- paint);
+ canvas->drawString("M", 100.0f, 100.0f, font, paint);
canvas->restore();
@@ -122,13 +119,9 @@ protected:
SkPaint paint2;
paint2.setColor(SK_ColorBLACK);
paint2.setAntiAlias(true);
- paint2.setTextSize(72);
paint2.setStyle(SkPaint::kStroke_Style);
paint2.setStrokeWidth(1);
- sk_tool_utils::set_portable_typeface(&paint2);
- canvas->drawString("M",
- SkIntToScalar(100), SkIntToScalar(100),
- paint2);
+ canvas->drawString("M", 100.0f, 100.0f, font, paint2);
paint2.setColor(SK_ColorGRAY);