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

Unified Diff: content/renderer/skia_sandbox_support_impl.cc

Issue 8566026: Implement skia sandbox callback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix errors in checkin 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
Index: content/renderer/skia_sandbox_support_impl.cc
diff --git a/content/renderer/skia_sandbox_support_impl.cc b/content/renderer/skia_sandbox_support_impl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..addf20c35b108085b1be02d37ce2c9bb06dd0484
--- /dev/null
+++ b/content/renderer/skia_sandbox_support_impl.cc
@@ -0,0 +1,36 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+//#include "content/renderer/skia_sandbox_support_impl.h"
vandebo (ex-Chrome) 2011/11/18 21:35:18 Remove commented lines.
arthurhsu 2011/11/22 00:56:23 File removed due to design change.
+//#include "content/renderer/render_thread.h"
+
+#include "content/renderer/skia_sandbox_support_impl.h"
+
+#if defined(OS_WIN) && defined(USE_SKIA)
+
+#include "content/public/renderer/render_thread.h"
+
+// static
+SkiaSandboxSupport* SkiaSandboxSupport::GetInstance() {
+ return Singleton<SkiaSandboxSupport>::get();
+}
+
+void SkiaSandboxSupport::EnsureFontLoad(LOGFONT logfont) {
+ content::RenderThread* render_thread = content::RenderThread::Get();
+ if (render_thread) {
+ render_thread->PreCacheFont(logfont);
+ }
+}
+
+SkiaSandboxSupport::SkiaSandboxSupport() {
+ skia::g_SkiaSandboxSupport = this;
+}
+
+SkiaSandboxSupport::~SkiaSandboxSupport() {
+ if (skia::g_SkiaSandboxSupport == this) {
+ skia::g_SkiaSandboxSupport = NULL;
+ }
+}
+
+#endif // defined(OS_WIN) && defined(USE_SKIA)

Powered by Google App Engine
This is Rietveld 408576698