Chromium Code Reviews| 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 |
|
danakj
2015/12/11 22:44:02
Ya this works :)
|
| + // 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); |