Index: content/renderer/renderer_main_platform_delegate_win.cc |
diff --git a/content/renderer/renderer_main_platform_delegate_win.cc b/content/renderer/renderer_main_platform_delegate_win.cc |
index 3cf583de27182d5a844e4528647fbbddf6b66fd0..8506755f481f89be1ae12902b71f785f89d2cf81 100644 |
--- a/content/renderer/renderer_main_platform_delegate_win.cc |
+++ b/content/renderer/renderer_main_platform_delegate_win.cc |
@@ -42,10 +42,15 @@ void SkiaPreCacheFont(const LOGFONT& logfont) { |
} |
void WarmupDirectWrite() { |
+ InitializeDirectWrite(); |
+} |
+ |
+void CreateDirectWriteGlobalFactory() { |
// The objects used here are intentionally not freed as we want the Skia |
// code to use these objects after warmup. |
SetDefaultSkiaFactory(GetPreSandboxWarmupFontMgr()); |
+#if 0 |
// We need to warm up *some* font for DirectWrite. We also need to pass one |
// down for the CC HUD code, so use the same one here. Note that we don't use |
// a monospace as would be nice in an attempt to avoid a small startup time |
@@ -54,6 +59,7 @@ void WarmupDirectWrite() { |
GetPreSandboxWarmupFontMgr()->legacyCreateTypeface("Times New Roman", 0)); |
DoPreSandboxWarmupForTypeface(hud_typeface.get()); |
gfx::SetHudTypeface(hud_typeface); |
+#endif |
} |
} // namespace |
@@ -109,7 +115,10 @@ bool RendererMainPlatformDelegate::EnableSandbox() { |
::GetUserDefaultLangID(); |
::GetUserDefaultLCID(); |
- target_services->LowerToken(); |
+ // target_services->LowerToken(); |
+ |
+ if (gfx::win::ShouldUseDirectWrite()) |
+ CreateDirectWriteGlobalFactory(); |
return true; |
} |
return false; |