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 f5a7df26a74b78e2ebe6329e9b389e7cf915c5ba..22dd4f1fe7157e62a8736f725dc106e353564d93 100644 |
| --- a/ui/views/animation/ink_drop_host_view.cc |
| +++ b/ui/views/animation/ink_drop_host_view.cc |
| @@ -130,7 +130,7 @@ InkDropHostView::~InkDropHostView() { |
| void InkDropHostView::AddInkDropLayer(ui::Layer* ink_drop_layer) { |
| old_paint_to_layer_ = layer() != nullptr; |
|
varkha
2017/01/31 19:47:47
Drive-by after the fact. I think we should add a D
|
| - SetPaintToLayer(true); |
| + SetPaintToLayer(); |
| layer()->SetFillsBoundsOpaquely(false); |
| ink_drop_mask_ = CreateInkDropMask(); |
| if (ink_drop_mask_) |
| @@ -148,7 +148,8 @@ void InkDropHostView::RemoveInkDropLayer(ui::Layer* ink_drop_layer) { |
| layer()->Remove(ink_drop_layer); |
| // Layers safely handle destroying a mask layer before the masked layer. |
| ink_drop_mask_.reset(); |
| - SetPaintToLayer(old_paint_to_layer_); |
| + if (!old_paint_to_layer_) |
| + DestroyLayer(); |
| } |
| std::unique_ptr<InkDrop> InkDropHostView::CreateInkDrop() { |