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

Unified Diff: gm/fontscalerdistortable.cpp

Issue 1974783002: Revert of Move SkTypeface to sk_sp. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
Index: gm/fontscalerdistortable.cpp
diff --git a/gm/fontscalerdistortable.cpp b/gm/fontscalerdistortable.cpp
index b4f2ca370ce6175ec99027b682a4122e7fe04621..f83365bb3e59821dac80a97f0e896a2452dfdc95 100644
--- a/gm/fontscalerdistortable.cpp
+++ b/gm/fontscalerdistortable.cpp
@@ -58,8 +58,9 @@
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 } };
- paint.setTypeface(sk_sp<SkTypeface>(fontMgr->createFromStream(
- distortable->duplicate(), SkFontMgr::FontParameters().setAxes(axes, 1))));
+ SkAutoTUnref<SkTypeface> typeface(fontMgr->createFromStream(
+ distortable->duplicate(), SkFontMgr::FontParameters().setAxes(axes, 1)));
+ paint.setTypeface(typeface);
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') | src/ports/SkFontMgr_android.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698