| Index: cc/test/animation_test_common.cc
|
| diff --git a/cc/test/animation_test_common.cc b/cc/test/animation_test_common.cc
|
| index 7ab2497e598abee7ecff5a1902354bd4f3cc0fe4..2d5dafb7ed91efbabecd344156ed4790e264fb67 100644
|
| --- a/cc/test/animation_test_common.cc
|
| +++ b/cc/test/animation_test_common.cc
|
| @@ -296,49 +296,49 @@
|
| return id;
|
| }
|
|
|
| -void AddAnimationToElementWithPlayer(ElementId element_id,
|
| - scoped_refptr<AnimationTimeline> timeline,
|
| - std::unique_ptr<Animation> animation) {
|
| +void AddAnimationToLayerWithPlayer(int layer_id,
|
| + scoped_refptr<AnimationTimeline> timeline,
|
| + std::unique_ptr<Animation> animation) {
|
| scoped_refptr<AnimationPlayer> player =
|
| AnimationPlayer::Create(AnimationIdProvider::NextPlayerId());
|
| timeline->AttachPlayer(player);
|
| - player->AttachElement(element_id);
|
| + player->AttachElement(layer_id);
|
| DCHECK(player->element_animations());
|
| player->AddAnimation(std::move(animation));
|
| }
|
|
|
| -void AddAnimationToElementWithExistingPlayer(
|
| - ElementId element_id,
|
| +void AddAnimationToLayerWithExistingPlayer(
|
| + int layer_id,
|
| scoped_refptr<AnimationTimeline> timeline,
|
| std::unique_ptr<Animation> animation) {
|
| scoped_refptr<ElementAnimations> element_animations =
|
| - timeline->animation_host()->GetElementAnimationsForElementId(element_id);
|
| + timeline->animation_host()->GetElementAnimationsForElementId(layer_id);
|
| DCHECK(element_animations);
|
| element_animations->AddAnimation(std::move(animation));
|
| }
|
|
|
| -void RemoveAnimationFromElementWithExistingPlayer(
|
| - ElementId element_id,
|
| +void RemoveAnimationFromLayerWithExistingPlayer(
|
| + int layer_id,
|
| scoped_refptr<AnimationTimeline> timeline,
|
| int animation_id) {
|
| scoped_refptr<ElementAnimations> element_animations =
|
| - timeline->animation_host()->GetElementAnimationsForElementId(element_id);
|
| + timeline->animation_host()->GetElementAnimationsForElementId(layer_id);
|
| DCHECK(element_animations);
|
| element_animations->RemoveAnimation(animation_id);
|
| }
|
|
|
| -Animation* GetAnimationFromElementWithExistingPlayer(
|
| - ElementId element_id,
|
| +Animation* GetAnimationFromLayerWithExistingPlayer(
|
| + int layer_id,
|
| scoped_refptr<AnimationTimeline> timeline,
|
| int animation_id) {
|
| scoped_refptr<ElementAnimations> element_animations =
|
| - timeline->animation_host()->GetElementAnimationsForElementId(element_id);
|
| + timeline->animation_host()->GetElementAnimationsForElementId(layer_id);
|
| DCHECK(element_animations);
|
| return element_animations->GetAnimationById(animation_id);
|
| }
|
|
|
| -int AddAnimatedFilterToElementWithPlayer(
|
| - ElementId element_id,
|
| +int AddAnimatedFilterToLayerWithPlayer(
|
| + int layer_id,
|
| scoped_refptr<AnimationTimeline> timeline,
|
| double duration,
|
| float start_brightness,
|
| @@ -346,14 +346,14 @@
|
| scoped_refptr<AnimationPlayer> player =
|
| AnimationPlayer::Create(AnimationIdProvider::NextPlayerId());
|
| timeline->AttachPlayer(player);
|
| - player->AttachElement(element_id);
|
| + player->AttachElement(layer_id);
|
| DCHECK(player->element_animations());
|
| return AddAnimatedFilterToPlayer(player.get(), duration, start_brightness,
|
| end_brightness);
|
| }
|
|
|
| -int AddAnimatedTransformToElementWithPlayer(
|
| - ElementId element_id,
|
| +int AddAnimatedTransformToLayerWithPlayer(
|
| + int layer_id,
|
| scoped_refptr<AnimationTimeline> timeline,
|
| double duration,
|
| int delta_x,
|
| @@ -361,13 +361,13 @@
|
| scoped_refptr<AnimationPlayer> player =
|
| AnimationPlayer::Create(AnimationIdProvider::NextPlayerId());
|
| timeline->AttachPlayer(player);
|
| - player->AttachElement(element_id);
|
| + player->AttachElement(layer_id);
|
| DCHECK(player->element_animations());
|
| return AddAnimatedTransformToPlayer(player.get(), duration, delta_x, delta_y);
|
| }
|
|
|
| -int AddAnimatedTransformToElementWithPlayer(
|
| - ElementId element_id,
|
| +int AddAnimatedTransformToLayerWithPlayer(
|
| + int layer_id,
|
| scoped_refptr<AnimationTimeline> timeline,
|
| double duration,
|
| TransformOperations start_operations,
|
| @@ -375,14 +375,14 @@
|
| scoped_refptr<AnimationPlayer> player =
|
| AnimationPlayer::Create(AnimationIdProvider::NextPlayerId());
|
| timeline->AttachPlayer(player);
|
| - player->AttachElement(element_id);
|
| + player->AttachElement(layer_id);
|
| DCHECK(player->element_animations());
|
| return AddAnimatedTransformToPlayer(player.get(), duration, start_operations,
|
| operations);
|
| }
|
|
|
| -int AddOpacityTransitionToElementWithPlayer(
|
| - ElementId element_id,
|
| +int AddOpacityTransitionToLayerWithPlayer(
|
| + int layer_id,
|
| scoped_refptr<AnimationTimeline> timeline,
|
| double duration,
|
| float start_opacity,
|
| @@ -391,18 +391,17 @@
|
| scoped_refptr<AnimationPlayer> player =
|
| AnimationPlayer::Create(AnimationIdProvider::NextPlayerId());
|
| timeline->AttachPlayer(player);
|
| - player->AttachElement(element_id);
|
| + player->AttachElement(layer_id);
|
| DCHECK(player->element_animations());
|
| return AddOpacityTransitionToPlayer(player.get(), duration, start_opacity,
|
| end_opacity, use_timing_function);
|
| }
|
|
|
| -void AbortAnimationsOnElementWithPlayer(
|
| - ElementId element_id,
|
| - scoped_refptr<AnimationTimeline> timeline,
|
| - TargetProperty::Type target_property) {
|
| +void AbortAnimationsOnLayerWithPlayer(int layer_id,
|
| + scoped_refptr<AnimationTimeline> timeline,
|
| + TargetProperty::Type target_property) {
|
| scoped_refptr<ElementAnimations> element_animations =
|
| - timeline->animation_host()->GetElementAnimationsForElementId(element_id);
|
| + timeline->animation_host()->GetElementAnimationsForElementId(layer_id);
|
| DCHECK(element_animations);
|
| element_animations->AbortAnimations(target_property);
|
| }
|
|
|