OLD | NEW |
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 "cc/trees/layer_tree_host_common.h" | 5 #include "cc/trees/layer_tree_host_common.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 host_impl); | 149 host_impl); |
150 | 150 |
151 LayerImplList base_list; | 151 LayerImplList base_list; |
152 BuildLayerImplList(active_tree->root_layer(), &base_list); | 152 BuildLayerImplList(active_tree->root_layer(), &base_list); |
153 | 153 |
154 int polygon_counter = 0; | 154 int polygon_counter = 0; |
155 ScopedPtrVector<DrawPolygon> polygon_list; | 155 ScopedPtrVector<DrawPolygon> polygon_list; |
156 for (LayerImplList::iterator it = base_list.begin(); it != base_list.end(); | 156 for (LayerImplList::iterator it = base_list.begin(); it != base_list.end(); |
157 ++it) { | 157 ++it) { |
158 DrawPolygon* draw_polygon = | 158 DrawPolygon* draw_polygon = |
159 new DrawPolygon(NULL, gfx::RectF((*it)->bounds()), | 159 new DrawPolygon(NULL, gfx::RectF(gfx::SizeF((*it)->bounds())), |
160 (*it)->draw_transform(), polygon_counter++); | 160 (*it)->draw_transform(), polygon_counter++); |
161 polygon_list.push_back(scoped_ptr<DrawPolygon>(draw_polygon)); | 161 polygon_list.push_back(scoped_ptr<DrawPolygon>(draw_polygon)); |
162 } | 162 } |
163 | 163 |
164 timer_.Reset(); | 164 timer_.Reset(); |
165 do { | 165 do { |
166 ScopedPtrDeque<DrawPolygon> test_list; | 166 ScopedPtrDeque<DrawPolygon> test_list; |
167 for (int i = 0; i < num_duplicates_; i++) { | 167 for (int i = 0; i < num_duplicates_; i++) { |
168 for (size_t i = 0; i < polygon_list.size(); i++) { | 168 for (size_t i = 0; i < polygon_list.size(); i++) { |
169 test_list.push_back(polygon_list[i]->CreateCopy()); | 169 test_list.push_back(polygon_list[i]->CreateCopy()); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 | 260 |
261 TEST_F(BspTreePerfTest, BspTreeCubes_4) { | 261 TEST_F(BspTreePerfTest, BspTreeCubes_4) { |
262 SetTestName("bsp_tree_cubes_4"); | 262 SetTestName("bsp_tree_cubes_4"); |
263 SetNumberOfDuplicates(4); | 263 SetNumberOfDuplicates(4); |
264 ReadTestFile("layer_sort_cubes"); | 264 ReadTestFile("layer_sort_cubes"); |
265 RunSortLayers(); | 265 RunSortLayers(); |
266 } | 266 } |
267 | 267 |
268 } // namespace | 268 } // namespace |
269 } // namespace cc | 269 } // namespace cc |
OLD | NEW |