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

Unified Diff: content/ppapi_plugin/ppapi_plugin_main.cc

Issue 1845063002: Revert of Remove font cache code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/content_tests.gypi ('k') | content/public/common/dwrite_font_platform_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/ppapi_plugin/ppapi_plugin_main.cc
diff --git a/content/ppapi_plugin/ppapi_plugin_main.cc b/content/ppapi_plugin/ppapi_plugin_main.cc
index f2c10a8049aeec1a66981bfa5b9d5b7339674588..956940366c3a3ec84d9e43b4e80be6ef3bf40031 100644
--- a/content/ppapi_plugin/ppapi_plugin_main.cc
+++ b/content/ppapi_plugin/ppapi_plugin_main.cc
@@ -29,6 +29,8 @@
#include "base/win/win_util.h"
#include "base/win/windows_version.h"
#include "content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.h"
+#include "content/child/font_warmup_win.h"
+#include "content/public/common/dwrite_font_platform_win.h"
#include "sandbox/win/src/sandbox.h"
#include "third_party/WebKit/public/web/win/WebFontRendering.h"
#include "third_party/skia/include/ports/SkTypeface_win.h"
@@ -140,9 +142,13 @@
gfx::win::MaybeInitializeDirectWrite();
bool use_direct_write = gfx::win::IsDirectWriteEnabled();
if (use_direct_write) {
- InitializeDWriteFontProxy(
- base::Bind(&ppapi::proxy::PluginGlobals::GetBrowserSender,
- base::Unretained(ppapi::proxy::PluginGlobals::Get())));
+ if (ShouldUseDirectWriteFontProxyFieldTrial()) {
+ InitializeDWriteFontProxy(
+ base::Bind(&ppapi::proxy::PluginGlobals::GetBrowserSender,
+ base::Unretained(ppapi::proxy::PluginGlobals::Get())));
+ } else {
+ WarmupDirectWrite();
+ }
} else {
SkTypeface_SetEnsureLOGFONTAccessibleProc(SkiaPreCacheFont);
}
@@ -154,7 +160,8 @@
main_message_loop.Run();
#if defined(OS_WIN)
- UninitializeDWriteFontProxy();
+ if (ShouldUseDirectWriteFontProxyFieldTrial())
+ UninitializeDWriteFontProxy();
#endif
return 0;
}
« no previous file with comments | « content/content_tests.gypi ('k') | content/public/common/dwrite_font_platform_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698