OLD | NEW |
---|---|
(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 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
| |
10 | |
11 void SK_API SkSetFontMgr(SkFontMgr* fontmgr) { | |
12 gSkFontMgr = fontmgr; | |
13 } | |
14 | |
15 SkFontMgr* SkFontMgr::Factory() { | |
16 // We cannot directly 'new skia::FontMgrProxy_DirectWrite()'. | |
17 // The proxy lives in content_common, since content_common depends on skia. | |
18 if (gSkFontMgr) { | |
19 return gSkFontMgr; | |
20 } else { | |
21 return SkFontMgr_New_DirectWrite(); | |
22 } | |
23 } | |
OLD | NEW |