OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/renderer/render_view.h" | 5 #include "chrome/renderer/render_view.h" |
6 | 6 |
7 #include "chrome/common/renderer_preferences.h" | 7 #include "chrome/common/renderer_preferences.h" |
8 #include "webkit/api/public/linux/WebFontRendering.h" | 8 #include "third_party/WebKit/WebKit/chromium/public/linux/WebFontRendering.h" |
9 | 9 |
10 using WebKit::WebFontRendering; | 10 using WebKit::WebFontRendering; |
11 | 11 |
12 static SkPaint::Hinting RendererPreferencesToSkiaHinting( | 12 static SkPaint::Hinting RendererPreferencesToSkiaHinting( |
13 const RendererPreferences& prefs) { | 13 const RendererPreferences& prefs) { |
14 if (!prefs.should_antialias_text) { | 14 if (!prefs.should_antialias_text) { |
15 // When anti-aliasing is off, GTK maps all non-zero hinting settings to | 15 // When anti-aliasing is off, GTK maps all non-zero hinting settings to |
16 // 'Normal' hinting so we do the same. Otherwise, folks who have 'Slight' | 16 // 'Normal' hinting so we do the same. Otherwise, folks who have 'Slight' |
17 // hinting selected will see readable text in everything expect Chromium. | 17 // hinting selected will see readable text in everything expect Chromium. |
18 switch (prefs.hinting) { | 18 switch (prefs.hinting) { |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 WebFontRendering::setHinting( | 103 WebFontRendering::setHinting( |
104 RendererPreferencesToSkiaHinting(prefs)); | 104 RendererPreferencesToSkiaHinting(prefs)); |
105 WebFontRendering::setLCDOrder( | 105 WebFontRendering::setLCDOrder( |
106 RendererPreferencesToSkiaLCDOrder(prefs.subpixel_rendering)); | 106 RendererPreferencesToSkiaLCDOrder(prefs.subpixel_rendering)); |
107 WebFontRendering::setLCDOrientation( | 107 WebFontRendering::setLCDOrientation( |
108 RendererPreferencesToSkiaLCDOrientation(prefs.subpixel_rendering)); | 108 RendererPreferencesToSkiaLCDOrientation(prefs.subpixel_rendering)); |
109 WebFontRendering::setAntiAlias(RendererPreferencesToAntiAliasFlag(prefs)); | 109 WebFontRendering::setAntiAlias(RendererPreferencesToAntiAliasFlag(prefs)); |
110 WebFontRendering::setSubpixelGlyphs( | 110 WebFontRendering::setSubpixelGlyphs( |
111 RendererPreferencesToSubpixelGlyphsFlag(prefs)); | 111 RendererPreferencesToSubpixelGlyphsFlag(prefs)); |
112 } | 112 } |
OLD | NEW |