| 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 1472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1483 ASSERT_TRUE(root->render_surface()); | 1483 ASSERT_TRUE(root->render_surface()); |
| 1484 EXPECT_EQ(1U, root->render_surface()->layer_list().size()); | 1484 EXPECT_EQ(1U, root->render_surface()->layer_list().size()); |
| 1485 EXPECT_EQ(gfx::RectF(0, 0, 10, 10), | 1485 EXPECT_EQ(gfx::RectF(0, 0, 10, 10), |
| 1486 root->render_surface()->DrawableContentRect()); | 1486 root->render_surface()->DrawableContentRect()); |
| 1487 EffectTree& effect_tree = | 1487 EffectTree& effect_tree = |
| 1488 root->layer_tree_impl()->property_trees()->effect_tree; | 1488 root->layer_tree_impl()->property_trees()->effect_tree; |
| 1489 EffectNode* node = effect_tree.Node(render_surface1->effect_tree_index()); | 1489 EffectNode* node = effect_tree.Node(render_surface1->effect_tree_index()); |
| 1490 EXPECT_TRUE(node->is_drawn); | 1490 EXPECT_TRUE(node->is_drawn); |
| 1491 | 1491 |
| 1492 // When root is transparent, the layer should not be drawn. | 1492 // When root is transparent, the layer should not be drawn. |
| 1493 root->OnOpacityAnimated(0.f); | 1493 effect_tree.OnOpacityAnimated(0.f, root->effect_tree_index(), |
| 1494 render_surface1->OnOpacityAnimated(1.f); | 1494 root->layer_tree_impl()); |
| 1495 effect_tree.OnOpacityAnimated(1.f, render_surface1->effect_tree_index(), |
| 1496 root->layer_tree_impl()); |
| 1495 render_surface1->set_visible_layer_rect(gfx::Rect()); | 1497 render_surface1->set_visible_layer_rect(gfx::Rect()); |
| 1496 { | 1498 { |
| 1497 LayerImplList render_surface_layer_list; | 1499 LayerImplList render_surface_layer_list; |
| 1498 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs( | 1500 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs( |
| 1499 root, root->bounds(), &render_surface_layer_list); | 1501 root, root->bounds(), &render_surface_layer_list); |
| 1500 inputs.can_adjust_raster_scales = true; | 1502 inputs.can_adjust_raster_scales = true; |
| 1501 LayerTreeHostCommon::CalculateDrawPropertiesForTesting(&inputs); | 1503 LayerTreeHostCommon::CalculateDrawPropertiesForTesting(&inputs); |
| 1502 } | 1504 } |
| 1503 | 1505 |
| 1504 node = effect_tree.Node(render_surface1->effect_tree_index()); | 1506 node = effect_tree.Node(render_surface1->effect_tree_index()); |
| (...skipping 8260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9765 EXPECT_EQ(scroll_child6.id, grand_child10->scroll_tree_index()); | 9767 EXPECT_EQ(scroll_child6.id, grand_child10->scroll_tree_index()); |
| 9766 EXPECT_EQ(scroll_root1.id, parent3->scroll_tree_index()); | 9768 EXPECT_EQ(scroll_root1.id, parent3->scroll_tree_index()); |
| 9767 EXPECT_EQ(scroll_child7.id, child8->scroll_tree_index()); | 9769 EXPECT_EQ(scroll_child7.id, child8->scroll_tree_index()); |
| 9768 EXPECT_EQ(scroll_root1.id, parent4->scroll_tree_index()); | 9770 EXPECT_EQ(scroll_root1.id, parent4->scroll_tree_index()); |
| 9769 EXPECT_EQ(scroll_root1.id, child9->scroll_tree_index()); | 9771 EXPECT_EQ(scroll_root1.id, child9->scroll_tree_index()); |
| 9770 EXPECT_EQ(scroll_root1.id, grand_child12->scroll_tree_index()); | 9772 EXPECT_EQ(scroll_root1.id, grand_child12->scroll_tree_index()); |
| 9771 } | 9773 } |
| 9772 | 9774 |
| 9773 } // namespace | 9775 } // namespace |
| 9774 } // namespace cc | 9776 } // namespace cc |
| OLD | NEW |