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

Side by Side Diff: bench/nanobench.cpp

Issue 1612483002: Add pre_log option to nanobench; make this option default true in nanobench and dm. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Revert change to enable --pre_log for --verbose. Add auto-edited files. Created 4 years, 11 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 | « no previous file | dm/DM.cpp » ('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 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 for (int i = 0; i < configs.count(); ++i) { 1117 for (int i = 0; i < configs.count(); ++i) {
1118 Target* target = is_enabled(b, configs[i]); 1118 Target* target = is_enabled(b, configs[i]);
1119 if (!target) { 1119 if (!target) {
1120 continue; 1120 continue;
1121 } 1121 }
1122 1122
1123 // During HWUI output this canvas may be nullptr. 1123 // During HWUI output this canvas may be nullptr.
1124 SkCanvas* canvas = target->getCanvas(); 1124 SkCanvas* canvas = target->getCanvas();
1125 const char* config = target->config.name; 1125 const char* config = target->config.name;
1126 1126
1127 if (FLAGS_pre_log) {
1128 SkDebugf("Running %s\t%s\n"
1129 , bench->getUniqueName()
1130 , config);
1131 }
1132
1127 target->setup(); 1133 target->setup();
1128 bench->perCanvasPreDraw(canvas); 1134 bench->perCanvasPreDraw(canvas);
1129 1135
1130 int maxFrameLag; 1136 int maxFrameLag;
1131 int loops = target->needsFrameTiming(&maxFrameLag) 1137 int loops = target->needsFrameTiming(&maxFrameLag)
1132 ? setup_gpu_bench(target, bench.get(), maxFrameLag) 1138 ? setup_gpu_bench(target, bench.get(), maxFrameLag)
1133 : setup_cpu_bench(overhead, target, bench.get()); 1139 : setup_cpu_bench(overhead, target, bench.get());
1134 1140
1135 if (FLAGS_ms) { 1141 if (FLAGS_ms) {
1136 samples.reset(); 1142 samples.reset();
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1258 1264
1259 return 0; 1265 return 0;
1260 } 1266 }
1261 1267
1262 #if !defined SK_BUILD_FOR_IOS 1268 #if !defined SK_BUILD_FOR_IOS
1263 int main(int argc, char** argv) { 1269 int main(int argc, char** argv) {
1264 SkCommandLineFlags::Parse(argc, argv); 1270 SkCommandLineFlags::Parse(argc, argv);
1265 return nanobench_main(); 1271 return nanobench_main();
1266 } 1272 }
1267 #endif 1273 #endif
OLDNEW
« no previous file with comments | « no previous file | dm/DM.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698