OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "CopyTilesRenderer.h" | 9 #include "CopyTilesRenderer.h" |
10 #include "LazyDecodeBitmap.h" | 10 #include "LazyDecodeBitmap.h" |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 } | 367 } |
368 | 368 |
369 static int process_input(const char* input, | 369 static int process_input(const char* input, |
370 sk_tools::PictureBenchmark& benchmark) { | 370 sk_tools::PictureBenchmark& benchmark) { |
371 SkString inputAsSkString(input); | 371 SkString inputAsSkString(input); |
372 SkOSFile::Iter iter(input, "skp"); | 372 SkOSFile::Iter iter(input, "skp"); |
373 SkString inputFilename; | 373 SkString inputFilename; |
374 int failures = 0; | 374 int failures = 0; |
375 if (iter.next(&inputFilename)) { | 375 if (iter.next(&inputFilename)) { |
376 do { | 376 do { |
377 SkString inputPath; | 377 SkString inputPath = SkOSPath::SkPathJoin(input, inputFilename.c_str
()); |
378 sk_tools::make_filepath(&inputPath, inputAsSkString, inputFilename); | |
379 if (!run_single_benchmark(inputPath, benchmark)) { | 378 if (!run_single_benchmark(inputPath, benchmark)) { |
380 ++failures; | 379 ++failures; |
381 } | 380 } |
382 } while(iter.next(&inputFilename)); | 381 } while(iter.next(&inputFilename)); |
383 } else if (SkStrEndsWith(input, ".skp")) { | 382 } else if (SkStrEndsWith(input, ".skp")) { |
384 if (!run_single_benchmark(inputAsSkString, benchmark)) { | 383 if (!run_single_benchmark(inputAsSkString, benchmark)) { |
385 ++failures; | 384 ++failures; |
386 } | 385 } |
387 } else { | 386 } else { |
388 SkString warning; | 387 SkString warning; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 #endif | 458 #endif |
460 gWriter.end(); | 459 gWriter.end(); |
461 return 0; | 460 return 0; |
462 } | 461 } |
463 | 462 |
464 #if !defined SK_BUILD_FOR_IOS | 463 #if !defined SK_BUILD_FOR_IOS |
465 int main(int argc, char * const argv[]) { | 464 int main(int argc, char * const argv[]) { |
466 return tool_main(argc, (char**) argv); | 465 return tool_main(argc, (char**) argv); |
467 } | 466 } |
468 #endif | 467 #endif |
OLD | NEW |