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

Unified Diff: ash/common/wm/window_cycle_list.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/wm/window_cycle_list.cc
diff --git a/ash/common/wm/window_cycle_list.cc b/ash/common/wm/window_cycle_list.cc
index c486947c27bb94a0a357023e5f9b71fbbb12dc57..6a658b68399e43f9c451d36693cea5db8c1424f6 100644
--- a/ash/common/wm/window_cycle_list.cc
+++ b/ash/common/wm/window_cycle_list.cc
@@ -15,6 +15,7 @@
#include "ash/root_window_controller.h"
#include "base/command_line.h"
#include "ui/accessibility/ax_node_data.h"
+#include "ui/compositor/layer_type.h"
#include "ui/compositor/scoped_layer_animation_settings.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
@@ -213,7 +214,7 @@ class WindowCycleView : public views::WidgetDelegateView {
highlight_view_(new views::View()),
target_window_(nullptr) {
DCHECK(!windows.empty());
- SetPaintToLayer(true);
+ SetPaintToLayer(ui::LAYER_TEXTURED);
layer()->SetFillsBoundsOpaquely(false);
layer()->SetMasksToBounds(true);
layer()->SetOpacity(0.0);
@@ -232,7 +233,7 @@ class WindowCycleView : public views::WidgetDelegateView {
layout->set_cross_axis_alignment(
views::BoxLayout::CROSS_AXIS_ALIGNMENT_START);
mirror_container_->SetLayoutManager(layout);
- mirror_container_->SetPaintToLayer(true);
+ mirror_container_->SetPaintToLayer(ui::LAYER_TEXTURED);
mirror_container_->layer()->SetFillsBoundsOpaquely(false);
for (WmWindow* window : windows) {
@@ -249,7 +250,8 @@ class WindowCycleView : public views::WidgetDelegateView {
views::Painter::CreateRoundRectWith1PxBorderPainter(
SkColorSetA(SK_ColorWHITE, 0x4D), SkColorSetA(SK_ColorWHITE, 0x33),
kBackgroundCornerRadius)));
- highlight_view_->SetPaintToLayer(true);
+ highlight_view_->SetPaintToLayer(ui::LAYER_TEXTURED);
+
highlight_view_->layer()->SetFillsBoundsOpaquely(false);
AddChildView(highlight_view_);

Powered by Google App Engine
This is Rietveld 408576698