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

Issue 291843012: compositor: Tick the UI animations from cc, instead of from timer callbacks. (Closed)

Created:
6 years, 7 months ago by sadrul
Modified:
6 years, 6 months ago
Reviewers:
ajuma, sky, piman
CC:
chromium-reviews, ben+aura_chromium.org, Ian Vollick, jam, sievers+watch_chromium.org, jbauman+watch_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, kalyank, danakj+watch_chromium.org, cc-bugs_chromium.org, ben+ash_chromium.org
Visibility:
Public.

Description

compositor: Tick the UI animations from cc, instead of from timer callbacks. Update the animations in the UI in response to the animation step in the compositor, instead of from a timer callback. This should make it more difficult for rogue UI animations to negatively impact the system too much. BUG=371071 R=ajuma@chromium.org, sky@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=274988

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Patch Set 4 : . #

Patch Set 5 : . #

Patch Set 6 : . #

Total comments: 6

Patch Set 7 : . #

Total comments: 6

Patch Set 8 : . #

Patch Set 9 : . #

Total comments: 4

Patch Set 10 : . #

Patch Set 11 : . #

Patch Set 12 : test-fix #

Patch Set 13 : . #

Total comments: 4

Patch Set 14 : . #

Patch Set 15 : tot-merge #

Patch Set 16 : tot-merge-r273719 #

Patch Set 17 : . #

Patch Set 18 : . #

Patch Set 19 : self-nits-v1 #

Patch Set 20 : sans-test-api #

Patch Set 21 : . #

Total comments: 6

Patch Set 22 : . #

Patch Set 23 : fix-asan #

Patch Set 24 : tot-merge (landed as r274404) #

Patch Set 25 : fix #

Patch Set 26 : add back test controller #

Patch Set 27 : . #

Total comments: 6

