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..1dc79b53441cc20c0c851a1217853ea91dce9d2e |
--- /dev/null |
+++ b/skia/ext/skia_sandbox_support_win.cc |
@@ -0,0 +1,29 @@ |
+// 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 "build/build_config.h" |
+ |
+#if defined (OS_WIN) |
vandebo (ex-Chrome)
2011/11/22 18:23:41
You don't need this anymore since the file is _win
arthurhsu
2011/11/22 20:39:14
Done.
|
+ |
+#include <windows.h> |
+ |
+#include "SkPreConfig.h" |
+#include "skia_sandbox_support_win.h" |
+#include "SkFontHost.h" |
+#include "SkTypeface_win.h" |
+ |
+SK_API void SetSkiaEnsureTypefaceAccessible(SkiaEnsureTypefaceAccessible func) { |
+ g_skia_ensure_typeface_accessible = func; |
vandebo (ex-Chrome)
2011/11/22 18:23:41
dcheck that the static is currently NULL?
arthurhsu
2011/11/22 20:39:14
It can be non-NULL in component builds.
|
+} |
+ |
+// static |
+void SkFontHost::EnsureTypefaceAccessible(const SkTypeface& typeface) { |
+ if (g_skia_ensure_typeface_accessible) { |
+ LOGFONT lf; |
+ SkLOGFONTFromTypeface(&typeface, &lf); |
+ g_skia_ensure_typeface_accessible(lf); |
+ } |
+} |
+ |
+#endif // defined (OS_WIN) |