| 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/tree_synchronizer.h" | 5 #include "cc/trees/tree_synchronizer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 | 354 |
| 355 // Check that the property values we set on the Layer tree are reflected in | 355 // Check that the property values we set on the Layer tree are reflected in |
| 356 // the LayerImpl tree. | 356 // the LayerImpl tree. |
| 357 gfx::PointF root_layer_impl_position = layer_impl_tree_root->position(); | 357 gfx::PointF root_layer_impl_position = layer_impl_tree_root->position(); |
| 358 EXPECT_EQ(root_position.x(), root_layer_impl_position.x()); | 358 EXPECT_EQ(root_position.x(), root_layer_impl_position.x()); |
| 359 EXPECT_EQ(root_position.y(), root_layer_impl_position.y()); | 359 EXPECT_EQ(root_position.y(), root_layer_impl_position.y()); |
| 360 | 360 |
| 361 EXPECT_EQ(first_child_opacity, | 361 EXPECT_EQ(first_child_opacity, |
| 362 layer_impl_tree_root->children()[0]->opacity()); | 362 layer_impl_tree_root->children()[0]->opacity()); |
| 363 | 363 |
| 364 gfx::Size second_layer_impl_child_bounds = | 364 gfx::SizeF second_layer_impl_child_bounds = |
| 365 layer_impl_tree_root->children()[1]->bounds(); | 365 layer_impl_tree_root->children()[1]->bounds(); |
| 366 EXPECT_EQ(second_child_bounds.width(), | 366 EXPECT_EQ(second_child_bounds.width(), |
| 367 second_layer_impl_child_bounds.width()); | 367 second_layer_impl_child_bounds.width()); |
| 368 EXPECT_EQ(second_child_bounds.height(), | 368 EXPECT_EQ(second_child_bounds.height(), |
| 369 second_layer_impl_child_bounds.height()); | 369 second_layer_impl_child_bounds.height()); |
| 370 } | 370 } |
| 371 | 371 |
| 372 TEST_F(TreeSynchronizerTest, ReuseLayerImplsAfterStructuralChange) { | 372 TEST_F(TreeSynchronizerTest, ReuseLayerImplsAfterStructuralChange) { |
| 373 std::vector<int> layer_impl_destruction_list; | 373 std::vector<int> layer_impl_destruction_list; |
| 374 | 374 |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 host_impl->active_tree()); | 751 host_impl->active_tree()); |
| 752 | 752 |
| 753 // The clip children should have been unhooked. | 753 // The clip children should have been unhooked. |
| 754 EXPECT_EQ(2u, intervening->children().size()); | 754 EXPECT_EQ(2u, intervening->children().size()); |
| 755 EXPECT_FALSE(clip_child2->clip_parent()); | 755 EXPECT_FALSE(clip_child2->clip_parent()); |
| 756 EXPECT_FALSE(additional_clip_child->clip_parent()); | 756 EXPECT_FALSE(additional_clip_child->clip_parent()); |
| 757 } | 757 } |
| 758 | 758 |
| 759 } // namespace | 759 } // namespace |
| 760 } // namespace cc | 760 } // namespace cc |
| OLD | NEW |