Commit e9692e63 authored by Collin Baker's avatar Collin Baker Committed by Commit Bot

Don't create ink drop container layer in LabelButton constructor

This layer can be created and destroyed as needed when an ink drop is
installed. Creating it on construction adds a cost to every
LabelButton, when there is usually only one ink drop active at a time.

InkDropContainerView already manages this upon adding or removing
ink drop layers, so no additional changes are needed to LabelButton.

Bug: 946738, 960442
Change-Id: If67b443296f85fc296b815d5c61b28683e8d233f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1603182Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Collin Baker <collinbaker@chromium.org>
Cr-Commit-Position: refs/heads/master@{#658285}
parent 55dc4b42
...@@ -59,8 +59,6 @@ LabelButton::LabelButton(ButtonListener* listener, ...@@ -59,8 +59,6 @@ LabelButton::LabelButton(ButtonListener* listener,
SetTextInternal(text); SetTextInternal(text);
AddChildView(ink_drop_container_); AddChildView(ink_drop_container_);
ink_drop_container_->SetPaintToLayer();
ink_drop_container_->layer()->SetFillsBoundsOpaquely(false);
ink_drop_container_->SetVisible(false); ink_drop_container_->SetVisible(false);
AddChildView(image_); AddChildView(image_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment