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

Unified Diff: gm/glyph_pos.cpp

Issue 1243493003: make glyph_pos imageblur* largeglyphblur portable (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove unused field Created 5 years, 5 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 | « no previous file | gm/imageblur.cpp » ('j') | gm/imageblur.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/glyph_pos.cpp
diff --git a/gm/glyph_pos.cpp b/gm/glyph_pos.cpp
index 16cdfca11a8a0fda5c66d3b44395a6ae534e566c..90329ed7fdc530982224b0d51cf9e49d2f445f9c 100644
--- a/gm/glyph_pos.cpp
+++ b/gm/glyph_pos.cpp
@@ -48,9 +48,6 @@ protected:
SkISize onISize() override { return SkISize::Make(800, 600); }
void onDraw(SkCanvas* canvas) override {
- if (!fProp) {
- fProp.reset(sk_tool_utils::create_portable_typeface("Helvetica", SkTypeface::kNormal));
- }
// There's a black pixel at 40, 40 for reference.
canvas->drawPoint(40.0f, 40.0f, SK_ColorBLACK);
@@ -108,8 +105,7 @@ protected:
paint.setColor(SK_ColorBLACK);
paint.setAntiAlias(true);
paint.setTextSize(kTextHeight * textScale);
- paint.setTypeface(fProp);
- paint.setDevKernText(true);
+ sk_tool_utils::set_portable_typeface_always(&paint);
paint.setStrokeWidth(fStrokeWidth);
paint.setStyle(fStrokeStyle);
@@ -158,7 +154,6 @@ protected:
}
private:
- SkAutoTUnref<SkTypeface> fProp;
SkScalar fStrokeWidth;
SkPaint::Style fStrokeStyle;
« no previous file with comments | « no previous file | gm/imageblur.cpp » ('j') | gm/imageblur.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698