Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: cc/layers/layer_iterator_unittest.cc

Issue 2716733007: cc: Rename LayerImpl::render_surface to GetRenderSurface (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/layers/layer_iterator.h ('k') | cc/layers/layer_position_constraint_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/layers/layer_iterator.h ('k') | cc/layers/layer_position_constraint_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698