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 "public/web/win/WebFontRendering.h" | 5 #include "public/web/win/WebFontRendering.h" |
6 | 6 |
7 #include "platform/fonts/FontCache.h" | 7 #include "platform/fonts/FontCache.h" |
8 | 8 |
9 namespace blink { | 9 namespace blink { |
10 | 10 |
11 // static | 11 // static |
12 void WebFontRendering::setSkiaFontManager(SkFontMgr* fontMgr) { | 12 void WebFontRendering::setSkiaFontManager(sk_sp<SkFontMgr> fontMgr) { |
13 WTF::adopted(fontMgr); | 13 FontCache::setFontManager(std::move(fontMgr)); |
14 FontCache::setFontManager(sk_ref_sp(fontMgr)); | |
15 } | 14 } |
16 | 15 |
17 // static | 16 // static |
18 void WebFontRendering::setDeviceScaleFactor(float deviceScaleFactor) { | 17 void WebFontRendering::setDeviceScaleFactor(float deviceScaleFactor) { |
19 FontCache::setDeviceScaleFactor(deviceScaleFactor); | 18 FontCache::setDeviceScaleFactor(deviceScaleFactor); |
20 } | 19 } |
21 | 20 |
22 // static | 21 // static |
23 void WebFontRendering::addSideloadedFontForTesting(SkTypeface* typeface) { | 22 void WebFontRendering::addSideloadedFontForTesting(SkTypeface* typeface) { |
24 FontCache::addSideloadedFontForTesting(typeface); | 23 FontCache::addSideloadedFontForTesting(typeface); |
(...skipping 26 matching lines...) Expand all Loading... |
51 void WebFontRendering::setLCDTextEnabled(bool enabled) { | 50 void WebFontRendering::setLCDTextEnabled(bool enabled) { |
52 FontCache::setLCDTextEnabled(enabled); | 51 FontCache::setLCDTextEnabled(enabled); |
53 } | 52 } |
54 | 53 |
55 // static | 54 // static |
56 void WebFontRendering::setUseSkiaFontFallback(bool useSkiaFontFallback) { | 55 void WebFontRendering::setUseSkiaFontFallback(bool useSkiaFontFallback) { |
57 FontCache::setUseSkiaFontFallback(useSkiaFontFallback); | 56 FontCache::setUseSkiaFontFallback(useSkiaFontFallback); |
58 } | 57 } |
59 | 58 |
60 } // namespace blink | 59 } // namespace blink |
OLD | NEW |