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

Unified Diff: content/renderer/renderer_main_platform_delegate_win.cc

Issue 1296223005: Continuing changes for lpc proxy Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 | « content/renderer/render_font_warmup_win.cc ('k') | sandbox/win/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « content/renderer/render_font_warmup_win.cc ('k') | sandbox/win/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698