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

Unified Diff: src/core/SkPictureData.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/core/SkPictureData.cpp
diff --git a/src/core/SkPictureData.cpp b/src/core/SkPictureData.cpp
index 4de1cc3cec9e03b683a2388ad2f0b0f6248a7eb6..b2932df71e87cf5c27b868002e108be8f306b3fe 100644
--- a/src/core/SkPictureData.cpp
+++ b/src/core/SkPictureData.cpp
@@ -406,13 +406,13 @@ bool SkPictureData::parseStreamTag(SkStream* stream,
const int count = SkToInt(size);
fTFPlayback.setCount(count);
for (int i = 0; i < count; i++) {
- SkAutoTUnref<SkTypeface> tf(SkTypeface::Deserialize(stream));
+ sk_sp<SkTypeface> tf(SkTypeface::MakeDeserialize(stream));
if (!tf.get()) { // failed to deserialize
// fTFPlayback asserts it never has a null, so we plop in
// the default here.
- tf.reset(SkTypeface::RefDefault());
+ tf = SkTypeface::MakeDefault();
}
- fTFPlayback.set(i, tf);
+ fTFPlayback.set(i, tf.get());
}
} break;
case SK_PICT_PICTURE_TAG: {

Powered by Google App Engine
This is Rietveld 408576698