| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 "SkCodec.h" | 8 #include "SkCodec.h" |
| 9 #include "SkCommandLineFlags.h" | 9 #include "SkCommandLineFlags.h" |
| 10 #include "SkData.h" | 10 #include "SkData.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 | 83 |
| 84 if (!sk_isdir(inputs) || !sk_isdir(gOutputDir)) { | 84 if (!sk_isdir(inputs) || !sk_isdir(gOutputDir)) { |
| 85 SkCommandLineFlags::PrintUsage(); | 85 SkCommandLineFlags::PrintUsage(); |
| 86 return 1; | 86 return 1; |
| 87 } | 87 } |
| 88 | 88 |
| 89 SkOSFile::Iter iter(inputs, "skp"); | 89 SkOSFile::Iter iter(inputs, "skp"); |
| 90 for (SkString file; iter.next(&file); ) { | 90 for (SkString file; iter.next(&file); ) { |
| 91 SkAutoTDelete<SkStream> stream = | 91 SkAutoTDelete<SkStream> stream = |
| 92 SkStream::NewFromFile(SkOSPath::Join(inputs, file.c_str()).c_str
()); | 92 SkStream::NewFromFile(SkOSPath::Join(inputs, file.c_str()).c_str
()); |
| 93 SkAutoTUnref<SkPicture> picture(SkPicture::CreateFromStream(stream)); | 93 sk_sp<SkPicture> picture(SkPicture::MakeFromStream(stream)); |
| 94 | 94 |
| 95 SkDynamicMemoryWStream scratch; | 95 SkDynamicMemoryWStream scratch; |
| 96 Sniffer sniff; | 96 Sniffer sniff; |
| 97 picture->serialize(&scratch, &sniff); | 97 picture->serialize(&scratch, &sniff); |
| 98 } | 98 } |
| 99 SkDebugf("%d known, %d unknown\n", gKnown, gUnknown); | 99 SkDebugf("%d known, %d unknown\n", gKnown, gUnknown); |
| 100 | 100 |
| 101 return 0; | 101 return 0; |
| 102 } | 102 } |
| OLD | NEW |