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 "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "cc/layers/layer.h" | 10 #include "cc/layers/layer.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 EXPECT_EQ(target, layer->count_representing_target_surface_); \ | 50 EXPECT_EQ(target, layer->count_representing_target_surface_); \ |
51 EXPECT_EQ(contrib, layer->count_representing_contributing_surface_); \ | 51 EXPECT_EQ(contrib, layer->count_representing_contributing_surface_); \ |
52 EXPECT_EQ(itself, layer->count_representing_itself_); | 52 EXPECT_EQ(itself, layer->count_representing_itself_); |
53 | 53 |
54 void ResetCounts(LayerImplList* render_surface_layer_list) { | 54 void ResetCounts(LayerImplList* render_surface_layer_list) { |
55 for (unsigned surface_index = 0; | 55 for (unsigned surface_index = 0; |
56 surface_index < render_surface_layer_list->size(); | 56 surface_index < render_surface_layer_list->size(); |
57 ++surface_index) { | 57 ++surface_index) { |
58 TestLayerImpl* render_surface_layer = static_cast<TestLayerImpl*>( | 58 TestLayerImpl* render_surface_layer = static_cast<TestLayerImpl*>( |
59 render_surface_layer_list->at(surface_index)); | 59 render_surface_layer_list->at(surface_index)); |
60 RenderSurfaceImpl* render_surface = render_surface_layer->render_surface(); | 60 RenderSurfaceImpl* render_surface = |
| 61 render_surface_layer->GetRenderSurface(); |
61 | 62 |
62 render_surface_layer->count_representing_target_surface_ = -1; | 63 render_surface_layer->count_representing_target_surface_ = -1; |
63 render_surface_layer->count_representing_contributing_surface_ = -1; | 64 render_surface_layer->count_representing_contributing_surface_ = -1; |
64 render_surface_layer->count_representing_itself_ = -1; | 65 render_surface_layer->count_representing_itself_ = -1; |
65 | 66 |
66 for (unsigned layer_index = 0; | 67 for (unsigned layer_index = 0; |
67 layer_index < render_surface->layer_list().size(); | 68 layer_index < render_surface->layer_list().size(); |
68 ++layer_index) { | 69 ++layer_index) { |
69 TestLayerImpl* layer = static_cast<TestLayerImpl*>( | 70 TestLayerImpl* layer = static_cast<TestLayerImpl*>( |
70 render_surface->layer_list()[layer_index]); | 71 render_surface->layer_list()[layer_index]); |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 EXPECT_COUNT(root21_ptr, -1, -1, 9); | 245 EXPECT_COUNT(root21_ptr, -1, -1, 9); |
245 EXPECT_COUNT(root22_ptr, 7, 8, 6); | 246 EXPECT_COUNT(root22_ptr, 7, 8, 6); |
246 EXPECT_COUNT(root221_ptr, -1, -1, 5); | 247 EXPECT_COUNT(root221_ptr, -1, -1, 5); |
247 EXPECT_COUNT(root23_ptr, 3, 4, 2); | 248 EXPECT_COUNT(root23_ptr, 3, 4, 2); |
248 EXPECT_COUNT(root231_ptr, -1, -1, 1); | 249 EXPECT_COUNT(root231_ptr, -1, -1, 1); |
249 EXPECT_COUNT(root3_ptr, -1, -1, 0); | 250 EXPECT_COUNT(root3_ptr, -1, -1, 0); |
250 } | 251 } |
251 | 252 |
252 } // namespace | 253 } // namespace |
253 } // namespace cc | 254 } // namespace cc |
OLD | NEW |