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

Unified Diff: skia/ext/fontmgr_default_ipc.cc

Issue 132113015: IPC interface for font management. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Checkpoint Created 6 years, 9 months 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/fontmgr_default_ipc.cc
===================================================================
--- skia/ext/fontmgr_default_ipc.cc (revision 0)
+++ skia/ext/fontmgr_default_ipc.cc (working copy)
@@ -0,0 +1,23 @@
+// Copyright (c) 2014 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 "third_party/skia/include/core/SkTypes.h"
+#include "third_party/skia/include/ports/SkFontMgr.h"
+#include "third_party/skia/include/ports/SkTypeface_win.h"
+
+static SkFontMgr* gSkFontMgr = NULL;
brettw 2014/03/11 21:38:15 Can this be in an anon namespace to avoid exportin
bungeman-chromium 2014/03/13 22:33:31 Done. This (and the rest of the machinery around t
+
+void SK_API SkSetFontMgr(SkFontMgr* fontmgr) {
+ gSkFontMgr = fontmgr;
+}
+
+SkFontMgr* SkFontMgr::Factory() {
+ // We cannot directly 'new skia::FontMgrProxy_DirectWrite()'.
+ // The proxy lives in content_common, since content_common depends on skia.
+ if (gSkFontMgr) {
+ return gSkFontMgr;
+ } else {
+ return SkFontMgr_New_DirectWrite();
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698