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 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 return nullptr; | 882 return nullptr; |
883 } | 883 } |
884 | 884 |
885 void fillCurrentOptions(ResultsWriter* log) const { | 885 void fillCurrentOptions(ResultsWriter* log) const { |
886 log->configOption("source_type", fSourceType); | 886 log->configOption("source_type", fSourceType); |
887 log->configOption("bench_type", fBenchType); | 887 log->configOption("bench_type", fBenchType); |
888 if (0 == strcmp(fSourceType, "skp")) { | 888 if (0 == strcmp(fSourceType, "skp")) { |
889 log->configOption("clip", | 889 log->configOption("clip", |
890 SkStringPrintf("%d %d %d %d", fClip.fLeft, fClip.fTop, | 890 SkStringPrintf("%d %d %d %d", fClip.fLeft, fClip.fTop, |
891 fClip.fRight, fClip.fBottom).c
_str()); | 891 fClip.fRight, fClip.fBottom).c
_str()); |
892 SK_ALWAYSBREAK(fCurrentScale < fScales.count()); // debugging paran
oia | 892 SkASSERT_RELEASE(fCurrentScale < fScales.count()); // debugging par
anoia |
893 log->configOption("scale", SkStringPrintf("%.2g", fScales[fCurrentSc
ale]).c_str()); | 893 log->configOption("scale", SkStringPrintf("%.2g", fScales[fCurrentSc
ale]).c_str()); |
894 if (fCurrentUseMPD > 0) { | 894 if (fCurrentUseMPD > 0) { |
895 SkASSERT(1 == fCurrentUseMPD || 2 == fCurrentUseMPD); | 895 SkASSERT(1 == fCurrentUseMPD || 2 == fCurrentUseMPD); |
896 log->configOption("multi_picture_draw", fUseMPDs[fCurrentUseMPD-
1] ? "true" : "false"); | 896 log->configOption("multi_picture_draw", fUseMPDs[fCurrentUseMPD-
1] ? "true" : "false"); |
897 } | 897 } |
898 } | 898 } |
899 if (0 == strcmp(fBenchType, "recording")) { | 899 if (0 == strcmp(fBenchType, "recording")) { |
900 log->metric("bytes", fSKPBytes); | 900 log->metric("bytes", fSKPBytes); |
901 log->metric("ops", fSKPOps); | 901 log->metric("ops", fSKPOps); |
902 } | 902 } |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1205 | 1205 |
1206 return 0; | 1206 return 0; |
1207 } | 1207 } |
1208 | 1208 |
1209 #if !defined SK_BUILD_FOR_IOS | 1209 #if !defined SK_BUILD_FOR_IOS |
1210 int main(int argc, char** argv) { | 1210 int main(int argc, char** argv) { |
1211 SkCommandLineFlags::Parse(argc, argv); | 1211 SkCommandLineFlags::Parse(argc, argv); |
1212 return nanobench_main(); | 1212 return nanobench_main(); |
1213 } | 1213 } |
1214 #endif | 1214 #endif |
OLD | NEW |