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 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1077 return nullptr; | 1077 return nullptr; |
1078 } | 1078 } |
1079 | 1079 |
1080 void fillCurrentOptions(ResultsWriter* log) const { | 1080 void fillCurrentOptions(ResultsWriter* log) const { |
1081 log->configOption("source_type", fSourceType); | 1081 log->configOption("source_type", fSourceType); |
1082 log->configOption("bench_type", fBenchType); | 1082 log->configOption("bench_type", fBenchType); |
1083 if (0 == strcmp(fSourceType, "skp")) { | 1083 if (0 == strcmp(fSourceType, "skp")) { |
1084 log->configOption("clip", | 1084 log->configOption("clip", |
1085 SkStringPrintf("%d %d %d %d", fClip.fLeft, fClip.fTop, | 1085 SkStringPrintf("%d %d %d %d", fClip.fLeft, fClip.fTop, |
1086 fClip.fRight, fClip.fBottom).c
_str()); | 1086 fClip.fRight, fClip.fBottom).c
_str()); |
| 1087 SK_ALWAYSBREAK(fCurrentScale < fScales.count()); // debugging paran
oia |
1087 log->configOption("scale", SkStringPrintf("%.2g", fScales[fCurrentSc
ale]).c_str()); | 1088 log->configOption("scale", SkStringPrintf("%.2g", fScales[fCurrentSc
ale]).c_str()); |
1088 if (fCurrentUseMPD > 0) { | 1089 if (fCurrentUseMPD > 0) { |
1089 SkASSERT(1 == fCurrentUseMPD || 2 == fCurrentUseMPD); | 1090 SkASSERT(1 == fCurrentUseMPD || 2 == fCurrentUseMPD); |
1090 log->configOption("multi_picture_draw", fUseMPDs[fCurrentUseMPD-
1] ? "true" : "false"); | 1091 log->configOption("multi_picture_draw", fUseMPDs[fCurrentUseMPD-
1] ? "true" : "false"); |
1091 } | 1092 } |
1092 } | 1093 } |
1093 if (0 == strcmp(fBenchType, "recording")) { | 1094 if (0 == strcmp(fBenchType, "recording")) { |
1094 log->metric("bytes", fSKPBytes); | 1095 log->metric("bytes", fSKPBytes); |
1095 log->metric("ops", fSKPOps); | 1096 log->metric("ops", fSKPOps); |
1096 } | 1097 } |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1363 | 1364 |
1364 return 0; | 1365 return 0; |
1365 } | 1366 } |
1366 | 1367 |
1367 #if !defined SK_BUILD_FOR_IOS | 1368 #if !defined SK_BUILD_FOR_IOS |
1368 int main(int argc, char** argv) { | 1369 int main(int argc, char** argv) { |
1369 SkCommandLineFlags::Parse(argc, argv); | 1370 SkCommandLineFlags::Parse(argc, argv); |
1370 return nanobench_main(); | 1371 return nanobench_main(); |
1371 } | 1372 } |
1372 #endif | 1373 #endif |
OLD | NEW |