| Index: content/test/layouttest_support.cc
|
| diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc
|
| index 62bba469e97851857a88e6072b37df39e60945f0..ad8e7e34347381023fd256a0bce6dba38f4fb416 100644
|
| --- a/content/test/layouttest_support.cc
|
| +++ b/content/test/layouttest_support.cc
|
| @@ -35,9 +35,9 @@
|
| #if defined(OS_MACOSX)
|
| #include "content/browser/frame_host/popup_menu_helper_mac.h"
|
| #elif defined(OS_WIN)
|
| -#include "content/common/font_warmup_win.h"
|
| #include "third_party/WebKit/public/web/win/WebFontRendering.h"
|
| #include "third_party/skia/include/ports/SkFontMgr.h"
|
| +#include "third_party/skia/include/ports/SkTypeface_win.h"
|
| #include "ui/gfx/win/direct_write.h"
|
| #endif
|
|
|
| @@ -89,6 +89,13 @@ RenderFrameImpl* CreateWebFrameTestProxy(
|
| }
|
|
|
| #if defined(OS_WIN)
|
| +void DoPreSandboxWarmupForTypeface(SkTypeface* typeface) {
|
| + SkPaint paint_warmup;
|
| + paint_warmup.setTypeface(typeface);
|
| + wchar_t glyph = L'S';
|
| + paint_warmup.measureText(&glyph, 2);
|
| +}
|
| +
|
| // DirectWrite only has access to %WINDIR%\Fonts by default. For developer
|
| // side-loading, support kRegisterFontFiles to allow access to additional fonts.
|
| void RegisterSideloadedTypefaces(SkFontMgr* fontmgr) {
|
| @@ -170,7 +177,7 @@ void EnableRendererLayoutTestMode() {
|
|
|
| #if defined(OS_WIN)
|
| if (gfx::win::ShouldUseDirectWrite())
|
| - RegisterSideloadedTypefaces(GetPreSandboxWarmupFontMgr());
|
| + RegisterSideloadedTypefaces(SkFontMgr_New_DirectWrite());
|
| #endif
|
| }
|
|
|
|
|