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

Side by Side Diff: cc/resources/tile_manager_perftest.cc

Issue 23658023: Fix some missing const reference on function parameter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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/resources/raster_worker_pool_perftest.cc ('k') | cc/resources/worker_pool_perftest.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 "base/time/time.h" 5 #include "base/time/time.h"
6 #include "cc/resources/tile.h" 6 #include "cc/resources/tile.h"
7 #include "cc/resources/tile_priority.h" 7 #include "cc/resources/tile_priority.h"
8 #include "cc/test/fake_output_surface.h" 8 #include "cc/test/fake_output_surface.h"
9 #include "cc/test/fake_output_surface_client.h" 9 #include "cc/test/fake_output_surface_client.h"
10 #include "cc/test/fake_picture_pile_impl.h" 10 #include "cc/test/fake_picture_pile_impl.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 void CreateTiles(int count, TileBinVector* tiles) { 120 void CreateTiles(int count, TileBinVector* tiles) {
121 // Roughly an equal amount of all bins. 121 // Roughly an equal amount of all bins.
122 int count_per_bin = count / NUM_BINS; 122 int count_per_bin = count / NUM_BINS;
123 CreateBinTiles(count_per_bin, NOW_BIN, tiles); 123 CreateBinTiles(count_per_bin, NOW_BIN, tiles);
124 CreateBinTiles(count_per_bin, SOON_BIN, tiles); 124 CreateBinTiles(count_per_bin, SOON_BIN, tiles);
125 CreateBinTiles(count_per_bin, EVENTUALLY_BIN, tiles); 125 CreateBinTiles(count_per_bin, EVENTUALLY_BIN, tiles);
126 CreateBinTiles(count - 3 * count_per_bin, NEVER_BIN, tiles); 126 CreateBinTiles(count - 3 * count_per_bin, NEVER_BIN, tiles);
127 } 127 }
128 128
129 void RunManageTilesTest(const std::string test_name, 129 void RunManageTilesTest(const std::string& test_name,
130 unsigned tile_count, 130 unsigned tile_count,
131 unsigned priority_change_percent) { 131 unsigned priority_change_percent) {
132 DCHECK_GE(tile_count, 100u); 132 DCHECK_GE(tile_count, 100u);
133 DCHECK_LE(priority_change_percent, 100u); 133 DCHECK_LE(priority_change_percent, 100u);
134 TileBinVector tiles; 134 TileBinVector tiles;
135 CreateTiles(tile_count, &tiles); 135 CreateTiles(tile_count, &tiles);
136 timer_.Reset(); 136 timer_.Reset();
137 do { 137 do {
138 if (priority_change_percent) { 138 if (priority_change_percent) {
139 for (unsigned i = 0; 139 for (unsigned i = 0;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 RunManageTilesTest("1000_10", 1000, 10); 174 RunManageTilesTest("1000_10", 1000, 10);
175 RunManageTilesTest("10000_10", 10000, 10); 175 RunManageTilesTest("10000_10", 10000, 10);
176 RunManageTilesTest("100_100", 100, 100); 176 RunManageTilesTest("100_100", 100, 100);
177 RunManageTilesTest("1000_100", 1000, 100); 177 RunManageTilesTest("1000_100", 1000, 100);
178 RunManageTilesTest("10000_100", 10000, 100); 178 RunManageTilesTest("10000_100", 10000, 100);
179 } 179 }
180 180
181 } // namespace 181 } // namespace
182 182
183 } // namespace cc 183 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/raster_worker_pool_perftest.cc ('k') | cc/resources/worker_pool_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698