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

Unified Diff: content/renderer/render_view_linux.cc

Issue 10540038: linux: Pass subpixel positioning setting to WebKit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/common/renderer_preferences.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_linux.cc
diff --git a/content/renderer/render_view_linux.cc b/content/renderer/render_view_linux.cc
index e48ba8ccd37e43a1e8af0f09c8839b5fe2152fc5..616fe455de85fc8aa139061e25a6b0e15592bc58 100644
--- a/content/renderer/render_view_linux.cc
+++ b/content/renderer/render_view_linux.cc
@@ -5,8 +5,10 @@
#include "content/renderer/render_view_impl.h"
#include "content/public/common/renderer_preferences.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/linux/WebFontInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/linux/WebFontRendering.h"
+using WebKit::WebFontInfo;
using WebKit::WebFontRendering;
static SkPaint::Hinting RendererPreferencesToSkiaHinting(
@@ -86,7 +88,7 @@ static bool RendererPreferencesToAntiAliasFlag(
return prefs.should_antialias_text;
}
-static bool RendererPreferencesToSubpixelGlyphsFlag(
+static bool RendererPreferencesToSubpixelRenderingFlag(
const content::RendererPreferences& prefs) {
if (prefs.subpixel_rendering !=
content::RENDERER_PREFERENCES_SUBPIXEL_RENDERING_SYSTEM_DEFAULT &&
@@ -94,18 +96,19 @@ static bool RendererPreferencesToSubpixelGlyphsFlag(
content::RENDERER_PREFERENCES_SUBPIXEL_RENDERING_NONE) {
return true;
}
-
return false;
}
void RenderViewImpl::UpdateFontRenderingFromRendererPrefs() {
const content::RendererPreferences& prefs = renderer_preferences_;
WebFontRendering::setHinting(RendererPreferencesToSkiaHinting(prefs));
- WebFontRendering::setLCDOrder(RendererPreferencesToSkiaLCDOrder(
- prefs.subpixel_rendering));
- WebFontRendering::setLCDOrientation(RendererPreferencesToSkiaLCDOrientation(
- prefs.subpixel_rendering));
+ WebFontRendering::setLCDOrder(
+ RendererPreferencesToSkiaLCDOrder(prefs.subpixel_rendering));
+ WebFontRendering::setLCDOrientation(
+ RendererPreferencesToSkiaLCDOrientation(prefs.subpixel_rendering));
WebFontRendering::setAntiAlias(RendererPreferencesToAntiAliasFlag(prefs));
- WebFontRendering::setSubpixelGlyphs(RendererPreferencesToSubpixelGlyphsFlag(
- prefs));
+ WebFontRendering::setSubpixelRendering(
+ RendererPreferencesToSubpixelRenderingFlag(prefs));
+ WebFontRendering::setSubpixelPositioning(prefs.use_subpixel_positioning);
+ WebFontInfo::setSubpixelPositioning(prefs.use_subpixel_positioning);
}
« no previous file with comments | « content/public/common/renderer_preferences.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698