diff options
author | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-19 01:20:12 +0000 |
---|---|---|
committer | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-19 01:20:12 +0000 |
commit | 1399f24ce315f875733ce548774a91d3f27b1f66 (patch) | |
tree | 6b83b65bba5555bda79f239c89ffc81c5868deb3 /content/renderer | |
parent | f1b75a3d17fb083d617ce6dc77b8ba8d728f9581 (diff) | |
download | chromium_src-1399f24ce315f875733ce548774a91d3f27b1f66.zip chromium_src-1399f24ce315f875733ce548774a91d3f27b1f66.tar.gz chromium_src-1399f24ce315f875733ce548774a91d3f27b1f66.tar.bz2 |
Customize SkFontMgr::Factory to control DirectWrite vs. GDI selection
Move SkFontMgr::Factory to skia/ext so that we can use the warmed-up
sandbox version when using DirectWrite that's created by content/. This
avoids the previous default behaviour of creating a GDI SkFontMgr which
is always wrong when DirectWrite is being used (and causes crashes
when --enable_win32k_renderer_lockdown is enabled).
R=jamesr@chromium.org,bungeman@google.com
BUG=385926,356950,385717
TEST=http://www.effectgames.com/demos/canvascycle/ http://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_canvas_filltext and enabling FPS in about:flags with both --enable_win32k_renderer_lockdown and --disable-direct-write
Review URL: https://codereview.chromium.org/344653002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278222 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer')
-rw-r--r-- | content/renderer/renderer_main_platform_delegate_win.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/content/renderer/renderer_main_platform_delegate_win.cc b/content/renderer/renderer_main_platform_delegate_win.cc index 1bbd705..8ec7bce 100644 --- a/content/renderer/renderer_main_platform_delegate_win.cc +++ b/content/renderer/renderer_main_platform_delegate_win.cc @@ -18,6 +18,7 @@ #include "content/public/renderer/render_thread.h" #include "content/renderer/render_thread_impl.h" #include "sandbox/win/src/sandbox.h" +#include "skia/ext/fontmgr_default_win.h" #include "skia/ext/vector_platform_device_emf_win.h" #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" #include "third_party/WebKit/public/web/win/WebFontRendering.h" @@ -60,6 +61,7 @@ void WarmupDirectWrite() { SkTypeface* typeface = GetPreSandboxWarmupFontMgr()->legacyCreateTypeface("Times New Roman", 0); DoPreSandboxWarmupForTypeface(typeface); + SetDefaultSkiaFactory(GetPreSandboxWarmupFontMgr()); } } // namespace |