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

Unified Diff: src/ports/SkFontMgr_android.cpp

Issue 2206633004: Move off SK_SUPPORT_LEGACY_DATA_FACTORIES. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Gotta catch 'em all. Created 4 years, 4 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/ports/SkFontMgr_android.cpp
diff --git a/src/ports/SkFontMgr_android.cpp b/src/ports/SkFontMgr_android.cpp
index 23c950d01d2f53dc297b2a6ba8c16d6932dce717..94d114d07a48bd2e78f3c251afac0d4e0aa9272b 100644
--- a/src/ports/SkFontMgr_android.cpp
+++ b/src/ports/SkFontMgr_android.cpp
@@ -75,8 +75,8 @@ public:
SkStreamAsset* createStream() const {
if (fFile) {
- SkData* data = SkData::NewFromFILE(fFile);
- return data ? new SkMemoryStream(data) : nullptr;
+ sk_sp<SkData> data(SkData::MakeFromFILE(fFile));
+ return data ? new SkMemoryStream(std::move(data)) : nullptr;
}
return SkStream::NewFromFile(fPathName.c_str());
}

Powered by Google App Engine
This is Rietveld 408576698