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

Issue 2796013003: cc: Push Animation Finished State and Use Finished State for IsCompleted (Closed)

Created:
3 years, 8 months ago by weiliangc
Modified:
3 years, 8 months ago
Reviewers:
ajuma
CC:
cc-bugs_chromium.org, chromium-reviews, wkorman
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: Push Animation Finished State and Use Finished State for IsCompleted This fixes the bug where we try to tick animation on pending tree after commit using element id, but property trees doesn't think animation is still running. There are four parts that are changed by this CL: 1. Property tree check for animation is finished to determine that we no longer need a node for animation, while animation host only think animation is completed when animation is deleted. Change animation host to considered finished animation as completed. 2. When animation is finished, the state is not pushed during commit. In this case animation host on impl thread would still try to tick this animation because it does not know animation is finished. Add call to SetNeedsPushProperties to animation when it is finished. 3. It used to be that when animation no longer affects either pending and active tree, that animation is removed during activation. After this CL, animation marked as finished on main thread will get to same stage, but sending out FINISHED event is still needed. To do this, don't delete animations during activation, instead mark animations not affecting trees as finished during UpdateState. 4. For animations removed on main thread, the compositor thread cannot distinguish it from a FINISHED animation on main thread. When main thread receives FINISHED event from compositor thread and found that the animation no longer exists, it is safe to delete the animation on the compositor thread during commit. Since this is the correct fix for crashing cause by trying to use element id to tick animation, the early return to avoid crash is also removed in this CL. BUG=702774 R=ajuma CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2796013003 Cr-Commit-Position: refs/heads/master@{#467008} Committed: https://chromium.googlesource.com/chromium/src/+/b1e280d1a61f77855418913417c941c7faff176c

Patch Set 1 #

Patch Set 2 : fix all cc unittest #

Total comments: 4

Patch Set 3 : address review comments #

Total comments: 1

Patch Set 4 : rebase #

Patch Set 5 : clear events before update state in unittest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+93 lines, -38 lines) Patch
M cc/animation/animation_player.cc View 1 4 chunks +22 lines, -6 lines 0 comments Download
M cc/animation/animation_player_unittest.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M cc/animation/element_animations_unittest.cc View 1 2 3 4 7 chunks +35 lines, -14 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_animation.cc View 1 2 3 5 chunks +33 lines, -5 lines 0 comments Download
M cc/trees/property_tree.cc View 1 2 3 2 chunks +0 lines, -10 lines 0 comments Download

Messages

Total messages: 24 (18 generated)
weiliangc
3 years, 8 months ago (2017-04-05 14:44:25 UTC) #6
weiliangc
Ah I only ran the AnimationPlayerTests, will fix rest of unittests.
3 years, 8 months ago (2017-04-05 14:45:18 UTC) #7
ajuma
lgtm https://codereview.chromium.org/2796013003/diff/20001/cc/animation/element_animations_unittest.cc File cc/animation/element_animations_unittest.cc (right): https://codereview.chromium.org/2796013003/diff/20001/cc/animation/element_animations_unittest.cc#newcode2699 cc/animation/element_animations_unittest.cc:2699: // Finshed animations are pushed, but animations_impl hasn't ...
3 years, 8 months ago (2017-04-11 23:32:02 UTC) #13
weiliangc
https://codereview.chromium.org/2796013003/diff/40001/cc/animation/element_animations_unittest.cc File cc/animation/element_animations_unittest.cc (right): https://codereview.chromium.org/2796013003/diff/40001/cc/animation/element_animations_unittest.cc#newcode3358 cc/animation/element_animations_unittest.cc:3358: player_->animation_host()->SetAnimationEvents(std::move(events)); Just heads up that since we need the ...
3 years, 8 months ago (2017-04-24 19:47:11 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2796013003/80001
3 years, 8 months ago (2017-04-25 14:52:51 UTC) #21
commit-bot: I haz the power
3 years, 8 months ago (2017-04-25 16:20:04 UTC) #24
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/b1e280d1a61f77855418913417c9...

Powered by Google App Engine
This is Rietveld 408576698