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

Issue 1369393002: Added a CallbackLayerAnimationObserver. (Closed)

Created:
5 years, 2 months ago by bruthig
Modified:
5 years, 2 months ago
Reviewers:
danakj, Ian Vollick, ajuma
CC:
chromium-reviews, Ian Vollick, sievers+watch_chromium.org, jbauman+watch_chromium.org, kalyank, piman+watch_chromium.org, danakj+watch_chromium.org, cc-bugs_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Added a CallbackLayerAnimationObserver. This is based off of the CL here: https://codereview.chromium.org/1381463002/ This is some preliminary work to add callbacks to the InkDropAnimation that will notify observers when an animation is started and ended. It was decided to add a general CallbackLayerAnimationObserver that will re-usuable by other things such as the CallbackAnimationObserver in ash/wm/session_state_animator_impl.cc. TEST=CallbackLayerAnimationObserverTest.VerifyInitialState TEST=CallbackLayerAnimationObserverTest.ExplicitlyDeleteObserverInAnimationStartedCallbackWithNoSequencesAttached TEST=CallbackLayerAnimationObserverTest.ExplicitlyDeleteObserverInAnimationStartedCallbackWithSomeSequencesAttached TEST=CallbackLayerAnimationObserverTest.IgnoreTrueReturnValueForAnimationEndedCallbackIfExplicitlyDeleted TEST=CallbackLayerAnimationObserverTest.SetActiveWhenNoSequencesWereAttached TEST=CallbackLayerAnimationObserverTest.SetActiveWhenAllSequencesAreAttachedButNoneWereStarted TEST=CallbackLayerAnimationObserverTest.SetActiveWhenAllSequencesAreAttachedAndOnlySomeWereStarted TEST=CallbackLayerAnimationObserverTest.SetActiveWhenAllSequencesAreAttachedAndOnlySomeWereCompleted TEST=CallbackLayerAnimationObserverTest.SetActiveAfterAllSequencesWereStartedButNoneWereCompleted TEST=CallbackLayerAnimationObserverTest.SetActiveWhenAllSequencesAreStartedAndOnlySomeWereCompleted TEST=CallbackLayerAnimationObserverTest.SetActiveWhenAllSequencesWereCompleted TEST=CallbackLayerAnimationObserverTest.SetActiveAgainAfterAllSequencesWereCompleted BUG=522175, 537614 Committed: https://crrev.com/3f35acd6de9138929e8a5e993c08b3c049d8b653 Cr-Commit-Position: refs/heads/master@{#353855}

Patch Set 1 #

Patch Set 2 : Added tests and fixed bugs found. #

Patch Set 3 : Fixed the diff delta to be based off the correct branch. #

Total comments: 9

Patch Set 4 : #

Patch Set 5 : Minor fixes. #

Total comments: 2

Patch Set 6 : Guard against double deletes in the CallbackLayerAnimationObserver. #

Patch Set 7 : Changed assertion from EXPECT_EQ to EXPECT_FALSE in CallbackLayerAnimationObserverTest.VerifyInitia… #

Patch Set 8 : Reordered CallbackLayerAnimationObserverTest tests. #

Total comments: 6

