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

Unified Diff: src/animator/SkDrawPaint.cpp

Issue 1933393002: Move SkTypeface to sk_sp. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Make vc++ happy. Created 4 years, 8 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: src/animator/SkDrawPaint.cpp
diff --git a/src/animator/SkDrawPaint.cpp b/src/animator/SkDrawPaint.cpp
index 1336ea2dc429b0039b0ff1fcea3f745bef96b9e4..cdca9330ebf0f5cf598ffed5a7542465c23972a1 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(sk_ref_sp(typeface->getTypeface()));
tomhudson 2016/04/29 21:10:36 Let's have getTypeface() return sk_sp<> so we don'
bungeman-skia 2016/04/29 22:03:24 Done.
if (underline != -1)
paint->setUnderlineText(SkToBool(underline));
if (xfermode != -1)

Powered by Google App Engine
This is Rietveld 408576698