OLD | NEW |
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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 DEFINE_bool(bbh, true, "Build a BBH for SKPs?"); | 112 DEFINE_bool(bbh, true, "Build a BBH for SKPs?"); |
113 DEFINE_bool(mpd, true, "Use MultiPictureDraw for the SKPs?"); | 113 DEFINE_bool(mpd, true, "Use MultiPictureDraw for the SKPs?"); |
114 DEFINE_bool(loopSKP, true, "Loop SKPs like we do for micro benches?"); | 114 DEFINE_bool(loopSKP, true, "Loop SKPs like we do for micro benches?"); |
115 DEFINE_int32(flushEvery, 10, "Flush --outResultsFile every Nth run."); | 115 DEFINE_int32(flushEvery, 10, "Flush --outResultsFile every Nth run."); |
116 DEFINE_bool(resetGpuContext, true, "Reset the GrContext before running each test
."); | 116 DEFINE_bool(resetGpuContext, true, "Reset the GrContext before running each test
."); |
117 DEFINE_bool(gpuStats, false, "Print GPU stats after each gpu benchmark?"); | 117 DEFINE_bool(gpuStats, false, "Print GPU stats after each gpu benchmark?"); |
118 DEFINE_bool(gpuStatsDump, false, "Dump GPU states after each benchmark to json")
; | 118 DEFINE_bool(gpuStatsDump, false, "Dump GPU states after each benchmark to json")
; |
119 DEFINE_bool(keepAlive, false, "Print a message every so often so that we don't t
ime out"); | 119 DEFINE_bool(keepAlive, false, "Print a message every so often so that we don't t
ime out"); |
120 DEFINE_string(useThermalManager, "0,1,10,1000", "enabled,threshold,sleepTimeMs,T
imeoutMs for " | 120 DEFINE_string(useThermalManager, "0,1,10,1000", "enabled,threshold,sleepTimeMs,T
imeoutMs for " |
121 "thermalManager\n"); | 121 "thermalManager\n"); |
122 DEFINE_bool(simpleCodec, false, "Only decode images to N32 opaque or premul"); | |
123 | 122 |
124 DEFINE_string(sourceType, "", | 123 DEFINE_string(sourceType, "", |
125 "Apply usual --match rules to source type: bench, gm, skp, image, etc.")
; | 124 "Apply usual --match rules to source type: bench, gm, skp, image, etc.")
; |
126 DEFINE_string(benchType, "", | 125 DEFINE_string(benchType, "", |
127 "Apply usual --match rules to bench type: micro, recording, playback, sk
codec, etc."); | 126 "Apply usual --match rules to bench type: micro, recording, playback, sk
codec, etc."); |
128 | 127 |
129 static double now_ms() { return SkTime::GetNSecs() * 1e-6; } | 128 static double now_ms() { return SkTime::GetNSecs() * 1e-6; } |
130 | 129 |
131 static SkString humanize(double ms) { | 130 static SkString humanize(double ms) { |
132 if (FLAGS_verbose) return SkStringPrintf("%llu", (uint64_t)(ms*1e6)); | 131 if (FLAGS_verbose) return SkStringPrintf("%llu", (uint64_t)(ms*1e6)); |
(...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1299 | 1298 |
1300 return 0; | 1299 return 0; |
1301 } | 1300 } |
1302 | 1301 |
1303 #if !defined SK_BUILD_FOR_IOS | 1302 #if !defined SK_BUILD_FOR_IOS |
1304 int main(int argc, char** argv) { | 1303 int main(int argc, char** argv) { |
1305 SkCommandLineFlags::Parse(argc, argv); | 1304 SkCommandLineFlags::Parse(argc, argv); |
1306 return nanobench_main(); | 1305 return nanobench_main(); |
1307 } | 1306 } |
1308 #endif | 1307 #endif |
OLD | NEW |