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

Unified Diff: third_party/WebKit/Source/platform/fonts/win/FontFallbackWin.cpp

Issue 2290903002: Change (Pass)RefPtr<SkXxx> into sk_sp<SkXxx>. (Closed)
Patch Set: Rebasing... 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
Index: third_party/WebKit/Source/platform/fonts/win/FontFallbackWin.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/win/FontFallbackWin.cpp b/third_party/WebKit/Source/platform/fonts/win/FontFallbackWin.cpp
index 21dbcbfab0bd528c79b3fcbdf8d30b945d0b8381..6decd579867605f5496fb6276a086d17fa0087bd 100644
--- a/third_party/WebKit/Source/platform/fonts/win/FontFallbackWin.cpp
+++ b/third_party/WebKit/Source/platform/fonts/win/FontFallbackWin.cpp
@@ -47,13 +47,10 @@ namespace {
static inline bool isFontPresent(const UChar* fontName, SkFontMgr* fontManager)
{
String family = fontName;
- SkTypeface* typeface;
- typeface = fontManager->matchFamilyStyle(family.utf8().data(), SkFontStyle());
-
- if (!typeface)
+ sk_sp<SkTypeface> tf(fontManager->matchFamilyStyle(family.utf8().data(), SkFontStyle()));
+ if (!tf)
return false;
- RefPtr<SkTypeface> tf = adoptRef(typeface);
SkTypeface::LocalizedStrings* actualFamilies = tf->createFamilyNameIterator();
bool matchesRequestedFamily = false;
SkTypeface::LocalizedString actualFamily;

Powered by Google App Engine
This is Rietveld 408576698