OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "DMJsonWriter.h" | 8 #include "DMJsonWriter.h" |
9 #include "DMSrcSink.h" | 9 #include "DMSrcSink.h" |
10 #include "DMSrcSinkAndroid.h" | 10 #include "DMSrcSinkAndroid.h" |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 ImageGenSrc* src = new ImageGenSrc(path, mode, alphaType, isGpu); | 489 ImageGenSrc* src = new ImageGenSrc(path, mode, alphaType, isGpu); |
490 push_src("image", folder, src); | 490 push_src("image", folder, src); |
491 } | 491 } |
492 | 492 |
493 static void push_codec_srcs(Path path) { | 493 static void push_codec_srcs(Path path) { |
494 sk_sp<SkData> encoded(SkData::MakeFromFileName(path.c_str())); | 494 sk_sp<SkData> encoded(SkData::MakeFromFileName(path.c_str())); |
495 if (!encoded) { | 495 if (!encoded) { |
496 info("Couldn't read %s.", path.c_str()); | 496 info("Couldn't read %s.", path.c_str()); |
497 return; | 497 return; |
498 } | 498 } |
499 SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(encoded.get())); | 499 SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(encoded)); |
500 if (nullptr == codec.get()) { | 500 if (nullptr == codec.get()) { |
501 info("Couldn't create codec for %s.", path.c_str()); | 501 info("Couldn't create codec for %s.", path.c_str()); |
502 return; | 502 return; |
503 } | 503 } |
504 | 504 |
505 // native scaling is only supported by WEBP and JPEG | 505 // native scaling is only supported by WEBP and JPEG |
506 bool supportsNativeScaling = false; | 506 bool supportsNativeScaling = false; |
507 | 507 |
508 SkTArray<CodecSrc::Mode> nativeModes; | 508 SkTArray<CodecSrc::Mode> nativeModes; |
509 nativeModes.push_back(CodecSrc::kCodec_Mode); | 509 nativeModes.push_back(CodecSrc::kCodec_Mode); |
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1435 #endif | 1435 #endif |
1436 } | 1436 } |
1437 } // namespace skiatest | 1437 } // namespace skiatest |
1438 | 1438 |
1439 #if !defined(SK_BUILD_FOR_IOS) | 1439 #if !defined(SK_BUILD_FOR_IOS) |
1440 int main(int argc, char** argv) { | 1440 int main(int argc, char** argv) { |
1441 SkCommandLineFlags::Parse(argc, argv); | 1441 SkCommandLineFlags::Parse(argc, argv); |
1442 return dm_main(); | 1442 return dm_main(); |
1443 } | 1443 } |
1444 #endif | 1444 #endif |
OLD | NEW |