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

Unified Diff: src/ports/SkFontMgr_android.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
« no previous file with comments | « src/pdf/SkPDFFont.cpp ('k') | src/svg/SkSVGDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontMgr_android.cpp
diff --git a/src/ports/SkFontMgr_android.cpp b/src/ports/SkFontMgr_android.cpp
index 3e6e0da18ae3913febe5f6819f30e9ab940ee779..4aea047cdeee106cbffc401d4217fb638d8d0ad4 100644
--- a/src/ports/SkFontMgr_android.cpp
+++ b/src/ports/SkFontMgr_android.cpp
@@ -371,7 +371,7 @@
{
for (int i = 0; i < fallbackNameToFamilyMap.count(); ++i) {
SkFontStyleSet_Android* family = fallbackNameToFamilyMap[i].styleSet;
- sk_sp<SkTypeface_AndroidSystem> face(family->matchStyle(style));
+ SkAutoTUnref<SkTypeface_AndroidSystem> face(family->matchStyle(style));
if (!langTag.isEmpty() && !face->fLang.getTag().startsWith(langTag.c_str())) {
continue;
@@ -387,6 +387,9 @@
uint16_t glyphID;
paint.textToGlyphs(&character, sizeof(character), &glyphID);
tomhudson 2016/05/12 13:29:39 Looks like we accidentally omitted the return stat
+ if (glyphID != 0) {
+ return face.release();
+ }
}
return nullptr;
}
« no previous file with comments | « src/pdf/SkPDFFont.cpp ('k') | src/svg/SkSVGDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698