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 "Benchmark.h" | 10 #include "Benchmark.h" |
11 #include "CrashHandler.h" | 11 #include "CrashHandler.h" |
12 #include "GMBench.h" | 12 #include "GMBench.h" |
13 #include "LazyDecodeBitmap.h" | |
14 #include "ProcStats.h" | 13 #include "ProcStats.h" |
15 #include "ResultsWriter.h" | 14 #include "ResultsWriter.h" |
16 #include "RecordingBench.h" | 15 #include "RecordingBench.h" |
17 #include "SKPBench.h" | 16 #include "SKPBench.h" |
18 #include "Stats.h" | 17 #include "Stats.h" |
19 #include "Timer.h" | 18 #include "Timer.h" |
20 | 19 |
21 #include "SkBBHFactory.h" | 20 #include "SkBBHFactory.h" |
22 #include "SkCanvas.h" | 21 #include "SkCanvas.h" |
23 #include "SkCommonFlags.h" | 22 #include "SkCommonFlags.h" |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 if (SkCommandLineFlags::ShouldSkip(FLAGS_match, path)) { | 443 if (SkCommandLineFlags::ShouldSkip(FLAGS_match, path)) { |
445 return false; | 444 return false; |
446 } | 445 } |
447 | 446 |
448 SkAutoTUnref<SkStream> stream(SkStream::NewFromFile(path)); | 447 SkAutoTUnref<SkStream> stream(SkStream::NewFromFile(path)); |
449 if (stream.get() == NULL) { | 448 if (stream.get() == NULL) { |
450 SkDebugf("Could not read %s.\n", path); | 449 SkDebugf("Could not read %s.\n", path); |
451 return false; | 450 return false; |
452 } | 451 } |
453 | 452 |
454 pic->reset(SkPicture::CreateFromStream(stream.get(), sk_tools::LazyDecod
eBitmap)); | 453 pic->reset(SkPicture::CreateFromStream(stream.get())); |
455 if (pic->get() == NULL) { | 454 if (pic->get() == NULL) { |
456 SkDebugf("Could not read %s as an SkPicture.\n", path); | 455 SkDebugf("Could not read %s as an SkPicture.\n", path); |
457 return false; | 456 return false; |
458 } | 457 } |
459 return true; | 458 return true; |
460 } | 459 } |
461 | 460 |
462 Benchmark* next() { | 461 Benchmark* next() { |
463 if (fBenches) { | 462 if (fBenches) { |
464 Benchmark* bench = fBenches->factory()(NULL); | 463 Benchmark* bench = fBenches->factory()(NULL); |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 | 713 |
715 return 0; | 714 return 0; |
716 } | 715 } |
717 | 716 |
718 #if !defined SK_BUILD_FOR_IOS | 717 #if !defined SK_BUILD_FOR_IOS |
719 int main(int argc, char** argv) { | 718 int main(int argc, char** argv) { |
720 SkCommandLineFlags::Parse(argc, argv); | 719 SkCommandLineFlags::Parse(argc, argv); |
721 return nanobench_main(); | 720 return nanobench_main(); |
722 } | 721 } |
723 #endif | 722 #endif |
OLD | NEW |