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

Unified Diff: content/child/font_warmup_win.cc

Issue 2618443002: Remove use of legacy SkFontMgr factories. (Closed)
Patch Set: Address comments. Created 3 years, 11 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: content/child/font_warmup_win.cc
diff --git a/content/child/font_warmup_win.cc b/content/child/font_warmup_win.cc
index 739246ba781547d702775424b1152ffb3d02768c..99d013963c574278f4ae7b500a442fdc372f1e8d 100644
--- a/content/child/font_warmup_win.cc
+++ b/content/child/font_warmup_win.cc
@@ -416,7 +416,7 @@ void PatchServiceManagerCalls() {
GdiFontPatchData* PatchGdiFontEnumeration(const base::FilePath& path) {
if (!g_warmup_fontmgr)
- g_warmup_fontmgr = SkFontMgr_New_DirectWrite();
+ g_warmup_fontmgr = SkFontMgr_New_DirectWrite().release();
DCHECK(g_warmup_fontmgr);
return new GdiFontPatchDataImpl(path);
}
@@ -429,8 +429,9 @@ void ResetEmulatedGdiHandlesForTesting() {
g_fake_gdi_object_factory.Get().ResetObjectHandles();
}
-void SetPreSandboxWarmupFontMgrForTesting(SkFontMgr* fontmgr) {
- g_warmup_fontmgr = fontmgr;
+void SetPreSandboxWarmupFontMgrForTesting(sk_sp<SkFontMgr> fontmgr) {
+ SkSafeUnref(g_warmup_fontmgr);
+ g_warmup_fontmgr = fontmgr.release();
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698