Index: samplecode/ClockFaceView.cpp |
diff --git a/samplecode/ClockFaceView.cpp b/samplecode/ClockFaceView.cpp |
index 7c6158ada3e9dcfe2d5afddb2089eefca5aed4cb..6e2b2b158519ef2acefcb126bc087c7c1d62d2f8 100644 |
--- a/samplecode/ClockFaceView.cpp |
+++ b/samplecode/ClockFaceView.cpp |
@@ -170,15 +170,19 @@ |
} |
class ClockFaceView : public SkView { |
- sk_sp<SkTypeface> fFace; |
+ SkTypeface* fFace; |
SkScalar fInterp; |
SkScalar fDx; |
public: |
ClockFaceView() { |
- fFace = SkTypeface::MakeFromFile("/Users/reed/Downloads/p052024l.pfb"); |
+ fFace = SkTypeface::CreateFromFile("/Users/reed/Downloads/p052024l.pfb"); |
fInterp = 0; |
fDx = SK_Scalar1/64; |
+ } |
+ |
+ virtual ~ClockFaceView() { |
+ SkSafeUnref(fFace); |
} |
protected: |
@@ -221,7 +225,8 @@ |
paint.setAntiAlias(true); |
paint.setTextSize(SkIntToScalar(240)); |
- paint.setTypeface(SkTypeface::MakeFromName("sans-serif", SkTypeface::kBold)); |
+ paint.setTypeface(SkTypeface::CreateFromName("sans-serif", |
+ SkTypeface::kBold)); |
SkString str("9"); |