| 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/Source/WebKit/chromium/public/linux/WebFontInfo.h" | 8 #include "third_party/WebKit/Source/WebKit/chromium/public/linux/WebFontInfo.h" |
| 9 #include "third_party/WebKit/Source/WebKit/chromium/public/linux/WebFontRenderin
g.h" | 9 #include "third_party/WebKit/Source/WebKit/chromium/public/linux/WebFontRenderin
g.h" |
| 10 | 10 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 prefs.subpixel_rendering != | 95 prefs.subpixel_rendering != |
| 96 content::RENDERER_PREFERENCES_SUBPIXEL_RENDERING_NONE) { | 96 content::RENDERER_PREFERENCES_SUBPIXEL_RENDERING_NONE) { |
| 97 return true; | 97 return true; |
| 98 } | 98 } |
| 99 return false; | 99 return false; |
| 100 } | 100 } |
| 101 | 101 |
| 102 void RenderViewImpl::UpdateFontRenderingFromRendererPrefs() { | 102 void RenderViewImpl::UpdateFontRenderingFromRendererPrefs() { |
| 103 const content::RendererPreferences& prefs = renderer_preferences_; | 103 const content::RendererPreferences& prefs = renderer_preferences_; |
| 104 WebFontRendering::setHinting(RendererPreferencesToSkiaHinting(prefs)); | 104 WebFontRendering::setHinting(RendererPreferencesToSkiaHinting(prefs)); |
| 105 WebFontRendering::setAutoHint(prefs.use_autohinter); |
| 106 WebFontRendering::setUseBitmaps(prefs.use_bitmaps); |
| 105 WebFontRendering::setLCDOrder( | 107 WebFontRendering::setLCDOrder( |
| 106 RendererPreferencesToSkiaLCDOrder(prefs.subpixel_rendering)); | 108 RendererPreferencesToSkiaLCDOrder(prefs.subpixel_rendering)); |
| 107 WebFontRendering::setLCDOrientation( | 109 WebFontRendering::setLCDOrientation( |
| 108 RendererPreferencesToSkiaLCDOrientation(prefs.subpixel_rendering)); | 110 RendererPreferencesToSkiaLCDOrientation(prefs.subpixel_rendering)); |
| 109 WebFontRendering::setAntiAlias(RendererPreferencesToAntiAliasFlag(prefs)); | 111 WebFontRendering::setAntiAlias(RendererPreferencesToAntiAliasFlag(prefs)); |
| 110 WebFontRendering::setSubpixelRendering( | 112 WebFontRendering::setSubpixelRendering( |
| 111 RendererPreferencesToSubpixelRenderingFlag(prefs)); | 113 RendererPreferencesToSubpixelRenderingFlag(prefs)); |
| 112 WebFontRendering::setSubpixelPositioning(prefs.use_subpixel_positioning); | 114 WebFontRendering::setSubpixelPositioning(prefs.use_subpixel_positioning); |
| 113 WebFontInfo::setSubpixelPositioning(prefs.use_subpixel_positioning); | |
| 114 } | 115 } |
| OLD | NEW |