Implement our own avifIO reader.
The avifIO reader allows blink::AVIFImageDecoder to support incremental decoding partially. blink::AVIFImageDecoder still cannot output parts of a frame incrementally (such as row by row), but for a multi-frame image, it can output full frames incrementally. In addition, it can decode image metadata (such as image size and frame count) incrementally before IsAllDataReceived() becomes true. Implement the FrameIsReceivedAtIndex() method. Change DecodeFrameCount() to return increasing frame count as frames are received. This change requires including avif.h in avif_image_decoder.h. As a result, forward declarations of libavif types are removed from avif_image_decoder.h. TestInvalidStaticImage() needs to call IsSizeAvailable() explicitly because blink::ImageDecoder::SetData() with all_data_received=true no longer causes size to be decoded. Bug: 1136922 Bug: 1148577 Change-Id: I089f34711547f31030a1ea39d1f58f42106582e7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2530221 Commit-Queue: Wan-Teh Chang <wtc@google.com> Reviewed-by:Peter Kasting <pkasting@chromium.org> Reviewed-by:
Dale Curtis <dalecurtis@chromium.org> Cr-Commit-Position: refs/heads/master@{#827569}
Showing
This diff is collapsed.
Please register or sign in to comment