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

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

Issue 2639203007: Update SetPaintToLayer to accept LayerType (Closed)
Patch Set: address comments Created 3 years, 11 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
Index: chrome/browser/ui/views/tabs/tab.cc
diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc
index c209ad6a300d788c59ae178115072fa0212430a4..0db2a07f94d7a9044474e3963d344c9831ea47fe 100644
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -1458,10 +1458,12 @@ void Tab::AdvanceLoadingAnimation() {
// when possible to reduce repaint overhead.
const bool paint_to_layer = controller_->CanPaintThrobberToLayer();
if (paint_to_layer != !!throbber_->layer()) {
- throbber_->SetPaintToLayer(paint_to_layer);
if (paint_to_layer) {
+ throbber_->SetPaintToLayer();
throbber_->layer()->SetFillsBoundsOpaquely(false);
ScheduleIconPaint(); // Ensure the non-layered throbber goes away.
+ } else {
+ throbber_->DetachLayer();
}
}
if (!throbber_->visible()) {

Powered by Google App Engine
This is Rietveld 408576698