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/layers/layer_iterator.h" | 5 #include "cc/layers/layer_iterator.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "cc/layers/layer.h" | 9 #include "cc/layers/layer.h" |
10 #include "cc/test/fake_layer_tree_host.h" | 10 #include "cc/test/fake_layer_tree_host.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 RenderSurface* render_surface = render_surface_layer->render_surface(); | 61 RenderSurface* render_surface = render_surface_layer->render_surface(); |
62 | 62 |
63 render_surface_layer->count_representing_target_surface_ = -1; | 63 render_surface_layer->count_representing_target_surface_ = -1; |
64 render_surface_layer->count_representing_contributing_surface_ = -1; | 64 render_surface_layer->count_representing_contributing_surface_ = -1; |
65 render_surface_layer->count_representing_itself_ = -1; | 65 render_surface_layer->count_representing_itself_ = -1; |
66 | 66 |
67 for (unsigned layer_index = 0; | 67 for (unsigned layer_index = 0; |
68 layer_index < render_surface->layer_list().size(); | 68 layer_index < render_surface->layer_list().size(); |
69 ++layer_index) { | 69 ++layer_index) { |
70 TestLayer* layer = static_cast<TestLayer*>( | 70 TestLayer* layer = static_cast<TestLayer*>( |
71 render_surface->layer_list().at(layer_index)); | 71 render_surface->layer_list().at(layer_index).get()); |
72 | 72 |
73 layer->count_representing_target_surface_ = -1; | 73 layer->count_representing_target_surface_ = -1; |
74 layer->count_representing_contributing_surface_ = -1; | 74 layer->count_representing_contributing_surface_ = -1; |
75 layer->count_representing_itself_ = -1; | 75 layer->count_representing_itself_ = -1; |
76 } | 76 } |
77 } | 77 } |
78 } | 78 } |
79 | 79 |
80 void IterateFrontToBack( | 80 void IterateFrontToBack( |
81 RenderSurfaceLayerList* render_surface_layer_list) { | 81 RenderSurfaceLayerList* render_surface_layer_list) { |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 EXPECT_COUNT(root21, -1, -1, 9); | 208 EXPECT_COUNT(root21, -1, -1, 9); |
209 EXPECT_COUNT(root22, 7, 8, 6); | 209 EXPECT_COUNT(root22, 7, 8, 6); |
210 EXPECT_COUNT(root221, -1, -1, 5); | 210 EXPECT_COUNT(root221, -1, -1, 5); |
211 EXPECT_COUNT(root23, 3, 4, 2); | 211 EXPECT_COUNT(root23, 3, 4, 2); |
212 EXPECT_COUNT(root231, -1, -1, 1); | 212 EXPECT_COUNT(root231, -1, -1, 1); |
213 EXPECT_COUNT(root3, -1, -1, 0); | 213 EXPECT_COUNT(root3, -1, -1, 0); |
214 } | 214 } |
215 | 215 |
216 } // namespace | 216 } // namespace |
217 } // namespace cc | 217 } // namespace cc |
OLD | NEW |