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 789f1b5e76eb05885906fafa8285d549cbc0dc59..45ead4b72462e82872f7562b45977fe56657690c 100644 |
| --- a/ui/views/animation/ink_drop_host_view.cc |
| +++ b/ui/views/animation/ink_drop_host_view.cc |
| @@ -132,9 +132,6 @@ void InkDropHostView::AddInkDropLayer(ui::Layer* ink_drop_layer) { |
| SetPaintToLayer(); |
| layer()->SetFillsBoundsOpaquely(false); |
| - ink_drop_mask_ = CreateInkDropMask(); |
| - if (ink_drop_mask_) |
| - ink_drop_layer->SetMaskLayer(ink_drop_mask_->layer()); |
|
bruthig
2017/04/26 20:45:40
Did you mean to replace lines 135-137 with a call
Evan Stade
2017/04/26 21:18:36
oops, yes.
|
| layer()->Add(ink_drop_layer); |
| layer()->StackAtBottom(ink_drop_layer); |
| } |
| @@ -280,6 +277,16 @@ InkDrop* InkDropHostView::GetInkDrop() { |
| return ink_drop_.get(); |
| } |
| +void InkDropHostView::InstallInkDropMask(ui::Layer* ink_drop_layer) { |
| + ink_drop_mask_ = CreateInkDropMask(); |
| + if (ink_drop_mask_) |
| + ink_drop_layer->SetMaskLayer(ink_drop_mask_->layer()); |
| +} |
| + |
| +void InkDropHostView::ResetInkDropMask() { |
| + ink_drop_mask_.reset(); |
| +} |
| + |
| std::unique_ptr<InkDropImpl> InkDropHostView::CreateDefaultInkDropImpl() { |
| std::unique_ptr<InkDropImpl> ink_drop = |
| base::MakeUnique<InkDropImpl>(this, size()); |