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

Unified Diff: ui/views/animation/ink_drop_host_view.cc

Issue 2832223003: Update profile switcher button on Linux. (Closed)
Patch Set: self review Created 3 years, 8 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
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());
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());

Powered by Google App Engine
This is Rietveld 408576698