skia2/src/codec
Leon Scroggins III 469d67e7d9 Expose more info in SkCodec::FrameInfo
Bug: b/160984428

Add more fields to SkCodec::FrameInfo, which describes the properties of
an individual frame in an animated image. This allows a client that
wishes to seek to determine frame dependencies so that they can decode
an arbitrary frame, which in turn will allow SkCodec to remove
SkCodec::FrameInfo::fRequiredFrame. Currently, SkCodec seeks through the
stream to determine frame dependencies, but this is unnecessary work
(and storage) for a client that does not want to seek.

These fields also support the proposed APIs in go/animated-ndk.

Move SkCodecAnimation::Blend from SkCodecAnimationPriv (and delete that
file) into SkCodecAnimation.h. Rename its values to be more clear.

Merge common code for populating SkCodec::FrameInfo.

Add a test for a GIF with offsets outside the range of the image. Note
that libwebp rejects such an image.

Update libgifcodec.

Change-Id: Ie27e0531e7d62eaae153eccb3105bf2121b5aac4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339857
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Nigel Tao <nigeltao@google.com>
2020-12-02 22:37:20 +00:00
..
SkAndroidCodec.cpp Reland "SkAndroidCodec: Support decoding all frames" 2020-11-16 16:55:48 +00:00
SkAndroidCodecAdapter.cpp Reland "SkAndroidCodec: Support decoding all frames" 2020-11-16 16:55:48 +00:00
SkAndroidCodecAdapter.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkBmpBaseCodec.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkBmpBaseCodec.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkBmpCodec.cpp Enable ClangTidy check modernize-make-unique. 2020-08-03 17:53:52 +00:00
SkBmpCodec.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkBmpMaskCodec.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkBmpMaskCodec.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkBmpRLECodec.cpp Enable ClangTidy check modernize-make-unique. 2020-08-03 17:53:52 +00:00
SkBmpRLECodec.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkBmpStandardCodec.cpp Remove SkTMin and SkTMax 2020-02-07 18:40:09 +00:00
SkBmpStandardCodec.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkCodec.cpp Expose more info in SkCodec::FrameInfo 2020-12-02 22:37:20 +00:00
SkCodecImageGenerator.cpp Reland "Add idea of DataType to SkYUVAPixmapInfo." 2020-09-03 18:05:17 +00:00
SkCodecImageGenerator.h Reland "Add idea of DataType to SkYUVAPixmapInfo." 2020-09-03 18:05:17 +00:00
SkCodecPriv.h Parse out the orientation in the SubIFD of EXIF 2020-10-12 13:50:27 +00:00
SkColorTable.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkColorTable.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkEncodedInfo.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkFrameHolder.h Expose more info in SkCodec::FrameInfo 2020-12-02 22:37:20 +00:00
SkHeifCodec.cpp Expose more info in SkCodec::FrameInfo 2020-12-02 22:37:20 +00:00
SkHeifCodec.h Reland "heif: Add AVIF type and AVIF sniffing" 2020-11-05 15:25:52 +00:00
SkIcoCodec.cpp Update SkTQSort to use half-open ranges. 2020-07-14 22:13:59 +00:00
SkIcoCodec.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkJpegCodec.cpp Split SkYUVAInfo::PlanarConfig into PlaneConfig and Subsampling enums 2020-11-11 22:42:36 +00:00
SkJpegCodec.h Reland "Add idea of DataType to SkYUVAPixmapInfo." 2020-09-03 18:05:17 +00:00
SkJpegDecoderMgr.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkJpegDecoderMgr.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkJpegPriv.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkJpegUtility.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkJpegUtility.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkMasks.cpp Enable ClangTidy check readability-const-return-type. 2020-08-07 17:42:38 +00:00
SkMasks.h Remove 565 mask data from GrStrikeCache to constexpr varialbe 2020-02-03 16:27:05 +00:00
SkMaskSwizzler.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkMaskSwizzler.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkParseEncodedOrigin.cpp Parse out the orientation in the SubIFD of EXIF 2020-10-12 13:50:27 +00:00
SkParseEncodedOrigin.h Move is_orientation_marker into its own file 2019-09-24 17:08:03 +00:00
SkPngCodec.cpp Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkPngCodec.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkPngPriv.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkRawCodec.cpp [fuzz] Standardize, document, and backport fuzzing defines. 2020-09-14 13:36:10 +00:00
SkRawCodec.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkSampledCodec.cpp Reland "SkAndroidCodec: Support decoding all frames" 2020-11-16 16:55:48 +00:00
SkSampledCodec.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkSampler.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkSampler.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkScalingCodec.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkStreamBuffer.cpp Remove SkTMin and SkTMax 2020-02-07 18:40:09 +00:00
SkStreamBuffer.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkStubHeifDecoderAPI.h Remove SK_LEGACY_HEIF_API 2019-08-22 16:28:29 +00:00
SkSwizzler.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkSwizzler.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkWbmpCodec.cpp rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
SkWbmpCodec.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkWebpCodec.cpp Expose more info in SkCodec::FrameInfo 2020-12-02 22:37:20 +00:00
SkWebpCodec.h Replace 'typedef xxxxx INHERITED' with 'using INHERITED = xxxx;'. 2020-09-03 03:41:26 +00:00
SkWuffsCodec.cpp Expose more info in SkCodec::FrameInfo 2020-12-02 22:37:20 +00:00
SkWuffsCodec.h rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00