Index: content/renderer/renderer_main_platform_delegate_win.cc |
diff --git a/content/renderer/renderer_main_platform_delegate_win.cc b/content/renderer/renderer_main_platform_delegate_win.cc |
index 67a563dd4578e5750a6b1c0da42066a3a3822dde..9392ae672fa5b549b9bd55d5a4ac27b26c45c488 100644 |
--- a/content/renderer/renderer_main_platform_delegate_win.cc |
+++ b/content/renderer/renderer_main_platform_delegate_win.cc |
@@ -12,6 +12,11 @@ |
#include "sandbox/src/sandbox.h" |
#include "unicode/timezone.h" |
+#if defined (USE_SKIA) |
vandebo (ex-Chrome)
2011/11/22 01:15:08
nit: defined(USE_SKIA)
arthurhsu
2011/11/22 18:10:47
Done.
|
+#include "content/public/renderer/render_thread.h" |
+#include "skia/ext/skia_sandbox_support_win.h" |
+#endif |
+ |
namespace { |
// In order to have Theme support, we need to connect to the theme service. |
@@ -59,6 +64,16 @@ void EnableThemeSupportForRenderer(bool no_sandbox) { |
} |
} |
+// Windows-only skia sandbox support |
+#if defined (USE_SKIA) |
+void skia_ensure_font_load(LOGFONT logfont) { |
vandebo (ex-Chrome)
2011/11/22 01:15:08
nit: match one of the names, i.e. either skia_pre_
jam
2011/11/22 01:21:23
chrome style is CamelCase
arthurhsu
2011/11/22 18:10:47
Done.
arthurhsu
2011/11/22 18:10:47
Done.
|
+ content::RenderThread* render_thread = content::RenderThread::Get(); |
+ if (render_thread) { |
+ render_thread->PreCacheFont(logfont); |
+ } |
+} |
+#endif |
+ |
} // namespace |
RendererMainPlatformDelegate::RendererMainPlatformDelegate( |
@@ -85,6 +100,9 @@ void RendererMainPlatformDelegate::PlatformInitialize() { |
// cached and there's no more need to access the registry. If the sandbox |
// is disabled, we don't have to make this dummy call. |
scoped_ptr<icu::TimeZone> zone(icu::TimeZone::createDefault()); |
+ if (!g_skia_sandbox_support) { |
+ g_skia_sandbox_support = skia_ensure_font_load; |
jam
2011/11/22 01:21:23
this won't work in the component build. you'd need
arthurhsu
2011/11/22 18:10:47
Done.
|
+ } |
} |
} |