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

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

Issue 1357423009: gfx: Make conversions from Size to SizeF be explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sizefconvert-gfx: . Created 5 years, 2 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/trees/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_host_common_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 "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
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
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
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698