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

Unified Diff: src/core/SkPictureData.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: src/core/SkPictureData.cpp
diff --git a/src/core/SkPictureData.cpp b/src/core/SkPictureData.cpp
index 873c0c4a1d913c9e78205273bde25ef14aad721e..ed32c6c029f498e45aa1d06859043d70b2e7c7e7 100644
--- a/src/core/SkPictureData.cpp
+++ b/src/core/SkPictureData.cpp
@@ -405,13 +405,13 @@
const int count = SkToInt(size);
fTFPlayback.setCount(count);
for (int i = 0; i < count; i++) {
- sk_sp<SkTypeface> tf(SkTypeface::MakeDeserialize(stream));
+ SkAutoTUnref<SkTypeface> tf(SkTypeface::Deserialize(stream));
if (!tf.get()) { // failed to deserialize
// fTFPlayback asserts it never has a null, so we plop in
// the default here.
- tf = SkTypeface::MakeDefault();
+ tf.reset(SkTypeface::RefDefault());
}
- fTFPlayback.set(i, tf.get());
+ fTFPlayback.set(i, tf);
}
} break;
case SK_PICT_PICTURE_TAG: {
« no previous file with comments | « src/core/SkPaint.cpp ('k') | src/core/SkTextBlob.cpp » ('j') | src/ports/SkFontMgr_android.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698