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..802a4ce9ff369675f7682496c486c4b6282b5fa6 100644 |
--- a/ui/views/animation/ink_drop_host_view.cc |
+++ b/ui/views/animation/ink_drop_host_view.cc |
@@ -132,9 +132,7 @@ 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()); |
+ InstallInkDropMask(ink_drop_layer); |
layer()->Add(ink_drop_layer); |
layer()->StackAtBottom(ink_drop_layer); |
} |
@@ -280,6 +278,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()); |