Chromium Code Reviews| 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_); |
|
bruthig
2016/06/09 03:26:00
What's the use case for this?
mohsen
2016/06/09 21:24:51
I think if a View had already been painting to lay
bruthig
2016/06/10 15:25:19
Hmm VERY good point! It seems that this SetPaintTo
|
| } |
| std::unique_ptr<InkDropRipple> InkDropHostView::CreateInkDropRipple() const { |