Skip to content

Commit

Permalink
Rename AnimationPlayer to Animation in cc and all its clients
Browse files Browse the repository at this point in the history
This patch updates the name cc::AnimationPlayer to cc::Animation so that
it will be consistent with the blink::Animation. It's a follow-up patch
of https://chromium-review.googlesource.com/c/chromium/src/+/906830.

Other clients of cc::Animation (vr, ui) have been updated accordingly.

Bug: 807667
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_vr;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: If80affe7bedf46ae8f0356a6fa8a89e2f1d81973
Reviewed-on: https://chromium-review.googlesource.com/926901
Reviewed-by: Stephen McGruer <smcgruer@chromium.org>
Reviewed-by: Majid Valipour <majidvp@chromium.org>
Reviewed-by: Ian Vollick <vollick@chromium.org>
Reviewed-by: Robert Flack <flackr@chromium.org>
Commit-Queue: Yi Gu <yigu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538327}
  • Loading branch information
yi-gu authored and Commit Bot committed Feb 22, 2018
1 parent e722075 commit aa830ff
Show file tree
Hide file tree
Showing 89 changed files with 3,283 additions and 3,246 deletions.
2 changes: 1 addition & 1 deletion cc/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ cc_test("cc_unittests") {
"animation/scroll_offset_animation_curve_unittest.cc",
"animation/scroll_timeline_unittest.cc",
"animation/transform_operations_unittest.cc",
"animation/worklet_animation_player_unittest.cc",
"animation/worklet_animation_unittest.cc",

# Setup.
"test/cc_test_suite.cc",
Expand Down
12 changes: 6 additions & 6 deletions cc/animation/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import("//cc/cc.gni")
cc_component("animation") {
output_name = "cc_animation"
sources = [
"animation.cc",
"animation.h",
"animation_curve.cc",
"animation_curve.h",
"animation_delegate.h",
Expand All @@ -17,8 +19,6 @@ cc_component("animation") {
"animation_host.h",
"animation_id_provider.cc",
"animation_id_provider.h",
"animation_player.cc",
"animation_player.h",
"animation_target.h",
"animation_timeline.cc",
"animation_timeline.h",
Expand All @@ -38,16 +38,16 @@ cc_component("animation") {
"scroll_offset_animations_impl.h",
"scroll_timeline.cc",
"scroll_timeline.h",
"single_keyframe_effect_animation_player.cc",
"single_keyframe_effect_animation_player.h",
"single_keyframe_effect_animation.cc",
"single_keyframe_effect_animation.h",
"timing_function.cc",
"timing_function.h",
"transform_operation.cc",
"transform_operation.h",
"transform_operations.cc",
"transform_operations.h",
"worklet_animation_player.cc",
"worklet_animation_player.h",
"worklet_animation.cc",
"worklet_animation.h",
]

defines = [ "CC_ANIMATION_IMPLEMENTATION=1" ]
Expand Down
14 changes: 7 additions & 7 deletions cc/animation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,23 @@ sent when all animations in the group have finished.
Animations are grouped together based on their
[animation target](https://codesearch.chromium.org/chromium/src/cc/animation/animation_target.h)
(the entity whose property is being animated) and each such group is owned by an
[animation player](https://codesearch.chromium.org/chromium/src/cc/animation/animation_player.h).
Note that there may be multiple animation players with the same target (each
[animation](https://codesearch.chromium.org/chromium/src/cc/animation/animation.h).
Note that there may be multiple animations with the same target (each
with a set of KeyframeModels for that target); the
[ElementAnimations](https://codesearch.chromium.org/chromium/src/cc/animation/element_animations.h)
class wraps the multiple animation players and has a 1:1 relationship with
class wraps the multiple animations and has a 1:1 relationship with
target entities.

`TODO(smcgruer): Why are ElementAnimations and AnimationPlayers separate?`
`TODO(smcgruer): Why are ElementAnimations and Animations separate?`

In order to play an animation, input time values must be provided to the
animation curve and output values fed back into the animating entity. This is
called 'ticking' an animation and is the responsibility of the
[animation host](https://codesearch.chromium.org/chromium/src/cc/animation/animation_host.h).
The animation host has a list of currently ticking players (i.e. those that have
The animation host has a list of currently ticking animations (i.e. those that have
any non-deleted animations), which it iterates through whenever it receives a
tick call from the client (along with a corresponding input time). The
animation players then call into their non-deleted animations, retrieving the
animations then call into their non-deleted animations, retrieving the
value from the animation curve. As they are computed, output values are sent to
the target which is responsible for passing them to the client entity that is
being animated.
Expand Down Expand Up @@ -93,7 +93,7 @@ cc/animation has a concept of an
[animation timeline](https://codesearch.chromium.org/chromium/src/cc/animation/animation_timeline.h).
This should not be confused with the identically named Blink concept. In
cc/animation, animation timelines are an implementation detail - they hold the
animation players and are responsible for syncing them to the impl thread (see
animations and are responsible for syncing them to the impl thread (see
below), but do not participate in the ticking process in any way.

### Main/Impl Threads
Expand Down
Loading

0 comments on commit aa830ff

Please sign in to comment.