diff options
author | 2016-05-11 12:38:18 -0700 | |
---|---|---|
committer | 2016-05-11 12:38:18 -0700 | |
commit | 6296da736fbf40aae881650c239420f64e576c3f (patch) | |
tree | 5121ecf46ff7099d8eb66d2b2a4671d5ad94db89 /src/animator | |
parent | c8699321b924c1f284df93cb29b86000c1d73c0a (diff) |
Move SkTypeface to sk_sp.
Review-Url: https://codereview.chromium.org/1933393002
Diffstat (limited to 'src/animator')
-rw-r--r-- | src/animator/SkDrawPaint.cpp | 2 | ||||
-rw-r--r-- | src/animator/SkPaintPart.h | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/animator/SkDrawPaint.cpp b/src/animator/SkDrawPaint.cpp index 1336ea2dc4..1026630eb1 100644 --- a/src/animator/SkDrawPaint.cpp +++ b/src/animator/SkDrawPaint.cpp @@ -259,7 +259,7 @@ void SkDrawPaint::setupPaint(SkPaint* paint) const { if (typeface == nullptr) paint->setTypeface(nullptr); else if (typeface != (SkDrawTypeface*) -1) - SkSafeUnref(paint->setTypeface(typeface->getTypeface())); + paint->setTypeface(typeface->getTypeface()); if (underline != -1) paint->setUnderlineText(SkToBool(underline)); if (xfermode != -1) diff --git a/src/animator/SkPaintPart.h b/src/animator/SkPaintPart.h index a7e28ed3e2..5d94f049e8 100644 --- a/src/animator/SkPaintPart.h +++ b/src/animator/SkPaintPart.h @@ -62,8 +62,7 @@ class SkDrawTypeface : public SkPaintPart { #ifdef SK_DUMP_ENABLED void dump(SkAnimateMaker *) override; #endif - SkTypeface* getTypeface() { - return SkTypeface::CreateFromName(fontName.c_str(), style); } + sk_sp<SkTypeface> getTypeface() { return SkTypeface::MakeFromName(fontName.c_str(), style); } protected: bool add() override; SkString fontName; |