Enhanced the InkDropRippleImpl to create/destroy InkDropAnimations as needed.
NOTE: This is based on the CL here: https://codereview.chromium.org/1369393002/
Before this CL InkDropAnimations were created lazily and never destroyed or
released until the ripple owner was destroyed. This change adds the
necessary events required to destroy an InkDropAnimation when it becomes
hidden.
BUG=522175, 537614
Committed: https://crrev.com/09219a0b1d34102258dfc0d43d3f0bfdaedb1d3b
Cr-Commit-Position: refs/heads/master@{#353906}
varkha@, just an FYI at this point but, this CL lays the groundwork to add/destroy ...
5 years, 2 months ago
(2015-09-28 20:32:53 UTC)
#2
varkha@, just an FYI at this point but, this CL lays the groundwork to
add/destroy ink drop ripples on an is-necessary basis. From here we should be
able to swap in an InkDropAnimationPool quite easily if profiling shows it to be
beneficial.
https://codereview.chromium.org/1373983002/diff/40001/chrome/browser/ui/views/toolbar/toolbar_button.cc File chrome/browser/ui/views/toolbar/toolbar_button.cc (right): https://codereview.chromium.org/1373983002/diff/40001/chrome/browser/ui/views/toolbar/toolbar_button.cc#newcode40 chrome/browser/ui/views/toolbar/toolbar_button.cc:40: const int kInkDropSmallCornerRadius = 2; Is there some way ...
5 years, 2 months ago
(2015-10-05 21:01:54 UTC)
#5
pkasting@, Can you PTAL? https://codereview.chromium.org/1373983002/diff/40001/chrome/browser/ui/views/toolbar/toolbar_button.cc File chrome/browser/ui/views/toolbar/toolbar_button.cc (right): https://codereview.chromium.org/1373983002/diff/40001/chrome/browser/ui/views/toolbar/toolbar_button.cc#newcode40 chrome/browser/ui/views/toolbar/toolbar_button.cc:40: const int kInkDropSmallCornerRadius = 2; ...
5 years, 2 months ago
(2015-10-06 15:31:38 UTC)
#6
pkasting@, Can you PTAL?
https://codereview.chromium.org/1373983002/diff/40001/chrome/browser/ui/views...
File chrome/browser/ui/views/toolbar/toolbar_button.cc (right):
https://codereview.chromium.org/1373983002/diff/40001/chrome/browser/ui/views...
chrome/browser/ui/views/toolbar/toolbar_button.cc:40: const int
kInkDropSmallCornerRadius = 2;
On 2015/10/05 21:01:54, Peter Kasting wrote:
> Is there some way to calculate these sizes based on the button size? How did
we
> arrive at these sizes to start? I really don't like the way all the ink drop
> changes everywhere have just hardcoded lots of sizes without reference to
> anything else.
The sizes were given by the designers. I don't think there's a good way to
calculate them from the button sizes because the ripple size is the same for
both Material and Material-Hybrid, which have different button sizes. FTR the
plan is to move these constants to a common place.
https://codereview.chromium.org/1373983002/diff/40001/chrome/browser/ui/views...
chrome/browser/ui/views/toolbar/toolbar_button.cc:148: return;
On 2015/10/05 21:01:54, Peter Kasting wrote:
> Why this return statement?
Removed.
varkha
A few nits. https://codereview.chromium.org/1373983002/diff/80001/ui/views/animation/ink_drop_animation.cc File ui/views/animation/ink_drop_animation.cc (right): https://codereview.chromium.org/1373983002/diff/80001/ui/views/animation/ink_drop_animation.cc#newcode267 ui/views/animation/ink_drop_animation.cc:267: if (!observers_.HasObserver(observer)) When is this the ...
5 years, 2 months ago
(2015-10-06 20:58:38 UTC)
#7
sadrul@, varkha@, can you PTAL? https://codereview.chromium.org/1373983002/diff/80001/ui/views/animation/ink_drop_animation.cc File ui/views/animation/ink_drop_animation.cc (right): https://codereview.chromium.org/1373983002/diff/80001/ui/views/animation/ink_drop_animation.cc#newcode267 ui/views/animation/ink_drop_animation.cc:267: if (!observers_.HasObserver(observer)) On 2015/10/08 ...
5 years, 2 months ago
(2015-10-08 21:42:55 UTC)
#10
lgtm https://codereview.chromium.org/1373983002/diff/80001/ui/views/animation/ink_drop_animation.cc File ui/views/animation/ink_drop_animation.cc (right): https://codereview.chromium.org/1373983002/diff/80001/ui/views/animation/ink_drop_animation.cc#newcode534 ui/views/animation/ink_drop_animation.cc:534: observer.aborted_count() On 2015/10/08 21:42:55, bruthig wrote: > On ...
5 years, 2 months ago
(2015-10-09 20:36:27 UTC)
#11
lgtm
https://codereview.chromium.org/1373983002/diff/80001/ui/views/animation/ink_...
File ui/views/animation/ink_drop_animation.cc (right):
https://codereview.chromium.org/1373983002/diff/80001/ui/views/animation/ink_...
ui/views/animation/ink_drop_animation.cc:534: observer.aborted_count()
On 2015/10/08 21:42:55, bruthig wrote:
> On 2015/10/08 01:06:01, sadrul wrote:
> > Is this the only reason to send the observer back with the callback? Would
it
> > make sense to just send that information explicitly (e.g. a boolean/enum to
> say
> > everything went well, or some didn't make it) instead?
>
> In the current use case yes, this is the only data required by the callback,
> however I figured it was more future proof to pass the observer in case the
> observer is enhanced to provide more detailed information.
>
> What would the benefits be of passing an enum or bool?
Simplicity. It's not complex as it is now, so that's OK too.
bruthig
The CQ bit was checked by bruthig@chromium.org
5 years, 2 months ago
(2015-10-13 21:27:02 UTC)
#12
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1373983002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1373983002/120001
5 years, 2 months ago
(2015-10-13 21:31:09 UTC)
#14
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/74662) linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, ...
5 years, 2 months ago
(2015-10-13 22:12:26 UTC)
#16
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1373983002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1373983002/140001
5 years, 2 months ago
(2015-10-13 22:18:36 UTC)
#19
Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/109610) mac_chromium_gn_rel on tryserver.chromium.mac (JOB_FAILED, ...
5 years, 2 months ago
(2015-10-13 22:28:43 UTC)
#21
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1373983002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1373983002/160001
5 years, 2 months ago
(2015-10-13 22:34:59 UTC)
#24
Issue 1373983002: Enhanced the InkDropRippleImpl to create/destroy InkDropAnimations as needed.
(Closed)
Created 5 years, 2 months ago by bruthig
Modified 5 years, 2 months ago
Reviewers: varkha, Peter Kasting, sadrul
Base URL: https://chromium.googlesource.com/chromium/src.git@master
Comments: 36