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

Unified Diff: chrome/browser/ui/views/tabs/tab_strip.cc

Issue 1506203008: Allow background tab titles to use LCD AA. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 5 years 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 | « chrome/browser/ui/views/autofill/card_unmask_prompt_views.cc ('k') | ui/compositor/compositing_recorder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/tab_strip.cc
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc
index 34f422f8b1236189025e3e56a860ac2d22e5997e..99b804179e95f6b799f31577b89dc624f6bb4b6e 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -1432,11 +1432,11 @@ void TabStrip::PaintChildren(const ui::PaintContext& context) {
Tabs selected_tabs;
{
- // TODO(pkasting): This results in greyscale AA for the tab titles. Work
- // with Mike Reed to fix, or else convert to passing the tabs a memory
- // canvas to paint on and then manually compositing.
+ // We pass false for |lcd_text_requires_opaque_layer| so that background
+ // tab titles will get LCD AA. These are rendered opaquely on an opaque tab
+ // background before the layer is composited, so this is safe.
ui::CompositingRecorder opacity_recorder(context, size(),
- GetInactiveAlpha(false));
+ GetInactiveAlpha(false), false);
PaintClosingTabs(tab_count(), context);
@@ -1493,8 +1493,10 @@ void TabStrip::PaintChildren(const ui::PaintContext& context) {
if (md && (newtab_button_->state() != views::CustomButton::STATE_PRESSED)) {
// Match the inactive tab opacity for non-pressed states. See comments in
// NewTabButton::PaintFill() for why we don't do this for the pressed state.
+ // This call doesn't need to set |lcd_text_requires_opaque_layer| to false
+ // because no text will be drawn.
ui::CompositingRecorder opacity_recorder(context, size(),
- GetInactiveAlpha(true));
+ GetInactiveAlpha(true), true);
newtab_button_->Paint(context);
} else {
newtab_button_->Paint(context);
« no previous file with comments | « chrome/browser/ui/views/autofill/card_unmask_prompt_views.cc ('k') | ui/compositor/compositing_recorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698