| Index: cc/trees/layer_tree_host_impl_unittest.cc
|
| diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
|
| index 8ecfcdf8e2f5f83e65b5b5aa56f58d0d72c72331..f90a7c5cb61a4cff8852aabe5721be680c1107a1 100644
|
| --- a/cc/trees/layer_tree_host_impl_unittest.cc
|
| +++ b/cc/trees/layer_tree_host_impl_unittest.cc
|
| @@ -209,11 +209,9 @@ class LayerTreeHostImplTest : public testing::Test,
|
| base::TimeTicks() + base::TimeDelta::FromMilliseconds(1)));
|
| host_impl_->DidFinishImplFrame();
|
|
|
| - if (host_impl_->settings().use_compositor_animation_timelines) {
|
| - timeline_ =
|
| - AnimationTimeline::Create(AnimationIdProvider::NextTimelineId());
|
| - host_impl_->animation_host()->AddAnimationTimeline(timeline_);
|
| - }
|
| + timeline_ =
|
| + AnimationTimeline::Create(AnimationIdProvider::NextTimelineId());
|
| + host_impl_->animation_host()->AddAnimationTimeline(timeline_);
|
|
|
| return init;
|
| }
|
| @@ -1198,11 +1196,7 @@ TEST_F(LayerTreeHostImplTest, AnimationSchedulingPendingTree) {
|
| child->SetBounds(gfx::Size(10, 10));
|
| child->draw_properties().visible_layer_rect = gfx::Rect(10, 10);
|
| child->SetDrawsContent(true);
|
| - if (host_impl_->settings().use_compositor_animation_timelines) {
|
| - AddAnimatedTransformToLayerWithPlayer(child->id(), timeline(), 10.0, 3, 0);
|
| - } else {
|
| - AddAnimatedTransformToLayer(child, 10.0, 3, 0);
|
| - }
|
| + AddAnimatedTransformToLayerWithPlayer(child->id(), timeline(), 10.0, 3, 0);
|
|
|
| EXPECT_FALSE(did_request_next_frame_);
|
| EXPECT_FALSE(did_request_redraw_);
|
| @@ -1258,12 +1252,8 @@ TEST_F(LayerTreeHostImplTest, AnimationSchedulingActiveTree) {
|
| start.AppendTranslate(6.f, 7.f, 0.f);
|
| TransformOperations end;
|
| end.AppendTranslate(8.f, 9.f, 0.f);
|
| - if (host_impl_->settings().use_compositor_animation_timelines) {
|
| - AddAnimatedTransformToLayerWithPlayer(child->id(), timeline(), 4.0, start,
|
| - end);
|
| - } else {
|
| - AddAnimatedTransformToLayer(child, 4.0, start, end);
|
| - }
|
| + AddAnimatedTransformToLayerWithPlayer(child->id(), timeline(), 4.0, start,
|
| + end);
|
|
|
| base::TimeTicks now = base::TimeTicks::Now();
|
| host_impl_->WillBeginImplFrame(
|
| @@ -1320,11 +1310,7 @@ TEST_F(LayerTreeHostImplTest, AnimationSchedulingCommitToActiveTree) {
|
| child->SetBounds(gfx::Size(10, 10));
|
| child->draw_properties().visible_layer_rect = gfx::Rect(10, 10);
|
| child->SetDrawsContent(true);
|
| - if (host_impl_->settings().use_compositor_animation_timelines) {
|
| - AddAnimatedTransformToLayerWithPlayer(child->id(), timeline(), 10.0, 3, 0);
|
| - } else {
|
| - AddAnimatedTransformToLayer(child, 10.0, 3, 0);
|
| - }
|
| + AddAnimatedTransformToLayerWithPlayer(child->id(), timeline(), 10.0, 3, 0);
|
|
|
| // Set up the property trees so that UpdateDrawProperties will work in
|
| // CommitComplete below.
|
| @@ -1391,13 +1377,8 @@ TEST_F(LayerTreeHostImplTest, AnimationMarksLayerNotReady) {
|
| start.AppendTranslate(6.f, 7.f, 0.f);
|
| TransformOperations end;
|
| end.AppendTranslate(8.f, 9.f, 0.f);
|
| - int animation_id;
|
| - if (host_impl_->settings().use_compositor_animation_timelines) {
|
| - animation_id = AddAnimatedTransformToLayerWithPlayer(
|
| - child->id(), timeline(), 4.0, start, end);
|
| - } else {
|
| - animation_id = AddAnimatedTransformToLayer(child, 4.0, start, end);
|
| - }
|
| + int animation_id = AddAnimatedTransformToLayerWithPlayer(
|
| + child->id(), timeline(), 4.0, start, end);
|
|
|
| base::TimeTicks now = base::TimeTicks::Now();
|
| host_impl_->WillBeginImplFrame(
|
| @@ -1428,12 +1409,8 @@ TEST_F(LayerTreeHostImplTest, AnimationMarksLayerNotReady) {
|
|
|
| // Remove the animation.
|
| child->set_has_missing_tiles(true);
|
| - if (host_impl_->settings().use_compositor_animation_timelines) {
|
| - RemoveAnimationFromLayerWithExistingPlayer(child->id(), timeline(),
|
| - animation_id);
|
| - } else {
|
| - child->layer_animation_controller()->RemoveAnimation(animation_id);
|
| - }
|
| + RemoveAnimationFromLayerWithExistingPlayer(child->id(), timeline(),
|
| + animation_id);
|
| child->draw_properties().screen_space_transform_is_animating = false;
|
|
|
| // Child layer doesn't have an animation, but was never ready since the last
|
| @@ -3398,13 +3375,8 @@ class MissingTextureAnimatingLayer : public DidDrawCheckLayer {
|
| : DidDrawCheckLayer(tree_impl, id),
|
| tile_missing_(tile_missing),
|
| had_incomplete_tile_(had_incomplete_tile) {
|
| - if (animating) {
|
| - if (tree_impl->settings().use_compositor_animation_timelines) {
|
| - AddAnimatedTransformToLayerWithPlayer(this->id(), timeline, 10.0, 3, 0);
|
| - } else {
|
| - AddAnimatedTransformToLayer(this, 10.0, 3, 0);
|
| - }
|
| - }
|
| + if (animating)
|
| + AddAnimatedTransformToLayerWithPlayer(this->id(), timeline, 10.0, 3, 0);
|
| }
|
|
|
| bool tile_missing_;
|
| @@ -3520,8 +3492,7 @@ TEST_F(LayerTreeHostImplTest, PrepareToDrawSucceedsAndFails) {
|
| to_remove.push_back(child.get());
|
| for (auto* child : to_remove)
|
| root->RemoveChild(child);
|
| - if (host_impl_->settings().use_compositor_animation_timelines)
|
| - timeline()->ClearPlayers();
|
| + timeline()->ClearPlayers();
|
|
|
| std::ostringstream scope;
|
| scope << "Test case: " << i;
|
|
|