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

Unified Diff: skia/ext/skia_sandbox_support_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 | « skia/ext/skia_sandbox_support_win.h ('k') | skia/skia.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/skia_sandbox_support_win.cc
diff --git a/skia/ext/skia_sandbox_support_win.cc b/skia/ext/skia_sandbox_support_win.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f79fb695e7d5a0e793a4c24da09a7f351a9d0084
--- /dev/null
+++ b/skia/ext/skia_sandbox_support_win.cc
@@ -0,0 +1,24 @@
+// Copyright (c) 2006-2008 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 "skia_sandbox_support_win.h"
vandebo (ex-Chrome) 2011/11/22 22:17:13 nit: tools/sort-header.py says that this comes at
+#include "SkFontHost.h"
+#include "SkTypeface_win.h"
+
+static SkiaEnsureTypefaceAccessible g_skia_ensure_typeface_accessible = NULL;
+
+SK_API void SetSkiaEnsureTypefaceAccessible(SkiaEnsureTypefaceAccessible func) {
+ // This function is supposed to be called once in process life time.
vandebo (ex-Chrome) 2011/11/22 22:17:13 nit: This function should only be called once.
+ SkASSERT(g_skia_ensure_typeface_accessible == NULL);
+ g_skia_ensure_typeface_accessible = func;
+}
+
+// static
+void SkFontHost::EnsureTypefaceAccessible(const SkTypeface& typeface) {
+ if (g_skia_ensure_typeface_accessible) {
+ LOGFONT lf;
+ SkLOGFONTFromTypeface(&typeface, &lf);
+ g_skia_ensure_typeface_accessible(lf);
+ }
+}
« no previous file with comments | « skia/ext/skia_sandbox_support_win.h ('k') | skia/skia.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698