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)); |