| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/trees/layer_tree_host_common.h" | 5 #include "cc/trees/layer_tree_host_common.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 9525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9536 std::move(animation)); | 9536 std::move(animation)); |
| 9537 | 9537 |
| 9538 ExecuteCalculateDrawPropertiesWithPropertyTrees(root.get()); | 9538 ExecuteCalculateDrawPropertiesWithPropertyTrees(root.get()); |
| 9539 | 9539 |
| 9540 EffectTree& tree = root->GetLayerTree()->property_trees()->effect_tree; | 9540 EffectTree& tree = root->GetLayerTree()->property_trees()->effect_tree; |
| 9541 EffectNode* node = tree.Node(animated->effect_tree_index()); | 9541 EffectNode* node = tree.Node(animated->effect_tree_index()); |
| 9542 EXPECT_FALSE(node->is_currently_animating_opacity); | 9542 EXPECT_FALSE(node->is_currently_animating_opacity); |
| 9543 EXPECT_TRUE(node->has_potential_opacity_animation); | 9543 EXPECT_TRUE(node->has_potential_opacity_animation); |
| 9544 | 9544 |
| 9545 animation_ptr->set_time_offset(base::TimeDelta::FromMilliseconds(0)); | 9545 animation_ptr->set_time_offset(base::TimeDelta::FromMilliseconds(0)); |
| 9546 root->layer_tree_host()->AnimateLayers( | 9546 root->GetLayerTreeHostForTesting()->AnimateLayers( |
| 9547 base::TimeTicks::FromInternalValue(std::numeric_limits<int64_t>::max())); | 9547 base::TimeTicks::FromInternalValue(std::numeric_limits<int64_t>::max())); |
| 9548 node = tree.Node(animated->effect_tree_index()); | 9548 node = tree.Node(animated->effect_tree_index()); |
| 9549 EXPECT_TRUE(node->is_currently_animating_opacity); | 9549 EXPECT_TRUE(node->is_currently_animating_opacity); |
| 9550 EXPECT_TRUE(node->has_potential_opacity_animation); | 9550 EXPECT_TRUE(node->has_potential_opacity_animation); |
| 9551 | 9551 |
| 9552 player->AbortAnimations(TargetProperty::OPACITY, false /*needs_completion*/); | 9552 player->AbortAnimations(TargetProperty::OPACITY, false /*needs_completion*/); |
| 9553 node = tree.Node(animated->effect_tree_index()); | 9553 node = tree.Node(animated->effect_tree_index()); |
| 9554 EXPECT_FALSE(node->is_currently_animating_opacity); | 9554 EXPECT_FALSE(node->is_currently_animating_opacity); |
| 9555 EXPECT_FALSE(node->has_potential_opacity_animation); | 9555 EXPECT_FALSE(node->has_potential_opacity_animation); |
| 9556 } | 9556 } |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9593 std::move(animation)); | 9593 std::move(animation)); |
| 9594 | 9594 |
| 9595 ExecuteCalculateDrawPropertiesWithPropertyTrees(root.get()); | 9595 ExecuteCalculateDrawPropertiesWithPropertyTrees(root.get()); |
| 9596 | 9596 |
| 9597 TransformTree& tree = root->GetLayerTree()->property_trees()->transform_tree; | 9597 TransformTree& tree = root->GetLayerTree()->property_trees()->transform_tree; |
| 9598 TransformNode* node = tree.Node(animated->transform_tree_index()); | 9598 TransformNode* node = tree.Node(animated->transform_tree_index()); |
| 9599 EXPECT_FALSE(node->is_currently_animating); | 9599 EXPECT_FALSE(node->is_currently_animating); |
| 9600 EXPECT_TRUE(node->has_potential_animation); | 9600 EXPECT_TRUE(node->has_potential_animation); |
| 9601 | 9601 |
| 9602 animation_ptr->set_time_offset(base::TimeDelta::FromMilliseconds(0)); | 9602 animation_ptr->set_time_offset(base::TimeDelta::FromMilliseconds(0)); |
| 9603 root->layer_tree_host()->AnimateLayers( | 9603 root->GetLayerTreeHostForTesting()->AnimateLayers( |
| 9604 base::TimeTicks::FromInternalValue(std::numeric_limits<int64_t>::max())); | 9604 base::TimeTicks::FromInternalValue(std::numeric_limits<int64_t>::max())); |
| 9605 node = tree.Node(animated->transform_tree_index()); | 9605 node = tree.Node(animated->transform_tree_index()); |
| 9606 EXPECT_TRUE(node->is_currently_animating); | 9606 EXPECT_TRUE(node->is_currently_animating); |
| 9607 EXPECT_TRUE(node->has_potential_animation); | 9607 EXPECT_TRUE(node->has_potential_animation); |
| 9608 | 9608 |
| 9609 player->AbortAnimations(TargetProperty::TRANSFORM, | 9609 player->AbortAnimations(TargetProperty::TRANSFORM, |
| 9610 false /*needs_completion*/); | 9610 false /*needs_completion*/); |
| 9611 node = tree.Node(animated->transform_tree_index()); | 9611 node = tree.Node(animated->transform_tree_index()); |
| 9612 EXPECT_FALSE(node->is_currently_animating); | 9612 EXPECT_FALSE(node->is_currently_animating); |
| 9613 EXPECT_FALSE(node->has_potential_animation); | 9613 EXPECT_FALSE(node->has_potential_animation); |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9838 EXPECT_EQ(scroll_child6.id, grand_child10->scroll_tree_index()); | 9838 EXPECT_EQ(scroll_child6.id, grand_child10->scroll_tree_index()); |
| 9839 EXPECT_EQ(scroll_root1.id, parent3->scroll_tree_index()); | 9839 EXPECT_EQ(scroll_root1.id, parent3->scroll_tree_index()); |
| 9840 EXPECT_EQ(scroll_child7.id, child8->scroll_tree_index()); | 9840 EXPECT_EQ(scroll_child7.id, child8->scroll_tree_index()); |
| 9841 EXPECT_EQ(scroll_root1.id, parent4->scroll_tree_index()); | 9841 EXPECT_EQ(scroll_root1.id, parent4->scroll_tree_index()); |
| 9842 EXPECT_EQ(scroll_root1.id, child9->scroll_tree_index()); | 9842 EXPECT_EQ(scroll_root1.id, child9->scroll_tree_index()); |
| 9843 EXPECT_EQ(scroll_root1.id, grand_child12->scroll_tree_index()); | 9843 EXPECT_EQ(scroll_root1.id, grand_child12->scroll_tree_index()); |
| 9844 } | 9844 } |
| 9845 | 9845 |
| 9846 } // namespace | 9846 } // namespace |
| 9847 } // namespace cc | 9847 } // namespace cc |
| OLD | NEW |