OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "platform/fonts/FontCache.h" | 34 #include "platform/fonts/FontCache.h" |
35 #include "platform/fonts/FontDescription.h" | 35 #include "platform/fonts/FontDescription.h" |
36 #include "platform/fonts/linux/FontRenderStyle.h" | 36 #include "platform/fonts/linux/FontRenderStyle.h" |
37 | 37 |
38 using blink::FontDescription; | 38 using blink::FontDescription; |
39 using blink::FontPlatformData; | 39 using blink::FontPlatformData; |
40 | 40 |
41 namespace blink { | 41 namespace blink { |
42 | 42 |
43 // static | 43 // static |
44 void WebFontRendering::setSkiaFontManager(SkFontMgr* fontMgr) { | 44 void WebFontRendering::setSkiaFontManager(sk_sp<SkFontMgr> fontMgr) { |
45 WTF::adopted(fontMgr); | 45 FontCache::setFontManager(std::move(fontMgr)); |
46 FontCache::setFontManager(sk_ref_sp(fontMgr)); | |
47 } | 46 } |
48 | 47 |
49 // static | 48 // static |
50 void WebFontRendering::setHinting(SkPaint::Hinting hinting) { | 49 void WebFontRendering::setHinting(SkPaint::Hinting hinting) { |
51 FontRenderStyle::setHinting(hinting); | 50 FontRenderStyle::setHinting(hinting); |
52 } | 51 } |
53 | 52 |
54 // static | 53 // static |
55 void WebFontRendering::setAutoHint(bool useAutoHint) { | 54 void WebFontRendering::setAutoHint(bool useAutoHint) { |
56 FontRenderStyle::setAutoHint(useAutoHint); | 55 FontRenderStyle::setAutoHint(useAutoHint); |
(...skipping 23 matching lines...) Expand all Loading... |
80 void WebFontRendering::setDefaultFontSize(int size) { | 79 void WebFontRendering::setDefaultFontSize(int size) { |
81 LayoutThemeFontProvider::setDefaultFontSize(size); | 80 LayoutThemeFontProvider::setDefaultFontSize(size); |
82 } | 81 } |
83 | 82 |
84 // static | 83 // static |
85 void WebFontRendering::setSystemFontFamily(const WebString& name) { | 84 void WebFontRendering::setSystemFontFamily(const WebString& name) { |
86 FontCache::setSystemFontFamily(name); | 85 FontCache::setSystemFontFamily(name); |
87 } | 86 } |
88 | 87 |
89 } // namespace blink | 88 } // namespace blink |
OLD | NEW |