| 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 627 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 638         } | 638         } | 
| 639     } | 639     } | 
| 640 | 640 | 
| 641     static sk_sp<SkPicture> ReadPicture(const char* path) { | 641     static sk_sp<SkPicture> ReadPicture(const char* path) { | 
| 642         // Not strictly necessary, as it will be checked again later, | 642         // Not strictly necessary, as it will be checked again later, | 
| 643         // but helps to avoid a lot of pointless work if we're going to skip it. | 643         // but helps to avoid a lot of pointless work if we're going to skip it. | 
| 644         if (SkCommandLineFlags::ShouldSkip(FLAGS_match, SkOSPath::Basename(path)
      .c_str())) { | 644         if (SkCommandLineFlags::ShouldSkip(FLAGS_match, SkOSPath::Basename(path)
      .c_str())) { | 
| 645             return nullptr; | 645             return nullptr; | 
| 646         } | 646         } | 
| 647 | 647 | 
| 648         SkAutoTDelete<SkStream> stream(SkStream::NewFromFile(path)); | 648         std::unique_ptr<SkStream> stream = SkStream::MakeFromFile(path); | 
| 649         if (stream.get() == nullptr) { | 649         if (!stream) { | 
| 650             SkDebugf("Could not read %s.\n", path); | 650             SkDebugf("Could not read %s.\n", path); | 
| 651             return nullptr; | 651             return nullptr; | 
| 652         } | 652         } | 
| 653 | 653 | 
| 654         return SkPicture::MakeFromStream(stream.get()); | 654         return SkPicture::MakeFromStream(stream.get()); | 
| 655     } | 655     } | 
| 656 | 656 | 
| 657     static sk_sp<SkPicture> ReadSVGPicture(const char* path) { | 657     static sk_sp<SkPicture> ReadSVGPicture(const char* path) { | 
| 658         SkFILEStream stream(path); | 658         SkFILEStream stream(path); | 
| 659         if (!stream.isValid()) { | 659         if (!stream.isValid()) { | 
| (...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1347 | 1347 | 
| 1348     return 0; | 1348     return 0; | 
| 1349 } | 1349 } | 
| 1350 | 1350 | 
| 1351 #if !defined SK_BUILD_FOR_IOS | 1351 #if !defined SK_BUILD_FOR_IOS | 
| 1352 int main(int argc, char** argv) { | 1352 int main(int argc, char** argv) { | 
| 1353     SkCommandLineFlags::Parse(argc, argv); | 1353     SkCommandLineFlags::Parse(argc, argv); | 
| 1354     return nanobench_main(); | 1354     return nanobench_main(); | 
| 1355 } | 1355 } | 
| 1356 #endif | 1356 #endif | 
| OLD | NEW | 
|---|