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

Side by Side Diff: skia/ext/fontmgr_default_win.cc

Issue 132113015: IPC interface for font management. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Match final interface and cleanup usage. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "third_party/skia/include/core/SkTypes.h"
6 #include "third_party/skia/include/ports/SkFontMgr.h"
7 #include "third_party/skia/include/ports/SkTypeface_win.h"
8
9 namespace {
10
11 static SkFontMgr* default_fontmgr = NULL;
12
13 }; // namespace
14
15 void SK_API SkSetFontMgr(SkFontMgr* fontmgr) {
16 ::default_fontmgr = SkRef(fontmgr);
17 }
18
19 SkFontMgr* SkFontMgr::Factory() {
20 if (::default_fontmgr) {
21 return SkRef(::default_fontmgr);
22 } else {
23 SkFontMgr* fontmgr = SkFontMgr_New_DirectWrite();
24 if (NULL == fontmgr) {
25 fontmgr = SkFontMgr_New_GDI();
26 }
27 return fontmgr;
28 }
29 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698