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

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: Fix MacOS build. 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') | tools/flags/SkCommonFlags.cpp » ('J')
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 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 for (int i = 0; i < configs.count(); ++i) { 1112 for (int i = 0; i < configs.count(); ++i) {
1113 Target* target = is_enabled(b, configs[i]); 1113 Target* target = is_enabled(b, configs[i]);
1114 if (!target) { 1114 if (!target) {
1115 continue; 1115 continue;
1116 } 1116 }
1117 1117
1118 // During HWUI output this canvas may be nullptr. 1118 // During HWUI output this canvas may be nullptr.
1119 SkCanvas* canvas = target->getCanvas(); 1119 SkCanvas* canvas = target->getCanvas();
1120 const char* config = target->config.name; 1120 const char* config = target->config.name;
1121 1121
1122 if (FLAGS_pre_log) {
1123 SkDebugf("Running %s\t%s\n"
1124 , bench->getUniqueName()
1125 , config);
1126 }
1127
1122 target->setup(); 1128 target->setup();
1123 bench->perCanvasPreDraw(canvas); 1129 bench->perCanvasPreDraw(canvas);
1124 1130
1125 int maxFrameLag; 1131 int maxFrameLag;
1126 int loops = target->needsFrameTiming(&maxFrameLag) 1132 int loops = target->needsFrameTiming(&maxFrameLag)
1127 ? setup_gpu_bench(target, bench.get(), maxFrameLag) 1133 ? setup_gpu_bench(target, bench.get(), maxFrameLag)
1128 : setup_cpu_bench(overhead, target, bench.get()); 1134 : setup_cpu_bench(overhead, target, bench.get());
1129 1135
1130 if (FLAGS_ms) { 1136 if (FLAGS_ms) {
1131 samples.reset(); 1137 samples.reset();
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1253 1259
1254 return 0; 1260 return 0;
1255 } 1261 }
1256 1262
1257 #if !defined SK_BUILD_FOR_IOS 1263 #if !defined SK_BUILD_FOR_IOS
1258 int main(int argc, char** argv) { 1264 int main(int argc, char** argv) {
1259 SkCommandLineFlags::Parse(argc, argv); 1265 SkCommandLineFlags::Parse(argc, argv);
1260 return nanobench_main(); 1266 return nanobench_main();
1261 } 1267 }
1262 #endif 1268 #endif
OLDNEW
« no previous file with comments | « no previous file | dm/DM.cpp » ('j') | tools/flags/SkCommonFlags.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698