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

Unified Diff: ui/views/animation/ink_drop_host_view.cc

Issue 2033553003: Add MD ink drop ripple to shelf app items (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added tests Created 4 years, 6 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_host_view.cc
diff --git a/ui/views/animation/ink_drop_host_view.cc b/ui/views/animation/ink_drop_host_view.cc
index 49d59d64fd70f9971711f9a5fede98a095f02172..e3f721aacc02ba1706c29b9b74d586bf61e86be1 100644
--- a/ui/views/animation/ink_drop_host_view.cc
+++ b/ui/views/animation/ink_drop_host_view.cc
@@ -101,6 +101,7 @@ class InkDropHostView::InkDropGestureHandler : public ui::EventHandler {
InkDropHostView::InkDropHostView()
: ink_drop_(new InkDropStub()),
ink_drop_size_(kInkDropSize, kInkDropSize),
+ old_paint_to_layer_(false),
destroying_(false) {}
InkDropHostView::~InkDropHostView() {
@@ -110,6 +111,7 @@ InkDropHostView::~InkDropHostView() {
}
void InkDropHostView::AddInkDropLayer(ui::Layer* ink_drop_layer) {
+ old_paint_to_layer_ = layer() != nullptr;
SetPaintToLayer(true);
layer()->SetFillsBoundsOpaquely(false);
layer()->Add(ink_drop_layer);
@@ -123,7 +125,7 @@ void InkDropHostView::RemoveInkDropLayer(ui::Layer* ink_drop_layer) {
if (destroying_)
return;
layer()->Remove(ink_drop_layer);
- SetPaintToLayer(false);
+ SetPaintToLayer(old_paint_to_layer_);
}
std::unique_ptr<InkDropRipple> InkDropHostView::CreateInkDropRipple() const {

Powered by Google App Engine
This is Rietveld 408576698