| 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;
|
| }
|
|
|