| 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 8455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8466 host_impl.active_tree()->property_trees()->needs_rebuild = true; | 8466 host_impl.active_tree()->property_trees()->needs_rebuild = true; |
| 8467 ExecuteCalculateDrawPropertiesWithPropertyTrees(root_ptr); | 8467 ExecuteCalculateDrawPropertiesWithPropertyTrees(root_ptr); |
| 8468 EXPECT_EQ(gfx::Rect(0, 0), grandchild_ptr->visible_layer_rect()); | 8468 EXPECT_EQ(gfx::Rect(0, 0), grandchild_ptr->visible_layer_rect()); |
| 8469 child_ptr->test_properties()->transform = gfx::Transform(); | 8469 child_ptr->test_properties()->transform = gfx::Transform(); |
| 8470 | 8470 |
| 8471 child_ptr->test_properties()->hide_layer_and_subtree = true; | 8471 child_ptr->test_properties()->hide_layer_and_subtree = true; |
| 8472 ExecuteCalculateDrawPropertiesWithPropertyTrees(root_ptr); | 8472 ExecuteCalculateDrawPropertiesWithPropertyTrees(root_ptr); |
| 8473 EXPECT_EQ(gfx::Rect(0, 0), grandchild_ptr->visible_layer_rect()); | 8473 EXPECT_EQ(gfx::Rect(0, 0), grandchild_ptr->visible_layer_rect()); |
| 8474 child_ptr->test_properties()->hide_layer_and_subtree = false; | 8474 child_ptr->test_properties()->hide_layer_and_subtree = false; |
| 8475 | 8475 |
| 8476 child_ptr->OnOpacityAnimated(0.f); | 8476 child_ptr->layer_tree_impl()->property_trees()->effect_tree.OnOpacityAnimated( |
| 8477 0.f, child_ptr->effect_tree_index(), child_ptr->layer_tree_impl()); |
| 8477 ExecuteCalculateDrawPropertiesWithPropertyTrees(root_ptr); | 8478 ExecuteCalculateDrawPropertiesWithPropertyTrees(root_ptr); |
| 8478 EXPECT_EQ(gfx::Rect(0, 0), grandchild_ptr->visible_layer_rect()); | 8479 EXPECT_EQ(gfx::Rect(0, 0), grandchild_ptr->visible_layer_rect()); |
| 8479 child_ptr->test_properties()->opacity = 1.f; | 8480 child_ptr->test_properties()->opacity = 1.f; |
| 8480 | 8481 |
| 8481 root_ptr->test_properties()->transform = singular; | 8482 root_ptr->test_properties()->transform = singular; |
| 8482 // Force transform tree to have a node for child, so that ancestor's | 8483 // Force transform tree to have a node for child, so that ancestor's |
| 8483 // invertible transform can be tested. | 8484 // invertible transform can be tested. |
| 8484 child_ptr->test_properties()->transform = rotate; | 8485 child_ptr->test_properties()->transform = rotate; |
| 8485 host_impl.active_tree()->property_trees()->needs_rebuild = true; | 8486 host_impl.active_tree()->property_trees()->needs_rebuild = true; |
| 8486 ExecuteCalculateDrawPropertiesWithPropertyTrees(root_ptr); | 8487 ExecuteCalculateDrawPropertiesWithPropertyTrees(root_ptr); |
| (...skipping 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9767 EXPECT_EQ(scroll_child6.id, grand_child10->scroll_tree_index()); | 9768 EXPECT_EQ(scroll_child6.id, grand_child10->scroll_tree_index()); |
| 9768 EXPECT_EQ(scroll_root1.id, parent3->scroll_tree_index()); | 9769 EXPECT_EQ(scroll_root1.id, parent3->scroll_tree_index()); |
| 9769 EXPECT_EQ(scroll_child7.id, child8->scroll_tree_index()); | 9770 EXPECT_EQ(scroll_child7.id, child8->scroll_tree_index()); |
| 9770 EXPECT_EQ(scroll_root1.id, parent4->scroll_tree_index()); | 9771 EXPECT_EQ(scroll_root1.id, parent4->scroll_tree_index()); |
| 9771 EXPECT_EQ(scroll_root1.id, child9->scroll_tree_index()); | 9772 EXPECT_EQ(scroll_root1.id, child9->scroll_tree_index()); |
| 9772 EXPECT_EQ(scroll_root1.id, grand_child12->scroll_tree_index()); | 9773 EXPECT_EQ(scroll_root1.id, grand_child12->scroll_tree_index()); |
| 9773 } | 9774 } |
| 9774 | 9775 |
| 9775 } // namespace | 9776 } // namespace |
| 9776 } // namespace cc | 9777 } // namespace cc |
| OLD | NEW |