OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/gfx/win/direct_write.h" | 5 #include "ui/gfx/win/direct_write.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/debug/alias.h" |
8 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
9 #include "base/win/registry.h" | 10 #include "base/win/registry.h" |
10 #include "base/win/scoped_comptr.h" | 11 #include "base/win/scoped_comptr.h" |
11 #include "base/win/windows_version.h" | 12 #include "base/win/windows_version.h" |
12 #include "skia/ext/fontmgr_default_win.h" | 13 #include "skia/ext/fontmgr_default_win.h" |
13 #include "third_party/skia/include/ports/SkFontMgr.h" | 14 #include "third_party/skia/include/ports/SkFontMgr.h" |
14 #include "third_party/skia/include/ports/SkTypeface_win.h" | 15 #include "third_party/skia/include/ports/SkTypeface_win.h" |
15 #include "ui/gfx/platform_font_win.h" | 16 #include "ui/gfx/platform_font_win.h" |
16 #include "ui/gfx/switches.h" | 17 #include "ui/gfx/switches.h" |
17 | 18 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 sk_sp<SkFontMgr> direct_write_font_mgr = | 57 sk_sp<SkFontMgr> direct_write_font_mgr = |
57 SkFontMgr_New_DirectWrite(factory.get()); | 58 SkFontMgr_New_DirectWrite(factory.get()); |
58 if (!direct_write_font_mgr) | 59 if (!direct_write_font_mgr) |
59 return; | 60 return; |
60 SetDefaultSkiaFactory(std::move(direct_write_font_mgr)); | 61 SetDefaultSkiaFactory(std::move(direct_write_font_mgr)); |
61 gfx::PlatformFontWin::SetDirectWriteFactory(factory.get()); | 62 gfx::PlatformFontWin::SetDirectWriteFactory(factory.get()); |
62 } | 63 } |
63 | 64 |
64 } // namespace win | 65 } // namespace win |
65 } // namespace gfx | 66 } // namespace gfx |
OLD | NEW |