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

Side by Side Diff: bench/nanobench.cpp

Issue 1379923005: Remove const from `const int loops`. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: n too 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 | « bench/XfermodeBench.cpp ('k') | bench/subset/SubsetSingleBench.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include <ctype.h> 8 #include <ctype.h>
9 9
10 #include "nanobench.h" 10 #include "nanobench.h"
(...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 } 1175 }
1176 1176
1177 // During HWUI output this canvas may be nullptr. 1177 // During HWUI output this canvas may be nullptr.
1178 SkCanvas* canvas = target->getCanvas(); 1178 SkCanvas* canvas = target->getCanvas();
1179 const char* config = target->config.name; 1179 const char* config = target->config.name;
1180 1180
1181 target->setup(); 1181 target->setup();
1182 bench->perCanvasPreDraw(canvas); 1182 bench->perCanvasPreDraw(canvas);
1183 1183
1184 int maxFrameLag; 1184 int maxFrameLag;
1185 const int loops = target->needsFrameTiming(&maxFrameLag) 1185 int loops = target->needsFrameTiming(&maxFrameLag)
1186 ? setup_gpu_bench(target, bench.get(), maxFrameLag) 1186 ? setup_gpu_bench(target, bench.get(), maxFrameLag)
1187 : setup_cpu_bench(overhead, target, bench.get()); 1187 : setup_cpu_bench(overhead, target, bench.get());
1188 1188
1189 if (kTimedSampling != FLAGS_samples) { 1189 if (kTimedSampling != FLAGS_samples) {
1190 samples.reset(FLAGS_samples); 1190 samples.reset(FLAGS_samples);
1191 for (int s = 0; s < FLAGS_samples; s++) { 1191 for (int s = 0; s < FLAGS_samples; s++) {
1192 samples[s] = time(loops, bench, target) / loops; 1192 samples[s] = time(loops, bench, target) / loops;
1193 } 1193 }
1194 } else if (samplingTimeMs) { 1194 } else if (samplingTimeMs) {
1195 samples.reset(); 1195 samples.reset();
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
1292 1292
1293 return 0; 1293 return 0;
1294 } 1294 }
1295 1295
1296 #if !defined SK_BUILD_FOR_IOS 1296 #if !defined SK_BUILD_FOR_IOS
1297 int main(int argc, char** argv) { 1297 int main(int argc, char** argv) {
1298 SkCommandLineFlags::Parse(argc, argv); 1298 SkCommandLineFlags::Parse(argc, argv);
1299 return nanobench_main(); 1299 return nanobench_main();
1300 } 1300 }
1301 #endif 1301 #endif
OLDNEW
« no previous file with comments | « bench/XfermodeBench.cpp ('k') | bench/subset/SubsetSingleBench.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698