Index: cc/trees/layer_tree_host_common_unittest.cc |
diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc |
index fd5f664e4de7b8565d99b9174f9d194217c25d0b..932797bf8cec6acbfbc52ad4ca6f4362ad75224d 100644 |
--- a/cc/trees/layer_tree_host_common_unittest.cc |
+++ b/cc/trees/layer_tree_host_common_unittest.cc |
@@ -2664,27 +2664,25 @@ |
gfx::PointF(2.5f, 0.f), gfx::Size(10, 10), true, false, false); |
parent->layer_tree_impl()->BuildLayerListAndPropertyTreesForTesting(); |
- SetElementIdsForTesting(); |
// Put an animated opacity on the render surface. |
- AddOpacityTransitionToElementWithPlayer( |
- render_surface1->element_id(), timeline_impl(), 10.0, 1.f, 0.f, false); |
+ AddOpacityTransitionToLayerWithPlayer(render_surface1->id(), timeline_impl(), |
+ 10.0, 1.f, 0.f, false); |
// Also put an animated opacity on a layer without descendants. |
- AddOpacityTransitionToElementWithPlayer(grand_child_of_root->element_id(), |
- timeline_impl(), 10.0, 1.f, 0.f, |
- false); |
+ AddOpacityTransitionToLayerWithPlayer(grand_child_of_root->id(), |
+ timeline_impl(), 10.0, 1.f, 0.f, false); |
// Put a transform animation on the render surface. |
- AddAnimatedTransformToElementWithPlayer(render_surface2->element_id(), |
- timeline_impl(), 10.0, 30, 0); |
+ AddAnimatedTransformToLayerWithPlayer(render_surface2->id(), timeline_impl(), |
+ 10.0, 30, 0); |
// Also put transform animations on grand_child_of_root, and |
// grand_child_of_rs2 |
- AddAnimatedTransformToElementWithPlayer(grand_child_of_root->element_id(), |
- timeline_impl(), 10.0, 30, 0); |
- AddAnimatedTransformToElementWithPlayer(grand_child_of_rs2->element_id(), |
- timeline_impl(), 10.0, 30, 0); |
+ AddAnimatedTransformToLayerWithPlayer(grand_child_of_root->id(), |
+ timeline_impl(), 10.0, 30, 0); |
+ AddAnimatedTransformToLayerWithPlayer(grand_child_of_rs2->id(), |
+ timeline_impl(), 10.0, 30, 0); |
parent->layer_tree_impl()->property_trees()->needs_rebuild = true; |
ExecuteCalculateDrawProperties(parent); |
@@ -2803,16 +2801,14 @@ |
gfx::PointF(), gfx::Size(10, 10), true, false, |
false); |
- SetElementIdsForTesting(); |
- |
// Add a transform animation with a start delay to |grand_child|. |
std::unique_ptr<Animation> animation = Animation::Create( |
std::unique_ptr<AnimationCurve>(new FakeTransformTransition(1.0)), 0, 1, |
TargetProperty::TRANSFORM); |
animation->set_fill_mode(Animation::FillMode::NONE); |
animation->set_time_offset(base::TimeDelta::FromMilliseconds(-1000)); |
- AddAnimationToElementWithPlayer(grand_child->element_id(), timeline_impl(), |
- std::move(animation)); |
+ AddAnimationToLayerWithPlayer(grand_child->id(), timeline_impl(), |
+ std::move(animation)); |
ExecuteCalculateDrawProperties(parent); |
EXPECT_FALSE(parent->screen_space_transform_is_animating()); |
@@ -4533,14 +4529,12 @@ |
backface_matrix.RotateAboutYAxis(180.0); |
backface_matrix.Translate(-50.0, -50.0); |
- SetElementIdsForTesting(); |
- |
// Animate the transform on the render surface. |
- AddAnimatedTransformToElementWithPlayer(animating_surface->element_id(), |
- timeline_impl(), 10.0, 30, 0); |
+ AddAnimatedTransformToLayerWithPlayer(animating_surface->id(), |
+ timeline_impl(), 10.0, 30, 0); |
// This is just an animating layer, not a surface. |
- AddAnimatedTransformToElementWithPlayer(animating_child->element_id(), |
- timeline_impl(), 10.0, 30, 0); |
+ AddAnimatedTransformToLayerWithPlayer(animating_child->id(), timeline_impl(), |
+ 10.0, 30, 0); |
SetLayerPropertiesForTesting(parent, identity_matrix, gfx::Point3F(), |
gfx::PointF(), gfx::Size(100, 100), true, false); |
@@ -5152,18 +5146,13 @@ |
LayerImpl* root_layer = root.get(); |
host_impl.pending_tree()->SetRootLayer(std::move(root)); |
host_impl.pending_tree()->BuildLayerListAndPropertyTreesForTesting(); |
- |
// Add opacity animation. |
scoped_refptr<AnimationTimeline> timeline = |
AnimationTimeline::Create(AnimationIdProvider::NextTimelineId()); |
host_impl.animation_host()->AddAnimationTimeline(timeline); |
- host_impl.pending_tree()->SetElementIdsForTesting(); |
- |
- ElementId child_element_id = |
- host_impl.pending_tree()->LayerById(child_id)->element_id(); |
- |
- AddOpacityTransitionToElementWithPlayer(child_element_id, timeline, 10.0, |
- 0.0f, 1.0f, false); |
+ |
+ AddOpacityTransitionToLayerWithPlayer(child_id, timeline, 10.0, 0.0f, 1.0f, |
+ false); |
LayerImplList render_surface_layer_list; |
LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs( |
@@ -5275,8 +5264,6 @@ |
root_->AddChild(std::move(child_ptr)); |
host_impl_.active_tree()->SetRootLayer(std::move(root_ptr)); |
- host_impl_.active_tree()->SetElementIdsForTesting(); |
- |
root_->SetContentsOpaque(true); |
child_->SetContentsOpaque(true); |
grand_child_->SetContentsOpaque(true); |
@@ -5418,11 +5405,8 @@ |
// Add opacity animation. |
child_->test_properties()->opacity = 0.9f; |
child_->layer_tree_impl()->property_trees()->needs_rebuild = true; |
- |
- SetElementIdsForTesting(); |
- |
- AddOpacityTransitionToElementWithPlayer(child_->element_id(), timeline(), |
- 10.0, 0.9f, 0.1f, false); |
+ AddOpacityTransitionToLayerWithPlayer(child_->id(), timeline(), 10.0, 0.9f, |
+ 0.1f, false); |
ExecuteCalculateDrawProperties(root_, 1.f, 1.f, NULL); |
// Text LCD should be adjusted while animation is active. |
EXPECT_EQ(expect_lcd_text, root_->CanUseLCDText()); |
@@ -5439,12 +5423,11 @@ |
EXPECT_EQ(expect_lcd_text, root_->CanUseLCDText()); |
EXPECT_EQ(expect_lcd_text, child_->CanUseLCDText()); |
EXPECT_EQ(expect_lcd_text, grand_child_->CanUseLCDText()); |
- SetElementIdsForTesting(); |
// Mark contents non-opaque within the first animation frame. |
child_->SetContentsOpaque(false); |
- AddOpacityTransitionToElementWithPlayer(child_->element_id(), timeline(), |
- 10.0, 0.9f, 0.1f, false); |
+ AddOpacityTransitionToLayerWithPlayer(child_->id(), timeline(), 10.0, 0.9f, |
+ 0.1f, false); |
ExecuteCalculateDrawProperties(root_, 1.f, 1.f, NULL); |
// LCD text should be disabled for non-opaque layers even during animations. |
EXPECT_EQ(expect_lcd_text, root_->CanUseLCDText()); |
@@ -7209,11 +7192,8 @@ |
start_operations.AppendMatrix(start_scale); |
TransformOperations end_operations; |
end_operations.AppendMatrix(end_scale); |
- SetElementIdsForTesting(); |
- |
- AddAnimatedTransformToElementWithPlayer(animated_layer->element_id(), |
- timeline_impl(), 1.0, |
- start_operations, end_operations); |
+ AddAnimatedTransformToLayerWithPlayer(animated_layer->id(), timeline_impl(), |
+ 1.0, start_operations, end_operations); |
gfx::Vector2dF scroll_delta(5.f, 9.f); |
SetScrollOffsetDelta(scroller, scroll_delta); |
@@ -7316,10 +7296,8 @@ |
timeline = AnimationTimeline::Create(AnimationIdProvider::NextTimelineId()); |
host_impl.animation_host()->AddAnimationTimeline(timeline); |
- host_impl.active_tree()->SetElementIdsForTesting(); |
- AddAnimatedTransformToElementWithPlayer(parent_raw->element_id(), timeline, |
- 1.0, TransformOperations(), |
- translation); |
+ AddAnimatedTransformToLayerWithPlayer(parent_raw->id(), timeline, 1.0, |
+ TransformOperations(), translation); |
// No layers have scale-affecting animations. |
EXPECT_EQ( |
@@ -7345,8 +7323,8 @@ |
TransformOperations scale; |
scale.AppendScale(5.f, 4.f, 3.f); |
- AddAnimatedTransformToElementWithPlayer(child_raw->element_id(), timeline, |
- 1.0, TransformOperations(), scale); |
+ AddAnimatedTransformToLayerWithPlayer(child_raw->id(), timeline, 1.0, |
+ TransformOperations(), scale); |
child_raw->layer_tree_impl()->property_trees()->needs_rebuild = true; |
ExecuteCalculateDrawProperties(grand_parent_raw); |
@@ -7371,9 +7349,8 @@ |
1.f, |
grand_child_raw->draw_properties().starting_animation_contents_scale); |
- AddAnimatedTransformToElementWithPlayer(grand_parent_raw->element_id(), |
- timeline, 1.0, TransformOperations(), |
- scale); |
+ AddAnimatedTransformToLayerWithPlayer(grand_parent_raw->id(), timeline, 1.0, |
+ TransformOperations(), scale); |
grand_parent_raw->layer_tree_impl()->property_trees()->needs_rebuild = true; |
ExecuteCalculateDrawProperties(grand_parent_raw); |
@@ -7400,8 +7377,8 @@ |
0.f, |
grand_child_raw->draw_properties().starting_animation_contents_scale); |
- AddAnimatedTransformToElementWithPlayer(parent_raw->element_id(), timeline, |
- 1.0, TransformOperations(), scale); |
+ AddAnimatedTransformToLayerWithPlayer(parent_raw->id(), timeline, 1.0, |
+ TransformOperations(), scale); |
parent_raw->layer_tree_impl()->property_trees()->needs_rebuild = true; |
ExecuteCalculateDrawProperties(grand_parent_raw); |
@@ -7426,19 +7403,18 @@ |
0.f, |
grand_child_raw->draw_properties().starting_animation_contents_scale); |
- AbortAnimationsOnElementWithPlayer(grand_parent_raw->element_id(), timeline, |
- TargetProperty::TRANSFORM); |
- AbortAnimationsOnElementWithPlayer(parent_raw->element_id(), timeline, |
- TargetProperty::TRANSFORM); |
- AbortAnimationsOnElementWithPlayer(child_raw->element_id(), timeline, |
- TargetProperty::TRANSFORM); |
+ AbortAnimationsOnLayerWithPlayer(grand_parent_raw->id(), timeline, |
+ TargetProperty::TRANSFORM); |
+ AbortAnimationsOnLayerWithPlayer(parent_raw->id(), timeline, |
+ TargetProperty::TRANSFORM); |
+ AbortAnimationsOnLayerWithPlayer(child_raw->id(), timeline, |
+ TargetProperty::TRANSFORM); |
TransformOperations perspective; |
perspective.AppendPerspective(10.f); |
- AddAnimatedTransformToElementWithPlayer(child_raw->element_id(), timeline, |
- 1.0, TransformOperations(), |
- perspective); |
+ AddAnimatedTransformToLayerWithPlayer(child_raw->id(), timeline, 1.0, |
+ TransformOperations(), perspective); |
child_raw->layer_tree_impl()->property_trees()->needs_rebuild = true; |
ExecuteCalculateDrawProperties(grand_parent_raw); |
@@ -7464,16 +7440,16 @@ |
0.f, |
grand_child_raw->draw_properties().starting_animation_contents_scale); |
- AbortAnimationsOnElementWithPlayer(child_raw->element_id(), timeline, |
- TargetProperty::TRANSFORM); |
+ AbortAnimationsOnLayerWithPlayer(child_raw->id(), timeline, |
+ TargetProperty::TRANSFORM); |
gfx::Transform scale_matrix; |
scale_matrix.Scale(1.f, 2.f); |
grand_parent_raw->SetTransform(scale_matrix); |
parent_raw->SetTransform(scale_matrix); |
grand_parent_raw->layer_tree_impl()->property_trees()->needs_rebuild = true; |
- AddAnimatedTransformToElementWithPlayer(parent_raw->element_id(), timeline, |
- 1.0, TransformOperations(), scale); |
+ AddAnimatedTransformToLayerWithPlayer(parent_raw->id(), timeline, 1.0, |
+ TransformOperations(), scale); |
ExecuteCalculateDrawProperties(grand_parent_raw); |
// |grand_parent| and |parent| each have scale 2.f. |parent| has a scale |
@@ -7876,8 +7852,6 @@ |
root->SetDrawsContent(true); |
host_impl.active_tree()->SetRootLayer(std::move(root)); |
- host_impl.active_tree()->SetElementIdsForTesting(); |
- |
gfx::Transform identity_matrix, scale_transform_child1, |
scale_transform_child2; |
scale_transform_child1.Scale(2, 3); |
@@ -7908,13 +7882,13 @@ |
AnimationTimeline::Create(AnimationIdProvider::NextTimelineId()); |
host_impl.animation_host()->AddAnimationTimeline(timeline); |
+ AddAnimatedTransformToLayerWithPlayer(child2_layer->id(), timeline, 1.0, |
+ TransformOperations(), scale); |
+ |
SetLayerPropertiesForTesting(child2_layer, scale_transform_child2, |
gfx::Point3F(), gfx::PointF(), gfx::Size(1, 1), |
true, false, false); |
child2_layer->SetDrawsContent(true); |
- |
- AddAnimatedTransformToElementWithPlayer(child2_layer->element_id(), timeline, |
- 1.0, TransformOperations(), scale); |
root_layer->layer_tree_impl()->property_trees()->needs_rebuild = true; |
ExecuteCalculateDrawProperties(root_layer); |
@@ -8183,8 +8157,6 @@ |
host()->SetRootLayer(root); |
- host()->SetElementIdsForTesting(); |
- |
SetLayerPropertiesForTesting(root.get(), identity_matrix, gfx::Point3F(), |
gfx::PointF(), gfx::Size(100, 100), true, false); |
SetLayerPropertiesForTesting(animated.get(), identity_matrix, gfx::Point3F(), |
@@ -8194,8 +8166,8 @@ |
root->SetForceRenderSurfaceForTesting(true); |
animated->SetOpacity(0.f); |
- AddOpacityTransitionToElementWithPlayer(animated->element_id(), timeline(), |
- 10.0, 0.f, 1.f, false); |
+ AddOpacityTransitionToLayerWithPlayer(animated->id(), timeline(), 10.0, 0.f, |
+ 1.f, false); |
ExecuteCalculateDrawPropertiesWithPropertyTrees(root.get()); |
EXPECT_FALSE(animated->visible_layer_rect_for_testing().IsEmpty()); |
@@ -8222,8 +8194,6 @@ |
surface->SetForceRenderSurfaceForTesting(true); |
host()->SetRootLayer(root); |
- |
- host()->SetElementIdsForTesting(); |
gfx::Transform uninvertible_matrix; |
uninvertible_matrix.Scale3d(6.f, 6.f, 0.f); |
@@ -8245,10 +8215,9 @@ |
start_transform_operations.AppendMatrix(uninvertible_matrix); |
TransformOperations end_transform_operations; |
- SetElementIdsForTesting(); |
- AddAnimatedTransformToElementWithPlayer(animated->element_id(), timeline(), |
- 10.0, start_transform_operations, |
- end_transform_operations); |
+ AddAnimatedTransformToLayerWithPlayer(animated->id(), timeline(), 10.0, |
+ start_transform_operations, |
+ end_transform_operations); |
ExecuteCalculateDrawPropertiesWithPropertyTrees(root.get()); |
// The animated layer has a singular transform and maps to a non-empty rect in |
@@ -8295,9 +8264,8 @@ |
SetLayerPropertiesForTesting(grandchild, identity_transform, gfx::Point3F(), |
gfx::PointF(), gfx::Size(50, 50), true, false); |
- SetElementIdsForTesting(); |
- AddAnimatedFilterToElementWithPlayer(child->element_id(), timeline_impl(), |
- 10.0, 0.1f, 0.2f); |
+ AddAnimatedFilterToLayerWithPlayer(child->id(), timeline_impl(), 10.0, 0.1f, |
+ 0.2f); |
ExecuteCalculateDrawProperties(root); |
EXPECT_TRUE(root->has_render_surface()); |
@@ -8327,8 +8295,6 @@ |
gfx::PointF(), gfx::Size(50, 50), true, false); |
SetLayerPropertiesForTesting(grandchild, identity_transform, gfx::Point3F(), |
gfx::PointF(), gfx::Size(50, 50), true, false); |
- |
- SetElementIdsForTesting(); |
std::unique_ptr<KeyframedFilterAnimationCurve> curve( |
KeyframedFilterAnimationCurve::Create()); |
@@ -8345,8 +8311,8 @@ |
animation->set_fill_mode(Animation::FillMode::NONE); |
animation->set_time_offset(base::TimeDelta::FromMilliseconds(-1000)); |
- AddAnimationToElementWithPlayer(child->element_id(), timeline_impl(), |
- std::move(animation)); |
+ AddAnimationToLayerWithPlayer(child->id(), timeline_impl(), |
+ std::move(animation)); |
ExecuteCalculateDrawProperties(root); |
EXPECT_TRUE(root->has_render_surface()); |
@@ -8708,8 +8674,6 @@ |
host()->SetRootLayer(root); |
- host()->SetElementIdsForTesting(); |
- |
// Check the non-skipped case. |
ExecuteCalculateDrawPropertiesWithPropertyTrees(root.get()); |
EXPECT_EQ(gfx::Rect(10, 10), grandchild->visible_layer_rect_for_testing()); |
@@ -8744,14 +8708,13 @@ |
animation_id, 1, TargetProperty::TRANSFORM); |
animation->set_fill_mode(Animation::FillMode::NONE); |
animation->set_time_offset(base::TimeDelta::FromMilliseconds(-1000)); |
- AddAnimationToElementWithPlayer(child->element_id(), timeline(), |
- std::move(animation)); |
+ AddAnimationToLayerWithPlayer(child->id(), timeline(), std::move(animation)); |
ExecuteCalculateDrawPropertiesWithPropertyTrees(root.get()); |
EXPECT_EQ(gfx::Rect(10, 10), grandchild->visible_layer_rect_for_testing()); |
grandchild->set_visible_layer_rect(gfx::Rect()); |
- RemoveAnimationFromElementWithExistingPlayer(child->element_id(), timeline(), |
- animation_id); |
+ RemoveAnimationFromLayerWithExistingPlayer(child->id(), timeline(), |
+ animation_id); |
child->SetTransform(identity); |
child->SetOpacity(0.f); |
ExecuteCalculateDrawPropertiesWithPropertyTrees(root.get()); |
@@ -8773,8 +8736,8 @@ |
animation_id, 1, TargetProperty::OPACITY); |
animation->set_fill_mode(Animation::FillMode::NONE); |
animation->set_time_offset(base::TimeDelta::FromMilliseconds(-1000)); |
- AddAnimationToElementWithExistingPlayer(child->element_id(), timeline(), |
- std::move(animation)); |
+ AddAnimationToLayerWithExistingPlayer(child->id(), timeline(), |
+ std::move(animation)); |
ExecuteCalculateDrawPropertiesWithPropertyTrees(root.get()); |
EXPECT_EQ(gfx::Rect(10, 10), grandchild->visible_layer_rect_for_testing()); |
} |
@@ -8818,8 +8781,6 @@ |
child->AddChild(std::move(grandchild)); |
root->AddChild(std::move(child)); |
host_impl.active_tree()->SetRootLayer(std::move(root)); |
- |
- host_impl.active_tree()->SetElementIdsForTesting(); |
// Check the non-skipped case. |
// ExecuteCalculateDrawPropertiesWithPropertyTrees(root_ptr); |
@@ -8916,10 +8877,10 @@ |
Animation::Create(std::move(curve), 3, 3, TargetProperty::TRANSFORM)); |
scoped_refptr<AnimationPlayer> player(AnimationPlayer::Create(1)); |
host_impl.active_tree()->animation_host()->RegisterPlayerForElement( |
- root_ptr->element_id(), player.get()); |
+ root_ptr->id(), player.get()); |
host_impl.active_tree() |
->animation_host() |
- ->GetElementAnimationsForElementId(root_ptr->element_id()) |
+ ->GetElementAnimationsForElementId(root_ptr->id()) |
->AddAnimation(std::move(transform_animation)); |
grandchild_ptr->set_visible_layer_rect(gfx::Rect()); |
child_ptr->SetScrollClipLayer(root_ptr->id()); |
@@ -8930,7 +8891,7 @@ |
EXPECT_EQ(gfx::Rect(0, 0), grandchild_ptr->visible_layer_rect()); |
host_impl.active_tree()->animation_host()->UnregisterPlayerForElement( |
- root_ptr->element_id(), player.get()); |
+ root_ptr->id(), player.get()); |
} |
TEST_F(LayerTreeHostCommonTest, LayerSkippingInSubtreeOfSingularTransform) { |
@@ -8946,7 +8907,6 @@ |
SetLayerPropertiesForTesting(grand_child, identity, gfx::Point3F(), |
gfx::PointF(), gfx::Size(10, 10), true, false, |
false); |
- SetElementIdsForTesting(); |
gfx::Transform singular; |
singular.matrix().set(0, 0, 0); |
@@ -8972,11 +8932,11 @@ |
Animation::Create(std::move(curve), 3, 3, TargetProperty::TRANSFORM)); |
scoped_refptr<AnimationPlayer> player(AnimationPlayer::Create(1)); |
host_impl()->active_tree()->animation_host()->RegisterPlayerForElement( |
- grand_child->element_id(), player.get()); |
+ grand_child->id(), player.get()); |
host_impl() |
->active_tree() |
->animation_host() |
- ->GetElementAnimationsForElementId(grand_child->element_id()) |
+ ->GetElementAnimationsForElementId(grand_child->id()) |
->AddAnimation(std::move(transform_animation)); |
ExecuteCalculateDrawProperties(root); |
@@ -8984,7 +8944,7 @@ |
EXPECT_EQ(gfx::Rect(0, 0), child->visible_layer_rect()); |
host_impl()->active_tree()->animation_host()->UnregisterPlayerForElement( |
- grand_child->element_id(), player.get()); |
+ grand_child->id(), player.get()); |
} |
TEST_F(LayerTreeHostCommonTest, SkippingPendingLayerImpl) { |
@@ -9027,7 +8987,6 @@ |
root->AddChild(std::move(child)); |
host_impl.pending_tree()->SetRootLayer(std::move(root)); |
- host_impl.pending_tree()->SetElementIdsForTesting(); |
// Check the non-skipped case. |
ExecuteCalculateDrawPropertiesWithPropertyTrees(root_ptr); |
@@ -9046,10 +9005,10 @@ |
Animation::Create(std::move(curve), 3, 3, TargetProperty::OPACITY)); |
scoped_refptr<AnimationPlayer> player(AnimationPlayer::Create(1)); |
host_impl.active_tree()->animation_host()->RegisterPlayerForElement( |
- root_ptr->element_id(), player.get()); |
+ root_ptr->id(), player.get()); |
host_impl.active_tree() |
->animation_host() |
- ->GetElementAnimationsForElementId(root_ptr->element_id()) |
+ ->GetElementAnimationsForElementId(root_ptr->id()) |
->AddAnimation(std::move(animation)); |
root_ptr->test_properties()->opacity = 0.f; |
grandchild_ptr->set_visible_layer_rect(gfx::Rect()); |
@@ -9058,7 +9017,7 @@ |
EXPECT_EQ(gfx::Rect(10, 10), grandchild_ptr->visible_layer_rect()); |
host_impl.active_tree()->animation_host()->UnregisterPlayerForElement( |
- root_ptr->element_id(), player.get()); |
+ root_ptr->id(), player.get()); |
} |
TEST_F(LayerTreeHostCommonTest, SkippingLayer) { |
@@ -9909,8 +9868,6 @@ |
host()->SetRootLayer(root); |
- host()->SetElementIdsForTesting(); |
- |
SetLayerPropertiesForTesting(root.get(), identity_matrix, gfx::Point3F(), |
gfx::PointF(), gfx::Size(100, 100), true, false); |
SetLayerPropertiesForTesting(animated.get(), identity_matrix, gfx::Point3F(), |
@@ -9922,8 +9879,7 @@ |
scoped_refptr<AnimationPlayer> player = |
AnimationPlayer::Create(AnimationIdProvider::NextPlayerId()); |
timeline()->AttachPlayer(player); |
- |
- player->AttachElement(animated->element_id()); |
+ player->AttachElement(animated->id()); |
int animation_id = 0; |
std::unique_ptr<Animation> animation = Animation::Create( |
@@ -9932,8 +9888,8 @@ |
animation->set_fill_mode(Animation::FillMode::NONE); |
animation->set_time_offset(base::TimeDelta::FromMilliseconds(-1000)); |
Animation* animation_ptr = animation.get(); |
- AddAnimationToElementWithExistingPlayer(animated->element_id(), timeline(), |
- std::move(animation)); |
+ AddAnimationToLayerWithExistingPlayer(animated->id(), timeline(), |
+ std::move(animation)); |
ExecuteCalculateDrawPropertiesWithPropertyTrees(root.get()); |
@@ -9964,8 +9920,6 @@ |
host()->SetRootLayer(root); |
- host()->SetElementIdsForTesting(); |
- |
SetLayerPropertiesForTesting(root.get(), identity_matrix, gfx::Point3F(), |
gfx::PointF(), gfx::Size(100, 100), true, false); |
SetLayerPropertiesForTesting(animated.get(), identity_matrix, gfx::Point3F(), |
@@ -9976,7 +9930,7 @@ |
scoped_refptr<AnimationPlayer> player = |
AnimationPlayer::Create(AnimationIdProvider::NextPlayerId()); |
timeline()->AttachPlayer(player); |
- player->AttachElement(animated->element_id()); |
+ player->AttachElement(animated->id()); |
std::unique_ptr<KeyframedTransformAnimationCurve> curve( |
KeyframedTransformAnimationCurve::Create()); |
@@ -9995,8 +9949,8 @@ |
animation->set_fill_mode(Animation::FillMode::NONE); |
animation->set_time_offset(base::TimeDelta::FromMilliseconds(-1000)); |
Animation* animation_ptr = animation.get(); |
- AddAnimationToElementWithExistingPlayer(animated->element_id(), timeline(), |
- std::move(animation)); |
+ AddAnimationToLayerWithExistingPlayer(animated->id(), timeline(), |
+ std::move(animation)); |
ExecuteCalculateDrawPropertiesWithPropertyTrees(root.get()); |