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

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

Issue 1441613002: cc: Remove ScopedPtrDeque. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/resources/resource_provider_unittest.cc ('k') | no next file » | 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 "cc/trees/layer_tree_host_common.h" 5 #include "cc/trees/layer_tree_host_common.h"
6 6
7 #include <deque>
7 #include <sstream> 8 #include <sstream>
8 9
9 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 11 #include "base/files/file_util.h"
11 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
12 #include "base/path_service.h" 13 #include "base/path_service.h"
13 #include "base/strings/string_piece.h" 14 #include "base/strings/string_piece.h"
14 #include "base/threading/thread.h" 15 #include "base/threading/thread.h"
15 #include "base/time/time.h" 16 #include "base/time/time.h"
16 #include "cc/base/scoped_ptr_deque.h"
17 #include "cc/base/scoped_ptr_vector.h" 17 #include "cc/base/scoped_ptr_vector.h"
18 #include "cc/debug/lap_timer.h" 18 #include "cc/debug/lap_timer.h"
19 #include "cc/layers/layer.h" 19 #include "cc/layers/layer.h"
20 #include "cc/output/bsp_tree.h" 20 #include "cc/output/bsp_tree.h"
21 #include "cc/quads/draw_polygon.h" 21 #include "cc/quads/draw_polygon.h"
22 #include "cc/quads/draw_quad.h" 22 #include "cc/quads/draw_quad.h"
23 #include "cc/test/fake_content_layer_client.h" 23 #include "cc/test/fake_content_layer_client.h"
24 #include "cc/test/fake_layer_tree_host_client.h" 24 #include "cc/test/fake_layer_tree_host_client.h"
25 #include "cc/test/layer_tree_json_parser.h" 25 #include "cc/test/layer_tree_json_parser.h"
26 #include "cc/test/layer_tree_test.h" 26 #include "cc/test/layer_tree_test.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 for (LayerImplList::iterator it = base_list.begin(); it != base_list.end(); 158 for (LayerImplList::iterator it = base_list.begin(); it != base_list.end();
159 ++it) { 159 ++it) {
160 DrawPolygon* draw_polygon = 160 DrawPolygon* draw_polygon =
161 new DrawPolygon(NULL, gfx::RectF(gfx::SizeF((*it)->bounds())), 161 new DrawPolygon(NULL, gfx::RectF(gfx::SizeF((*it)->bounds())),
162 (*it)->draw_transform(), polygon_counter++); 162 (*it)->draw_transform(), polygon_counter++);
163 polygon_list.push_back(scoped_ptr<DrawPolygon>(draw_polygon)); 163 polygon_list.push_back(scoped_ptr<DrawPolygon>(draw_polygon));
164 } 164 }
165 165
166 timer_.Reset(); 166 timer_.Reset();
167 do { 167 do {
168 ScopedPtrDeque<DrawPolygon> test_list; 168 std::deque<scoped_ptr<DrawPolygon>> test_list;
169 for (int i = 0; i < num_duplicates_; i++) { 169 for (int i = 0; i < num_duplicates_; i++) {
170 for (size_t i = 0; i < polygon_list.size(); i++) { 170 for (size_t i = 0; i < polygon_list.size(); i++) {
171 test_list.push_back(polygon_list[i]->CreateCopy()); 171 test_list.push_back(polygon_list[i]->CreateCopy());
172 } 172 }
173 } 173 }
174 BspTree bsp_tree(&test_list); 174 BspTree bsp_tree(&test_list);
175 timer_.NextLap(); 175 timer_.NextLap();
176 } while (!timer_.HasTimeLimitExpired()); 176 } while (!timer_.HasTimeLimitExpired());
177 177
178 EndTest(); 178 EndTest();
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 262
263 TEST_F(BspTreePerfTest, BspTreeCubes_4) { 263 TEST_F(BspTreePerfTest, BspTreeCubes_4) {
264 SetTestName("bsp_tree_cubes_4"); 264 SetTestName("bsp_tree_cubes_4");
265 SetNumberOfDuplicates(4); 265 SetNumberOfDuplicates(4);
266 ReadTestFile("layer_sort_cubes"); 266 ReadTestFile("layer_sort_cubes");
267 RunSortLayers(); 267 RunSortLayers();
268 } 268 }
269 269
270 } // namespace 270 } // namespace
271 } // namespace cc 271 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/resource_provider_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698