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

Unified Diff: ui/views/animation/ink_drop.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: ui/views/animation/ink_drop.cc
diff --git a/ui/views/animation/ink_drop.cc b/ui/views/animation/ink_drop.cc
index a82f4c51b5b78c653a9e49e63e934d9b5f590c22..f48948d2294291da69ef160e6d487ae2371108e1 100644
--- a/ui/views/animation/ink_drop.cc
+++ b/ui/views/animation/ink_drop.cc
@@ -4,12 +4,14 @@
#include "ui/views/animation/ink_drop.h"
+#include "ui/compositor/layer_type.h"
+
namespace views {
InkDropContainerView::InkDropContainerView() {}
void InkDropContainerView::AddInkDropLayer(ui::Layer* ink_drop_layer) {
- SetPaintToLayer(true);
+ SetPaintToLayer(ui::LAYER_TEXTURED);
bruthig 2017/01/20 20:14:18 nit: This may not need to be a textured layer. A
sadrul 2017/01/20 20:32:52 I think for cases like this, we can probably do a
SetVisible(true);
layer()->SetFillsBoundsOpaquely(false);
layer()->Add(ink_drop_layer);
@@ -18,7 +20,7 @@ void InkDropContainerView::AddInkDropLayer(ui::Layer* ink_drop_layer) {
void InkDropContainerView::RemoveInkDropLayer(ui::Layer* ink_drop_layer) {
layer()->Remove(ink_drop_layer);
SetVisible(false);
- SetPaintToLayer(false);
+ SetPaintToLayer(ui::LAYER_NOT_DRAWN);
}
bool InkDropContainerView::CanProcessEventsWithinSubtree() const {

Powered by Google App Engine
This is Rietveld 408576698