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

Unified Diff: gm/fontscalerdistortable.cpp

Issue 1933393002: Move SkTypeface to sk_sp. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Restore deleted Android code. Created 4 years, 7 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/fontmgr.cpp ('k') | gm/gammatext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/fontscalerdistortable.cpp
diff --git a/gm/fontscalerdistortable.cpp b/gm/fontscalerdistortable.cpp
index f83365bb3e59821dac80a97f0e896a2452dfdc95..b4f2ca370ce6175ec99027b682a4122e7fe04621 100644
--- a/gm/fontscalerdistortable.cpp
+++ b/gm/fontscalerdistortable.cpp
@@ -58,9 +58,8 @@ protected:
SkFourByteTag tag = SkSetFourByteTag('w','g','h','t');
SkScalar styleValue = SkDoubleToScalar(0.5 + (5*j + i) * ((2.0 - 0.5) / (2 * 5)));
SkFontMgr::FontParameters::Axis axes[] = { { tag, styleValue } };
- SkAutoTUnref<SkTypeface> typeface(fontMgr->createFromStream(
- distortable->duplicate(), SkFontMgr::FontParameters().setAxes(axes, 1)));
- paint.setTypeface(typeface);
+ paint.setTypeface(sk_sp<SkTypeface>(fontMgr->createFromStream(
+ distortable->duplicate(), SkFontMgr::FontParameters().setAxes(axes, 1))));
SkAutoCanvasRestore acr(canvas, true);
canvas->translate(SkIntToScalar(30 + i * 100), SkIntToScalar(20));
« no previous file with comments | « gm/fontmgr.cpp ('k') | gm/gammatext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698