Patch Set 9 : Addressed concerns from patch set 8. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+873 lines, -4 lines) Patch
M ui/compositor/BUILD.gn View 1 3 chunks +5 lines, -0 lines 0 comments Download
A ui/compositor/callback_layer_animation_observer.h View 1 2 3 4 5 6 7 8 1 chunk +143 lines, -0 lines 0 comments Download
A ui/compositor/callback_layer_animation_observer.cc View 1 2 3 4 5 1 chunk +115 lines, -0 lines 0 comments Download
A ui/compositor/callback_layer_animation_observer_unittest.cc View 1 2 3 4 5 6 7 1 chunk +522 lines, -0 lines 0 comments Download
M ui/compositor/compositor.gyp View 1 3 chunks +5 lines, -0 lines 0 comments Download
M ui/compositor/layer_animation_observer.h View 1 2 3 4 5 6 7 8 4 chunks +23 lines, -4 lines 0 comments Download
A ui/compositor/test/layer_animation_observer_test_api.h View 1 2 3 4 5 6 7 8 1 chunk +34 lines, -0 lines 0 comments Download
A ui/compositor/test/layer_animation_observer_test_api.cc View 1 1 chunk +26 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (7 generated)
bruthig
danakj@, Can you PTAL? I've added a new re-useable LayerAnimationObserver that is preliminary work for ...
5 years, 2 months ago (2015-09-28 20:12:30 UTC) #2
bruthig
danakj@ I've added the necessary tests, can you PTAL? vollick@, can you take a look ...
5 years, 2 months ago (2015-10-05 18:01:47 UTC) #4
bruthig
https://codereview.chromium.org/1369393002/diff/40001/ui/compositor/callback_layer_animation_observer.h File ui/compositor/callback_layer_animation_observer.h (right): https://codereview.chromium.org/1369393002/diff/40001/ui/compositor/callback_layer_animation_observer.h#newcode70 ui/compositor/callback_layer_animation_observer.h:70: explicit CallbackLayerAnimationObserver( TODO: Remove explicit.
5 years, 2 months ago (2015-10-06 21:30:37 UTC) #5
danakj
+ajuma https://codereview.chromium.org/1369393002/diff/40001/ui/compositor/callback_layer_animation_observer.h File ui/compositor/callback_layer_animation_observer.h (right): https://codereview.chromium.org/1369393002/diff/40001/ui/compositor/callback_layer_animation_observer.h#newcode86 ui/compositor/callback_layer_animation_observer.h:86: void OnLayerAnimationStarted(ui::LayerAnimationSequence* sequence) override; This isn't a member ...
5 years, 2 months ago (2015-10-07 15:11:10 UTC) #7
bruthig
https://codereview.chromium.org/1369393002/diff/40001/ui/compositor/callback_layer_animation_observer.h File ui/compositor/callback_layer_animation_observer.h (right): https://codereview.chromium.org/1369393002/diff/40001/ui/compositor/callback_layer_animation_observer.h#newcode86 ui/compositor/callback_layer_animation_observer.h:86: void OnLayerAnimationStarted(ui::LayerAnimationSequence* sequence) override; On 2015/10/07 15:11:10, danakj_OOO_til_10-12 wrote: ...
5 years, 2 months ago (2015-10-07 15:21:23 UTC) #8
ajuma
https://codereview.chromium.org/1369393002/diff/40001/ui/compositor/callback_layer_animation_observer.h File ui/compositor/callback_layer_animation_observer.h (right): https://codereview.chromium.org/1369393002/diff/40001/ui/compositor/callback_layer_animation_observer.h#newcode39 ui/compositor/callback_layer_animation_observer.h:39: // ui::LayerAnimator* animator_2 = layer_->GetAnimator(); Should these by layer_1 ...
5 years, 2 months ago (2015-10-07 20:14:55 UTC) #9
bruthig
ajuma@, can you please have another look? https://codereview.chromium.org/1369393002/diff/40001/ui/compositor/callback_layer_animation_observer.h File ui/compositor/callback_layer_animation_observer.h (right): https://codereview.chromium.org/1369393002/diff/40001/ui/compositor/callback_layer_animation_observer.h#newcode39 ui/compositor/callback_layer_animation_observer.h:39: // ui::LayerAnimator* ...
5 years, 2 months ago (2015-10-07 21:37:29 UTC) #10
ajuma
lgtm https://codereview.chromium.org/1369393002/diff/40001/ui/compositor/callback_layer_animation_observer_unittest.cc File ui/compositor/callback_layer_animation_observer_unittest.cc (right): https://codereview.chromium.org/1369393002/diff/40001/ui/compositor/callback_layer_animation_observer_unittest.cc#newcode162 ui/compositor/callback_layer_animation_observer_unittest.cc:162: // |callbacks_|. On 2015/10/07 21:37:29, bruthig wrote: > ...
5 years, 2 months ago (2015-10-07 21:50:38 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1369393002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1369393002/80001
5 years, 2 months ago (2015-10-07 22:02:19 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/107628)
5 years, 2 months ago (2015-10-07 22:11:47 UTC) #15
sadrul
Can you explain a little how CallbackLayerAnimationObserver is different from ImplicitAnimationObserver/ClosureAnimationObserver? https://codereview.chromium.org/1369393002/diff/80001/ui/compositor/callback_layer_animation_observer.h File ui/compositor/callback_layer_animation_observer.h (right): ...
5 years, 2 months ago (2015-10-08 00:51:52 UTC) #16
bruthig
sadrul@, can you PTAL? vollick@, do you have time to look at the files listed ...
5 years, 2 months ago (2015-10-08 20:32:18 UTC) #17
bruthig
ajuma@, can you PTAL at the diff against patch set 5?
5 years, 2 months ago (2015-10-08 20:34:20 UTC) #18
ajuma
On 2015/10/08 20:34:20, bruthig wrote: > ajuma@, can you PTAL at the diff against patch ...
5 years, 2 months ago (2015-10-08 20:44:12 UTC) #19
sadrul
On 2015/10/08 20:32:18, bruthig wrote: > sadrul@, can you PTAL? > > vollick@, do you ...
5 years, 2 months ago (2015-10-09 20:27:06 UTC) #20
danakj
https://codereview.chromium.org/1369393002/diff/140001/ui/compositor/layer_animation_observer.h File ui/compositor/layer_animation_observer.h (right): https://codereview.chromium.org/1369393002/diff/140001/ui/compositor/layer_animation_observer.h#newcode58 ui/compositor/layer_animation_observer.h:58: // using the pattern described below, then make sure ...
5 years, 2 months ago (2015-10-12 21:33:56 UTC) #21
bruthig
FYI I've created www.crbug.com/542825 to track the work to combine the ImplicitAnimationObserver and the CallbackLayerAnimationObserver. ...
5 years, 2 months ago (2015-10-13 19:41:43 UTC) #22
danakj
OK I'm not sure about the test-api-as-friend thing, cuz then the state in the tested ...
5 years, 2 months ago (2015-10-13 20:49:54 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1369393002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1369393002/160001
5 years, 2 months ago (2015-10-13 21:05:17 UTC) #26
commit-bot: I haz the power
Committed patchset #9 (id:160001)
5 years, 2 months ago (2015-10-13 21:22:23 UTC) #27
commit-bot: I haz the power
5 years, 2 months ago (2015-10-13 21:23:43 UTC) #28
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/3f35acd6de9138929e8a5e993c08b3c049d8b653
Cr-Commit-Position: refs/heads/master@{#353855}

Powered by Google App Engine
This is Rietveld 408576698