OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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.h" | 5 #include "cc/trees/layer_tree_host.h" |
6 | 6 |
7 #include "cc/layers/layer.h" | 7 #include "cc/layers/layer.h" |
8 #include "cc/output/copy_output_request.h" | 8 #include "cc/output/copy_output_request.h" |
9 #include "cc/output/copy_output_result.h" | 9 #include "cc/output/copy_output_result.h" |
10 #include "cc/test/layer_tree_test.h" | 10 #include "cc/test/layer_tree_test.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 for (size_t i = 0; i < layer->children().size(); ++i) { | 80 for (size_t i = 0; i < layer->children().size(); ++i) { |
81 TestLayer* child = static_cast<TestLayer*>(layer->children()[i].get()); | 81 TestLayer* child = static_cast<TestLayer*>(layer->children()[i].get()); |
82 VerifyOcclusion(child); | 82 VerifyOcclusion(child); |
83 } | 83 } |
84 } | 84 } |
85 | 85 |
86 void SetLayerPropertiesForTesting(TestLayer* layer, | 86 void SetLayerPropertiesForTesting(TestLayer* layer, |
87 TestLayer* parent, | 87 TestLayer* parent, |
88 const gfx::Transform& transform, | 88 const gfx::Transform& transform, |
89 const gfx::PointF& position, | 89 const gfx::PointF& position, |
90 gfx::Size bounds, | 90 const gfx::Size& bounds, |
91 bool opaque) const { | 91 bool opaque) const { |
92 layer->RemoveAllChildren(); | 92 layer->RemoveAllChildren(); |
93 if (parent) | 93 if (parent) |
94 parent->AddChild(layer); | 94 parent->AddChild(layer); |
95 layer->SetTransform(transform); | 95 layer->SetTransform(transform); |
96 layer->SetPosition(position); | 96 layer->SetPosition(position); |
97 layer->SetBounds(bounds); | 97 layer->SetBounds(bounds); |
98 layer->SetContentsOpaque(opaque); | 98 layer->SetContentsOpaque(opaque); |
99 | 99 |
100 layer->SetAnchorPoint(gfx::PointF()); | 100 layer->SetAnchorPoint(gfx::PointF()); |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
614 | 614 |
615 layer_tree_host()->SetRootLayer(layers[0]); | 615 layer_tree_host()->SetRootLayer(layers[0]); |
616 LayerTreeTest::SetupTree(); | 616 LayerTreeTest::SetupTree(); |
617 } | 617 } |
618 }; | 618 }; |
619 | 619 |
620 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostOcclusionTestManySurfaces); | 620 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostOcclusionTestManySurfaces); |
621 | 621 |
622 } // namespace | 622 } // namespace |
623 } // namespace cc | 623 } // namespace cc |
OLD | NEW |