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

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: Removed TODO 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
« no previous file with comments | « ui/views/animation/ink_drop_host_view.h ('k') | ui/views/animation/test/ink_drop_host_view_test_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4f5f953b410751f9351b0b111a533df5b2099675..c378d444c6a1b0de0e2b3d6757d5fedcd236833c 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 {
« no previous file with comments | « ui/views/animation/ink_drop_host_view.h ('k') | ui/views/animation/test/ink_drop_host_view_test_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698