| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "BenchTimer.h" | 8 #include "BenchTimer.h" |
| 9 #include "LazyDecodeBitmap.h" | 9 #include "LazyDecodeBitmap.h" |
| 10 #include "PictureBenchmark.h" | 10 #include "PictureBenchmark.h" |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 } | 303 } |
| 304 | 304 |
| 305 SkScalar cpuTime = SkDoubleToScalar(atof(timerResult.c_str() + pos + sizeof(
findStr) - 1)); | 305 SkScalar cpuTime = SkDoubleToScalar(atof(timerResult.c_str() + pos + sizeof(
findStr) - 1)); |
| 306 if (cpuTime == 0) { // atof returns 0.0 on error. | 306 if (cpuTime == 0) { // atof returns 0.0 on error. |
| 307 SkDebugf("Unable to read value from timer result.\n"); | 307 SkDebugf("Unable to read value from timer result.\n"); |
| 308 return false; | 308 return false; |
| 309 } | 309 } |
| 310 return true; | 310 return true; |
| 311 } | 311 } |
| 312 | 312 |
| 313 static int tool_main(int argc, char** argv) { | 313 int tool_main(int argc, char** argv); |
| 314 int tool_main(int argc, char** argv) { |
| 314 SkAutoGraphics ag; | 315 SkAutoGraphics ag; |
| 315 SkString usage; | 316 SkString usage; |
| 316 usage.printf("Usage: filename [filename]*\n"); | 317 usage.printf("Usage: filename [filename]*\n"); |
| 317 | 318 |
| 318 if (argc < 2) { | 319 if (argc < 2) { |
| 319 SkDebugf("%s\n", usage.c_str()); | 320 SkDebugf("%s\n", usage.c_str()); |
| 320 return -1; | 321 return -1; |
| 321 } | 322 } |
| 322 | 323 |
| 323 Histogram* histograms[kNumBenchmarks]; | 324 Histogram* histograms[kNumBenchmarks]; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 } | 377 } |
| 377 SkDebugf("\nWrote data to gnuplot-readable files: %s %s\n", pbTitle, recTitl
e); | 378 SkDebugf("\nWrote data to gnuplot-readable files: %s %s\n", pbTitle, recTitl
e); |
| 378 | 379 |
| 379 return 0; | 380 return 0; |
| 380 } | 381 } |
| 381 | 382 |
| 382 int main(int argc, char** argv) { | 383 int main(int argc, char** argv) { |
| 383 return tool_main(argc, argv); | 384 return tool_main(argc, argv); |
| 384 } | 385 } |
| 385 | 386 |
| OLD | NEW |