Patch Set 28 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+658 lines, -192 lines) Patch
M ash/desktop_background/desktop_background_controller_unittest.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M ash/shelf/shelf_layout_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +2 lines, -5 lines 0 comments Download
M ash/wm/window_animations_unittest.cc View 1 2 3 4 chunks +10 lines, -14 lines 0 comments Download
M content/browser/web_contents/aura/window_slider_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +3 lines, -5 lines 0 comments Download
M ui/aura/window.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +4 lines, -1 line 0 comments Download
M ui/aura/window_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 6 chunks +97 lines, -6 lines 0 comments Download
M ui/compositor/compositor.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 6 chunks +13 lines, -2 lines 0 comments Download
M ui/compositor/compositor.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 5 chunks +15 lines, -1 line 0 comments Download
M ui/compositor/compositor.gyp View 13 14 15 16 17 18 19 20 26 1 chunk +2 lines, -0 lines 0 comments Download
M ui/compositor/layer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 4 chunks +11 lines, -0 lines 0 comments Download
M ui/compositor/layer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 6 chunks +64 lines, -4 lines 0 comments Download
M ui/compositor/layer_animation_delegate.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -0 lines 0 comments Download
M ui/compositor/layer_animator.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 7 chunks +13 lines, -9 lines 0 comments Download
M ui/compositor/layer_animator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 9 chunks +46 lines, -33 lines 0 comments Download
A ui/compositor/layer_animator_collection.h View 1 2 3 4 5 6 7 8 13 14 15 16 17 18 19 20 26 1 chunk +56 lines, -0 lines 0 comments Download
A ui/compositor/layer_animator_collection.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +56 lines, -0 lines 0 comments Download
M ui/compositor/layer_animator_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 80 chunks +203 lines, -108 lines 0 comments Download
M ui/compositor/layer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +50 lines, -0 lines 0 comments Download
M ui/compositor/test/test_layer_animation_delegate.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M ui/compositor/test/test_layer_animation_delegate.cc View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M ui/keyboard/keyboard_controller_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 34 (0 generated)
sadrul
Hi! Do you mind taking a look at this and see if this looks reasonable? ...
6 years, 7 months ago (2014-05-22 23:48:05 UTC) #1
sadrul
On 2014/05/22 23:48:05, sadrul wrote: > Hi! Do you mind taking a look at this ...
6 years, 7 months ago (2014-05-23 01:03:21 UTC) #2
chromium-reviews
On Thu, May 22, 2014 at 9:03 PM, <sadrul@chromium.org> wrote: > On 2014/05/22 23:48:05, sadrul ...
6 years, 7 months ago (2014-05-23 16:45:14 UTC) #3
ajuma
This looks pretty good, just a few comments. https://codereview.chromium.org/291843012/diff/110001/ui/compositor/compositor.cc File ui/compositor/compositor.cc (right): https://codereview.chromium.org/291843012/diff/110001/ui/compositor/compositor.cc#newcode344 ui/compositor/compositor.cc:344: host_->SetNeedsAnimate(); ...
6 years, 7 months ago (2014-05-23 17:10:00 UTC) #4
sadrul
> > Looks like SingleThreadProxy just never calls > > LayerTreeHost::UpdateClientAnimations(), and so Compositor::Animate() is ...
6 years, 7 months ago (2014-05-23 18:02:42 UTC) #5
sadrul
+danakj@ for compositor.cc|h changes. +sky@ for non-compositor changes (all these changes are in tests, changing ...
6 years, 7 months ago (2014-05-23 18:09:47 UTC) #6
ajuma
Thanks, lgtm.
6 years, 7 months ago (2014-05-23 18:12:16 UTC) #7
piman
https://codereview.chromium.org/291843012/diff/120001/ui/compositor/compositor.cc File ui/compositor/compositor.cc (right): https://codereview.chromium.org/291843012/diff/120001/ui/compositor/compositor.cc#newcode262 ui/compositor/compositor.cc:262: Animate(now); I'm not sure I understand what in the ...
6 years, 7 months ago (2014-05-23 18:20:05 UTC) #8
sadrul
https://codereview.chromium.org/291843012/diff/120001/ui/compositor/compositor.cc File ui/compositor/compositor.cc (right): https://codereview.chromium.org/291843012/diff/120001/ui/compositor/compositor.cc#newcode262 ui/compositor/compositor.cc:262: Animate(now); On 2014/05/23 18:20:06, piman wrote: > I'm not ...
6 years, 7 months ago (2014-05-23 18:32:27 UTC) #9
ajuma
https://codereview.chromium.org/291843012/diff/120001/ui/compositor/compositor.cc File ui/compositor/compositor.cc (right): https://codereview.chromium.org/291843012/diff/120001/ui/compositor/compositor.cc#newcode262 ui/compositor/compositor.cc:262: Animate(now); On 2014/05/23 18:32:28, sadrul wrote: > On 2014/05/23 ...
6 years, 7 months ago (2014-05-23 19:15:14 UTC) #10
sadrul
I have made the following changes: * Each ui::Compositor has its own LayerAnimatorCollection. The compositor ...
6 years, 7 months ago (2014-05-23 21:24:45 UTC) #11
piman
https://codereview.chromium.org/291843012/diff/150001/ui/compositor/compositor.cc File ui/compositor/compositor.cc (right): https://codereview.chromium.org/291843012/diff/150001/ui/compositor/compositor.cc#newcode264 ui/compositor/compositor.cc:264: Animate(now); nit: in threaded mode, the compositor calls Animate ...
6 years, 7 months ago (2014-05-23 21:38:56 UTC) #12
sadrul
https://codereview.chromium.org/291843012/diff/150001/ui/compositor/compositor.cc File ui/compositor/compositor.cc (right): https://codereview.chromium.org/291843012/diff/150001/ui/compositor/compositor.cc#newcode264 ui/compositor/compositor.cc:264: Animate(now); On 2014/05/23 21:38:56, piman wrote: > nit: in ...
6 years, 7 months ago (2014-05-23 21:56:10 UTC) #13
piman
lgtm
6 years, 7 months ago (2014-05-23 22:06:27 UTC) #14
sky
test changes LGTM
6 years, 7 months ago (2014-05-23 22:53:37 UTC) #15
ajuma
lgtm with a couple nits https://codereview.chromium.org/291843012/diff/260001/ui/compositor/compositor.cc File ui/compositor/compositor.cc (right): https://codereview.chromium.org/291843012/diff/260001/ui/compositor/compositor.cc#newcode397 ui/compositor/compositor.cc:397: ScheduleAnimation(); host_->SetNeedsAnimate() https://codereview.chromium.org/291843012/diff/260001/ui/compositor/layer_animator_collection.cc File ...
6 years, 7 months ago (2014-05-26 14:43:22 UTC) #16
sadrul
https://codereview.chromium.org/291843012/diff/260001/ui/compositor/compositor.cc File ui/compositor/compositor.cc (right): https://codereview.chromium.org/291843012/diff/260001/ui/compositor/compositor.cc#newcode397 ui/compositor/compositor.cc:397: ScheduleAnimation(); On 2014/05/26 14:43:23, ajuma wrote: > host_->SetNeedsAnimate() Done ...
6 years, 6 months ago (2014-05-28 21:41:22 UTC) #17
sadrul
On 2014/05/23 19:15:14, ajuma wrote: ... [snip] > > Also, if a layer with an ...
6 years, 6 months ago (2014-06-01 23:05:54 UTC) #18
ajuma
https://codereview.chromium.org/291843012/diff/500001/ui/compositor/layer.cc File ui/compositor/layer.cc (right): https://codereview.chromium.org/291843012/diff/500001/ui/compositor/layer.cc#newcode175 ui/compositor/layer.cc:175: child->RemoveAnimatorsInTreeFromCollection(collection); This should be moved to after the StopAnimatingProperty ...
6 years, 6 months ago (2014-06-02 14:53:21 UTC) #19
sadrul
https://codereview.chromium.org/291843012/diff/500001/ui/compositor/layer.cc File ui/compositor/layer.cc (right): https://codereview.chromium.org/291843012/diff/500001/ui/compositor/layer.cc#newcode175 ui/compositor/layer.cc:175: child->RemoveAnimatorsInTreeFromCollection(collection); On 2014/06/02 14:53:22, ajuma wrote: > This should ...
6 years, 6 months ago (2014-06-02 17:53:43 UTC) #20
ajuma
Thanks, latest changes lgtm.
6 years, 6 months ago (2014-06-02 17:57:28 UTC) #21
sadrul
Committed in r274404 (git-cl crashed before it could update the CL).
6 years, 6 months ago (2014-06-03 02:02:35 UTC) #22
sadrul
I made some changes to fix the memory leak issues that caused the CL to ...
6 years, 6 months ago (2014-06-04 05:23:32 UTC) #23
ajuma
Could you explain a bit more about the leaks you were running into? https://codereview.chromium.org/291843012/diff/680001/ui/aura/window.cc File ...
6 years, 6 months ago (2014-06-04 16:40:11 UTC) #24
ajuma
https://codereview.chromium.org/291843012/diff/680001/ui/aura/window.cc File ui/aura/window.cc (right): https://codereview.chromium.org/291843012/diff/680001/ui/aura/window.cc#newcode221 ui/aura/window.cc:221: layer()->CompleteAllAnimations(); On 2014/06/04 16:40:12, ajuma wrote: > http://crbug.com/341682 Sorry, ...
6 years, 6 months ago (2014-06-04 17:13:11 UTC) #25
sadrul
On 2014/06/04 16:40:11, ajuma wrote: > Could you explain a bit more about the leaks ...
6 years, 6 months ago (2014-06-04 17:39:12 UTC) #26
ajuma
https://codereview.chromium.org/291843012/diff/680001/ui/aura/window.cc File ui/aura/window.cc (right): https://codereview.chromium.org/291843012/diff/680001/ui/aura/window.cc#newcode221 ui/aura/window.cc:221: layer()->CompleteAllAnimations(); On 2014/06/04 17:39:13, sadrul wrote: > On 2014/06/04 ...
6 years, 6 months ago (2014-06-04 19:14:41 UTC) #27
sky
On 2014/06/04 17:39:12, sadrul wrote: > On 2014/06/04 16:40:11, ajuma wrote: > > Could you ...
6 years, 6 months ago (2014-06-04 22:43:42 UTC) #28
sadrul
On 2014/06/04 22:43:42, sky wrote: > On 2014/06/04 17:39:12, sadrul wrote: > > On 2014/06/04 ...
6 years, 6 months ago (2014-06-04 23:00:53 UTC) #29
sky
https://codereview.chromium.org/291843012/diff/680001/ui/aura/window.cc File ui/aura/window.cc (right): https://codereview.chromium.org/291843012/diff/680001/ui/aura/window.cc#newcode221 ui/aura/window.cc:221: layer()->CompleteAllAnimations(); I think you only want to do this ...
6 years, 6 months ago (2014-06-04 23:32:43 UTC) #30
sadrul
https://codereview.chromium.org/291843012/diff/680001/ui/aura/window.cc File ui/aura/window.cc (right): https://codereview.chromium.org/291843012/diff/680001/ui/aura/window.cc#newcode221 ui/aura/window.cc:221: layer()->CompleteAllAnimations(); On 2014/06/04 23:32:45, sky wrote: > I think ...
6 years, 6 months ago (2014-06-05 01:03:36 UTC) #31
sky
LGTM
6 years, 6 months ago (2014-06-05 01:40:48 UTC) #32
sadrul
Committed patchset #28 manually as r274988 (presubmit successful).
6 years, 6 months ago (2014-06-05 03:11:53 UTC) #33
darin (slow to review)
6 years, 6 months ago (2014-06-05 05:56:21 UTC) #34
Message was sent while issue was closed.
On 2014/06/05 03:11:53, sadrul wrote:
> Committed patchset #28 manually as r274988 (presubmit successful).

It looks like this may have broken:
LayerWithNullDelegateTest.SwitchLayerPreservesCCLayerState

Powered by Google App Engine
This is Rietveld 408576698