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

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

Issue 2639203007: Update SetPaintToLayer to accept LayerType (Closed)
Patch Set: fix 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..39c0a44f497517ce427a370624139bdeebea67f8 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_->DestroyLayer();
}
}
if (!throbber_->visible()) {

Powered by Google App Engine
This is Rietveld 408576698