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

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

Issue 2639203007: Update SetPaintToLayer to accept LayerType (Closed)
Patch Set: Refactor 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..8d467681f3b2cac7353c53423f9f747c5728f5d5 100644
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -41,6 +41,7 @@
#include "ui/base/models/list_selection_model.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/theme_provider.h"
+#include "ui/compositor/layer_type.h"
#include "ui/gfx/animation/animation_container.h"
#include "ui/gfx/animation/throb_animation.h"
#include "ui/gfx/canvas.h"
@@ -1458,7 +1459,8 @@ 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);
+ throbber_->SetPaintToLayer(paint_to_layer ? ui::LAYER_TEXTURED
+ : ui::LAYER_NOT_DRAWN);
if (paint_to_layer) {
throbber_->layer()->SetFillsBoundsOpaquely(false);
ScheduleIconPaint(); // Ensure the non-layered throbber goes away.

Powered by Google App Engine
This is Rietveld 408576698