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 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 // SkJpegCodec natively supports scaling to the following: | 583 // SkJpegCodec natively supports scaling to the following: |
584 for (auto scale : { 0.125f, 0.25f, 0.375f, 0.5f, 0.625f, 0.7
50f, 0.875f }) { | 584 for (auto scale : { 0.125f, 0.25f, 0.375f, 0.5f, 0.625f, 0.7
50f, 0.875f }) { |
585 push_codec_src(path, mode, colorType, alphaType, scale); | 585 push_codec_src(path, mode, colorType, alphaType, scale); |
586 } | 586 } |
587 } | 587 } |
588 } | 588 } |
589 } | 589 } |
590 } | 590 } |
591 | 591 |
592 { | 592 { |
593 std::vector<SkCodec::FrameInfo> frameInfos = codec->getFrameInfo(); | 593 std::vector<SkCodec::FrameInfo> frameInfos; |
594 if (frameInfos.size() > 1) { | 594 if (codec->getFrameInfo(&frameInfos, nullptr) && frameInfos.size() > 1)
{ |
595 push_codec_src(path, CodecSrc::kAnimated_Mode, CodecSrc::kGetFromCan
vas_DstColorType, | 595 push_codec_src(path, CodecSrc::kAnimated_Mode, CodecSrc::kGetFromCan
vas_DstColorType, |
596 kPremul_SkAlphaType, 1.0f); | 596 kPremul_SkAlphaType, 1.0f); |
597 } | 597 } |
598 | 598 |
599 } | 599 } |
600 | 600 |
601 if (FLAGS_simpleCodec) { | 601 if (FLAGS_simpleCodec) { |
602 return; | 602 return; |
603 } | 603 } |
604 | 604 |
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1452 #endif | 1452 #endif |
1453 } | 1453 } |
1454 } // namespace skiatest | 1454 } // namespace skiatest |
1455 | 1455 |
1456 #if !defined(SK_BUILD_FOR_IOS) | 1456 #if !defined(SK_BUILD_FOR_IOS) |
1457 int main(int argc, char** argv) { | 1457 int main(int argc, char** argv) { |
1458 SkCommandLineFlags::Parse(argc, argv); | 1458 SkCommandLineFlags::Parse(argc, argv); |
1459 return dm_main(); | 1459 return dm_main(); |
1460 } | 1460 } |
1461 #endif | 1461 #endif |
OLD | NEW |