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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 DEFINE_bool(gpuStatsDump, false, "Dump GPU states after each benchmark to json")
; | 116 DEFINE_bool(gpuStatsDump, false, "Dump GPU states after each benchmark to json")
; |
117 DEFINE_bool(keepAlive, false, "Print a message every so often so that we don't t
ime out"); | 117 DEFINE_bool(keepAlive, false, "Print a message every so often so that we don't t
ime out"); |
118 DEFINE_string(useThermalManager, "0,1,10,1000", "enabled,threshold,sleepTimeMs,T
imeoutMs for " | 118 DEFINE_string(useThermalManager, "0,1,10,1000", "enabled,threshold,sleepTimeMs,T
imeoutMs for " |
119 "thermalManager\n"); | 119 "thermalManager\n"); |
120 | 120 |
121 DEFINE_string(sourceType, "", | 121 DEFINE_string(sourceType, "", |
122 "Apply usual --match rules to source type: bench, gm, skp, image, etc.")
; | 122 "Apply usual --match rules to source type: bench, gm, skp, image, etc.")
; |
123 DEFINE_string(benchType, "", | 123 DEFINE_string(benchType, "", |
124 "Apply usual --match rules to bench type: micro, recording, playback, sk
codec, etc."); | 124 "Apply usual --match rules to bench type: micro, recording, playback, sk
codec, etc."); |
125 | 125 |
126 DEFINE_bool(forceSRGB, false, "Force SRGB for imageinfos"); | |
127 | |
128 static double now_ms() { return SkTime::GetNSecs() * 1e-6; } | 126 static double now_ms() { return SkTime::GetNSecs() * 1e-6; } |
129 | 127 |
130 static SkString humanize(double ms) { | 128 static SkString humanize(double ms) { |
131 if (FLAGS_verbose) return SkStringPrintf("%llu", (uint64_t)(ms*1e6)); | 129 if (FLAGS_verbose) return SkStringPrintf("%llu", (uint64_t)(ms*1e6)); |
132 return HumanizeMs(ms); | 130 return HumanizeMs(ms); |
133 } | 131 } |
134 #define HUMANIZE(ms) humanize(ms).c_str() | 132 #define HUMANIZE(ms) humanize(ms).c_str() |
135 | 133 |
136 bool Target::init(SkImageInfo info, Benchmark* bench) { | 134 bool Target::init(SkImageInfo info, Benchmark* bench) { |
137 if (Benchmark::kRaster_Backend == config.backend) { | 135 if (Benchmark::kRaster_Backend == config.backend) { |
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1267 | 1265 |
1268 return 0; | 1266 return 0; |
1269 } | 1267 } |
1270 | 1268 |
1271 #if !defined SK_BUILD_FOR_IOS | 1269 #if !defined SK_BUILD_FOR_IOS |
1272 int main(int argc, char** argv) { | 1270 int main(int argc, char** argv) { |
1273 SkCommandLineFlags::Parse(argc, argv); | 1271 SkCommandLineFlags::Parse(argc, argv); |
1274 return nanobench_main(); | 1272 return nanobench_main(); |
1275 } | 1273 } |
1276 #endif | 1274 #endif |
OLD | NEW |