Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Unified Diff: content/renderer/renderer_main_platform_delegate_win.cc

Issue 8566026: Implement skia sandbox callback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update per code review Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | skia/ext/skia_sandbox_support_win.h » ('j') | skia/ext/skia_sandbox_support_win.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
+ }
}
}
« no previous file with comments | « no previous file | skia/ext/skia_sandbox_support_win.h » ('j') | skia/ext/skia_sandbox_support_win.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698