Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(811)

Side by Side Diff: dm/DM.cpp

Issue 2447863002: Report repetition count in SkCodec (Closed)
Patch Set: Return a bool, with multiple out parameters Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | dm/DMSrcSink.cpp » ('j') | include/codec/SkCodec.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | dm/DMSrcSink.cpp » ('j') | include/codec/SkCodec.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698