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

Side by Side Diff: cc/trees/layer_tree_host_common_perftest.cc

Issue 1905713002: cc: Remove LayerImpl::children() calls from descendants of LayerTreeTest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve comments Created 4 years, 8 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 | « no previous file | cc/trees/layer_tree_host_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <deque> 7 #include <deque>
8 #include <memory> 8 #include <memory>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } 171 }
172 } 172 }
173 BspTree bsp_tree(&test_list); 173 BspTree bsp_tree(&test_list);
174 timer_.NextLap(); 174 timer_.NextLap();
175 } while (!timer_.HasTimeLimitExpired()); 175 } while (!timer_.HasTimeLimitExpired());
176 176
177 EndTest(); 177 EndTest();
178 } 178 }
179 179
180 void BuildLayerImplList(LayerImpl* layer, LayerImplList* list) { 180 void BuildLayerImplList(LayerImpl* layer, LayerImplList* list) {
181 if (layer->Is3dSorted() && !layer->bounds().IsEmpty()) { 181 for (auto* layer_impl : *layer->layer_tree_impl()) {
182 list->push_back(layer); 182 if (layer_impl->Is3dSorted() && !layer_impl->bounds().IsEmpty()) {
183 } 183 list->push_back(layer_impl);
184 184 }
185 for (size_t i = 0; i < layer->children().size(); i++) {
186 BuildLayerImplList(layer->children()[i], list);
187 } 185 }
188 } 186 }
189 187
190 private: 188 private:
191 LayerImplList base_list_; 189 LayerImplList base_list_;
192 int num_duplicates_; 190 int num_duplicates_;
193 }; 191 };
194 192
195 TEST_F(CalcDrawPropsTest, TenTen) { 193 TEST_F(CalcDrawPropsTest, TenTen) {
196 SetTestName("10_10"); 194 SetTestName("10_10");
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 249
252 TEST_F(BspTreePerfTest, BspTreeCubes_4) { 250 TEST_F(BspTreePerfTest, BspTreeCubes_4) {
253 SetTestName("bsp_tree_cubes_4"); 251 SetTestName("bsp_tree_cubes_4");
254 SetNumberOfDuplicates(4); 252 SetNumberOfDuplicates(4);
255 ReadTestFile("layer_sort_cubes"); 253 ReadTestFile("layer_sort_cubes");
256 RunSortLayers(); 254 RunSortLayers();
257 } 255 }
258 256
259 } // namespace 257 } // namespace
260 } // namespace cc 258 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698