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

Unified Diff: content/child/dwrite_font_proxy/dwrite_font_proxy_init_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/dwrite_font_proxy/dwrite_font_proxy_init_win.cc
diff --git a/content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.cc b/content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.cc
index 5708d60caa65511fa862ea0787649258d8e46a6d..9ac9311d8d0d0788972ff39ad98c47c04afd8580 100644
--- a/content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.cc
+++ b/content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.cc
@@ -70,14 +70,11 @@ void InitializeDWriteFontProxy() {
&font_fallback, g_font_collection.Get(), sender);
}
- sk_sp<SkFontMgr> skia_font_manager(SkFontMgr_New_DirectWrite(
- factory.Get(), g_font_collection.Get(), font_fallback.Get()));
- blink::WebFontRendering::setSkiaFontManager(skia_font_manager.get());
-
- // Add an extra ref for SetDefaultSkiaFactory, which keeps a ref but doesn't
- // addref.
- skia_font_manager->ref();
- SetDefaultSkiaFactory(skia_font_manager.get());
+ sk_sp<SkFontMgr> skia_font_manager = SkFontMgr_New_DirectWrite(
+ factory.Get(), g_font_collection.Get(), font_fallback.Get());
+ blink::WebFontRendering::setSkiaFontManager(skia_font_manager);
+
+ SetDefaultSkiaFactory(std::move(skia_font_manager));
// When IDWriteFontFallback is not available (prior to Win8.1) Skia will
// still attempt to use DirectWrite to determine fallback fonts (in

Powered by Google App Engine
This is Rietveld 408576698