Index: content/test/layouttest_support.cc |
diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc |
index b33a505c83f6db0d1cb69dd8caf21cbc03ab46e0..afbcac700bc007371656207f6c535428bdfaf19e 100644 |
--- a/content/test/layouttest_support.cc |
+++ b/content/test/layouttest_support.cc |
@@ -37,9 +37,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 |
@@ -91,6 +91,13 @@ RenderFrameImpl* CreateWebFrameTestProxy( |
} |
#if defined(OS_WIN) |
+void DoPreSandboxWarmupForTypeface(SkTypeface* typeface) { |
ananta
2015/12/09 23:14:28
Why do we need this now?
Ilya Kulshin
2015/12/15 00:05:57
I thought it was needed at some point, but looks l
|
+ SkPaint paint_warmup; |
+ paint_warmup.setTypeface(typeface); |
+ wchar_t glyph = L'S'; |
+ paint_warmup.measureText(&glyph, sizeof(glyph)); |
+} |
+ |
// 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) { |
@@ -172,7 +179,7 @@ void EnableRendererLayoutTestMode() { |
#if defined(OS_WIN) |
if (gfx::win::ShouldUseDirectWrite()) |
- RegisterSideloadedTypefaces(GetPreSandboxWarmupFontMgr()); |
+ RegisterSideloadedTypefaces(SkFontMgr_New_DirectWrite()); |
#endif |
} |