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

Unified Diff: skia/ext/SkFontHost_sandbox_win.cpp

Issue 8566026: Implement skia sandbox callback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and 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
Index: skia/ext/SkFontHost_sandbox_win.cpp
diff --git a/skia/ext/SkFontHost_sandbox_win.cpp b/skia/ext/SkFontHost_sandbox_win.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..1dcf06321c455782309c10bf7650972011f11f09
--- /dev/null
+++ b/skia/ext/SkFontHost_sandbox_win.cpp
@@ -0,0 +1,29 @@
+// 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 "SkFontHost.h"
+#include "SkTypeface.h"
+
+#ifdef WIN32
+
+#include "SkFontHost_sandbox_win.h"
+
+#include <windows.h>
+
+#include "SkTypeface_win.h"
+
+// static
+void SkFontHost::EnsureTypefaceAccessible(const SkTypeface& typeface) {
+ LOGFONT lf;
+ SkLOGFONTFromTypeface(&typeface, &lf);
+ skia::SandboxSupport::EnsureFontLoad(lf);
+}
+
+#else
+
+void SkFontHost::EnsureTypefaceAccessible(const SkTypeface& typeface) {
+ // No-op for all other platforms
+}
+
+#endif // WIN32

Powered by Google App Engine
This is Rietveld 408576698