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

Unified Diff: src/utils/SkWhitelistTypefaces.cpp

Issue 2343933002: Revert of SkFontData to use smart pointers. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « src/ports/SkFontMgr_win_dw.cpp ('k') | src/utils/mac/SkCreateCGImageRef.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkWhitelistTypefaces.cpp
diff --git a/src/utils/SkWhitelistTypefaces.cpp b/src/utils/SkWhitelistTypefaces.cpp
index 007def6d8be7f55836db5c581d6e5215a6ee5902..139e697ca08f4dd0eb540329ab446829dd3cbe64 100644
--- a/src/utils/SkWhitelistTypefaces.cpp
+++ b/src/utils/SkWhitelistTypefaces.cpp
@@ -63,7 +63,7 @@
}
static uint32_t compute_checksum(const SkTypeface* tf) {
- std::unique_ptr<SkFontData> fontData = tf->makeFontData();
+ SkFontData* fontData = tf->createFontData();
if (!fontData) {
return 0;
}
@@ -118,7 +118,7 @@
// Embed font data if it's a local font.
if (isLocal && !desc.hasFontData()) {
- desc.setFontData(tf->makeFontData());
+ desc.setFontData(tf->createFontData());
}
desc.serialize(wstream);
}
@@ -190,9 +190,9 @@
return nullptr;
}
- std::unique_ptr<SkFontData> data = desc.detachFontData();
+ SkFontData* data = desc.detachFontData();
if (data) {
- sk_sp<SkTypeface> typeface(SkTypeface::MakeFromFontData(std::move(data)));
+ sk_sp<SkTypeface> typeface(SkTypeface::MakeFromFontData(data));
if (typeface) {
return typeface;
}
« no previous file with comments | « src/ports/SkFontMgr_win_dw.cpp ('k') | src/utils/mac/SkCreateCGImageRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698