summaryrefslogtreecommitdiffstats
path: root/ui/gfx/render_text.h
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.h
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.h')
-rw-r--r--ui/gfx/render_text.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h
index 2498bcb..84e5b79 100644
--- a/ui/gfx/render_text.h
+++ b/ui/gfx/render_text.h
@@ -161,6 +161,11 @@ class UI_EXPORT RenderText {
void set_fade_tail(bool fade_tail) { fade_tail_ = fade_tail; }
bool fade_tail() const { return fade_tail_; }
+ bool background_is_transparent() const { return background_is_transparent_; }
+ void set_background_is_transparent(bool transparent) {
+ background_is_transparent_ = transparent;
+ }
+
// This cursor position corresponds to SelectionModel::selection_end. In
// addition to representing the selection end, it's also where logical text
// edits take place, and doesn't necessarily correspond to
@@ -415,6 +420,9 @@ class UI_EXPORT RenderText {
bool fade_head_;
bool fade_tail_;
+ // Is the background transparent (either partially or fully)?
+ bool background_is_transparent_;
+
// The local display area for rendering the text.
Rect display_rect_;