OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
6 | 6 |
7 #include "content/public/common/renderer_preferences.h" | 7 #include "content/public/common/renderer_preferences.h" |
8 #include "third_party/WebKit/public/web/linux/WebFontRendering.h" | 8 #include "third_party/WebKit/public/web/linux/WebFontRendering.h" |
9 | 9 |
10 using WebKit::WebFontRendering; | 10 using blink::WebFontRendering; |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 static SkPaint::Hinting RendererPreferencesToSkiaHinting( | 14 static SkPaint::Hinting RendererPreferencesToSkiaHinting( |
15 const RendererPreferences& prefs) { | 15 const RendererPreferences& prefs) { |
16 if (!prefs.should_antialias_text) { | 16 if (!prefs.should_antialias_text) { |
17 // When anti-aliasing is off, GTK maps all non-zero hinting settings to | 17 // When anti-aliasing is off, GTK maps all non-zero hinting settings to |
18 // 'Normal' hinting so we do the same. Otherwise, folks who have 'Slight' | 18 // 'Normal' hinting so we do the same. Otherwise, folks who have 'Slight' |
19 // hinting selected will see readable text in everything expect Chromium. | 19 // hinting selected will see readable text in everything expect Chromium. |
20 switch (prefs.hinting) { | 20 switch (prefs.hinting) { |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 RendererPreferencesToSkiaLCDOrder(prefs.subpixel_rendering)); | 108 RendererPreferencesToSkiaLCDOrder(prefs.subpixel_rendering)); |
109 WebFontRendering::setLCDOrientation( | 109 WebFontRendering::setLCDOrientation( |
110 RendererPreferencesToSkiaLCDOrientation(prefs.subpixel_rendering)); | 110 RendererPreferencesToSkiaLCDOrientation(prefs.subpixel_rendering)); |
111 WebFontRendering::setAntiAlias(RendererPreferencesToAntiAliasFlag(prefs)); | 111 WebFontRendering::setAntiAlias(RendererPreferencesToAntiAliasFlag(prefs)); |
112 WebFontRendering::setSubpixelRendering( | 112 WebFontRendering::setSubpixelRendering( |
113 RendererPreferencesToSubpixelRenderingFlag(prefs)); | 113 RendererPreferencesToSubpixelRenderingFlag(prefs)); |
114 WebFontRendering::setSubpixelPositioning(prefs.use_subpixel_positioning); | 114 WebFontRendering::setSubpixelPositioning(prefs.use_subpixel_positioning); |
115 } | 115 } |
116 | 116 |
117 } // namespace content | 117 } // namespace content |
OLD | NEW |