summaryrefslogtreecommitdiffstats
path: root/ui/gfx/render_text_win.cc
diff options
context:
space:
mode:
authorderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-28 21:50:22 +0000
committerderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-28 21:50:22 +0000
commit32d582db027b7388280fe78f8e4c9181c2175022 (patch)
tree5efecb17c31ab036bf59b02cca0929c507de87e3 /ui/gfx/render_text_win.cc
parent68a40ca0c8ea2118b4f965a95c758995e0ae4430 (diff)
downloadchromium_src-32d582db027b7388280fe78f8e4c9181c2175022.zip
chromium_src-32d582db027b7388280fe78f8e4c9181c2175022.tar.gz
chromium_src-32d582db027b7388280fe78f8e4c9181c2175022.tar.bz2
Disable subpixel rendering for transparent textfields.
This updates gfx::RenderText to disable subpixel rendering when we're using it to draw into a views::Textfield with a non-opaque background. BUG=115198 TEST=manual: applied in-progress aura applist search patch and checked that we don't use subpixel rendering for it (but we _do_ still use it for the omnibox) Review URL: http://codereview.chromium.org/9480018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124033 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/render_text_win.cc')
-rw-r--r--ui/gfx/render_text_win.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/gfx/render_text_win.cc b/ui/gfx/render_text_win.cc
index ae31475..05ed0ab 100644
--- a/ui/gfx/render_text_win.cc
+++ b/ui/gfx/render_text_win.cc
@@ -482,7 +482,8 @@ void RenderTextWin::DrawVisualText(Canvas* canvas) {
bool cleartype_enabled;
GetCachedFontSmoothingSettings(&smoothing_enabled, &cleartype_enabled);
// Note that |cleartype_enabled| corresponds to Skia's |enable_lcd_text|.
- renderer.SetFontSmoothingSettings(smoothing_enabled, cleartype_enabled);
+ renderer.SetFontSmoothingSettings(
+ smoothing_enabled, cleartype_enabled && !background_is_transparent());
for (size_t i = 0; i < runs_.size(); ++i) {
// Get the run specified by the visual-to-logical map.