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

Side by Side Diff: third_party/WebKit/Source/web/win/WebFontRendering.cpp

Issue 1691073002: Add plumbing in blink to allow overriding the skia font manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge to head Created 4 years, 10 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
OLDNEW
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::setUseDirectWrite(bool useDirectWrite) 12 void WebFontRendering::setUseDirectWrite(bool useDirectWrite)
13 { 13 {
14 FontCache::setUseDirectWrite(useDirectWrite); 14 FontCache::setUseDirectWrite(useDirectWrite);
15 } 15 }
16 16
17 // static 17 // static
18 void WebFontRendering::setDirectWriteFactory(IDWriteFactory* factory) 18 void WebFontRendering::setSkiaFontManager(SkFontMgr* fontMgr)
19 { 19 {
20 FontCache::setDirectWriteFactory(factory); 20 WTF::adopted(fontMgr);
21 FontCache::setFontManager(RefPtr<SkFontMgr>(fontMgr));
21 } 22 }
22 23
23 // static 24 // static
24 void WebFontRendering::setDeviceScaleFactor(float deviceScaleFactor) 25 void WebFontRendering::setDeviceScaleFactor(float deviceScaleFactor)
25 { 26 {
26 FontCache::setDeviceScaleFactor(deviceScaleFactor); 27 FontCache::setDeviceScaleFactor(deviceScaleFactor);
27 } 28 }
28 29
29 // static 30 // static
30 void WebFontRendering::setUseSubpixelPositioning(bool useSubpixelPositioning) 31 void WebFontRendering::setUseSubpixelPositioning(bool useSubpixelPositioning)
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 SkFontHost::SetSubpixelOrder(order); 63 SkFontHost::SetSubpixelOrder(order);
63 } 64 }
64 65
65 // static 66 // static
66 void WebFontRendering::setLCDOrientation(SkFontHost::LCDOrientation orientation) 67 void WebFontRendering::setLCDOrientation(SkFontHost::LCDOrientation orientation)
67 { 68 {
68 SkFontHost::SetSubpixelOrientation(orientation); 69 SkFontHost::SetSubpixelOrientation(orientation);
69 } 70 }
70 71
71 } // namespace blink 72 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698