| 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 5710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5721 LayerImpl* render_surface = AddChildToRoot<LayerImpl>(); | 5721 LayerImpl* render_surface = AddChildToRoot<LayerImpl>(); |
| 5722 LayerImpl* clip_parent = AddChild<LayerImpl>(render_surface); | 5722 LayerImpl* clip_parent = AddChild<LayerImpl>(render_surface); |
| 5723 clip_parent->SetDrawsContent(true); | 5723 clip_parent->SetDrawsContent(true); |
| 5724 LayerImpl* intervening = AddChild<LayerImpl>(clip_parent); | 5724 LayerImpl* intervening = AddChild<LayerImpl>(clip_parent); |
| 5725 intervening->SetDrawsContent(true); | 5725 intervening->SetDrawsContent(true); |
| 5726 LayerImpl* clip_child = AddChild<LayerImpl>(intervening); | 5726 LayerImpl* clip_child = AddChild<LayerImpl>(intervening); |
| 5727 clip_child->SetDrawsContent(true); | 5727 clip_child->SetDrawsContent(true); |
| 5728 clip_child->test_properties()->clip_parent = clip_parent; | 5728 clip_child->test_properties()->clip_parent = clip_parent; |
| 5729 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>); | 5729 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>); |
| 5730 clip_children->insert(clip_child); | 5730 clip_children->insert(clip_child); |
| 5731 clip_parent->test_properties()->clip_children.reset(clip_children.release()); | 5731 clip_parent->test_properties()->clip_children = std::move(clip_children); |
| 5732 | 5732 |
| 5733 intervening->SetMasksToBounds(true); | 5733 intervening->SetMasksToBounds(true); |
| 5734 clip_parent->SetMasksToBounds(true); | 5734 clip_parent->SetMasksToBounds(true); |
| 5735 | 5735 |
| 5736 gfx::Transform scale_transform; | 5736 gfx::Transform scale_transform; |
| 5737 scale_transform.Scale(2, 2); | 5737 scale_transform.Scale(2, 2); |
| 5738 | 5738 |
| 5739 root->SetBounds(gfx::Size(50, 50)); | 5739 root->SetBounds(gfx::Size(50, 50)); |
| 5740 render_surface->SetBounds(gfx::Size(10, 10)); | 5740 render_surface->SetBounds(gfx::Size(10, 10)); |
| 5741 render_surface->test_properties()->force_render_surface = true; | 5741 render_surface->test_properties()->force_render_surface = true; |
| (...skipping 5024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10766 EXPECT_EQ(scroll_child6.id, grand_child10->scroll_tree_index()); | 10766 EXPECT_EQ(scroll_child6.id, grand_child10->scroll_tree_index()); |
| 10767 EXPECT_EQ(scroll_root1.id, parent3->scroll_tree_index()); | 10767 EXPECT_EQ(scroll_root1.id, parent3->scroll_tree_index()); |
| 10768 EXPECT_EQ(scroll_child7.id, child8->scroll_tree_index()); | 10768 EXPECT_EQ(scroll_child7.id, child8->scroll_tree_index()); |
| 10769 EXPECT_EQ(scroll_root1.id, parent4->scroll_tree_index()); | 10769 EXPECT_EQ(scroll_root1.id, parent4->scroll_tree_index()); |
| 10770 EXPECT_EQ(scroll_root1.id, child9->scroll_tree_index()); | 10770 EXPECT_EQ(scroll_root1.id, child9->scroll_tree_index()); |
| 10771 EXPECT_EQ(scroll_root1.id, grand_child12->scroll_tree_index()); | 10771 EXPECT_EQ(scroll_root1.id, grand_child12->scroll_tree_index()); |
| 10772 } | 10772 } |
| 10773 | 10773 |
| 10774 } // namespace | 10774 } // namespace |
| 10775 } // namespace cc | 10775 } // namespace cc |
| OLD | NEW |