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

Unified Diff: ash/common/shelf/shelf_view.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: ash/common/shelf/shelf_view.cc
diff --git a/ash/common/shelf/shelf_view.cc b/ash/common/shelf/shelf_view.cc
index 48458db58ec18c3b5c6ae0b433e18c0a906dce2f..a47521ede21c1ece48862e98bf1715effeb857e8 100644
--- a/ash/common/shelf/shelf_view.cc
+++ b/ash/common/shelf/shelf_view.cc
@@ -35,6 +35,7 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_animator.h"
+#include "ui/compositor/layer_type.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/events/event_utils.h"
#include "ui/gfx/canvas.h"
@@ -405,7 +406,7 @@ void ShelfView::Init() {
const ShelfItems& items(model_->items());
for (ShelfItems::const_iterator i = items.begin(); i != items.end(); ++i) {
views::View* child = CreateViewForItem(*i);
- child->SetPaintToLayer(true);
+ child->SetPaintToLayer(ui::LAYER_TEXTURED);
view_model_->Add(child, static_cast<int>(i - items.begin()));
AddChildView(child);
}
@@ -1392,7 +1393,7 @@ std::pair<int, int> ShelfView::GetDragRange(int index) {
}
void ShelfView::ConfigureChildView(views::View* view) {
- view->SetPaintToLayer(true);
+ view->SetPaintToLayer(ui::LAYER_TEXTURED);
view->layer()->SetFillsBoundsOpaquely(false);
}

Powered by Google App Engine
This is Rietveld 408576698