| 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 "SkBBoxHierarchy.h" | 20 #include "SkBBoxHierarchy.h" |
| 22 #include "SkCanvas.h" | 21 #include "SkCanvas.h" |
| 23 #include "SkCommonFlags.h" | 22 #include "SkCommonFlags.h" |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 if (SkCommandLineFlags::ShouldSkip(FLAGS_match, path)) { | 480 if (SkCommandLineFlags::ShouldSkip(FLAGS_match, path)) { |
| 482 return false; | 481 return false; |
| 483 } | 482 } |
| 484 | 483 |
| 485 SkAutoTUnref<SkStream> stream(SkStream::NewFromFile(path)); | 484 SkAutoTUnref<SkStream> stream(SkStream::NewFromFile(path)); |
| 486 if (stream.get() == NULL) { | 485 if (stream.get() == NULL) { |
| 487 SkDebugf("Could not read %s.\n", path); | 486 SkDebugf("Could not read %s.\n", path); |
| 488 return false; | 487 return false; |
| 489 } | 488 } |
| 490 | 489 |
| 491 pic->reset(SkPicture::CreateFromStream(stream.get(), &sk_tools::LazyDeco
deBitmap)); | 490 pic->reset(SkPicture::CreateFromStream(stream.get())); |
| 492 if (pic->get() == NULL) { | 491 if (pic->get() == NULL) { |
| 493 SkDebugf("Could not read %s as an SkPicture.\n", path); | 492 SkDebugf("Could not read %s as an SkPicture.\n", path); |
| 494 return false; | 493 return false; |
| 495 } | 494 } |
| 496 return true; | 495 return true; |
| 497 } | 496 } |
| 498 | 497 |
| 499 Benchmark* next() { | 498 Benchmark* next() { |
| 500 if (fBenches) { | 499 if (fBenches) { |
| 501 Benchmark* bench = fBenches->factory()(NULL); | 500 Benchmark* bench = fBenches->factory()(NULL); |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 | 787 |
| 789 return 0; | 788 return 0; |
| 790 } | 789 } |
| 791 | 790 |
| 792 #if !defined SK_BUILD_FOR_IOS | 791 #if !defined SK_BUILD_FOR_IOS |
| 793 int main(int argc, char** argv) { | 792 int main(int argc, char** argv) { |
| 794 SkCommandLineFlags::Parse(argc, argv); | 793 SkCommandLineFlags::Parse(argc, argv); |
| 795 return nanobench_main(); | 794 return nanobench_main(); |
| 796 } | 795 } |
| 797 #endif | 796 #endif |
| OLD | NEW |