Parse image metadata when all data is received
Change AVIFImageDecoder::OnSetData() to parse the image metadata automatically when all data is received. This meets the expectations of ImageFrameGenerator::GetYUVAInfo() and ImageFrameGenerator::DecodeToYUV(). In the ReadYUV() function in avif_image_decoder_test.cc, change the IsSizeAvailable() call (which calls DecodeSize()) to IsDecodedSizeAvailable() (which has no side effects) and call a few more getter methods related to DecodeToYUV() to emulate the code in ImageFrameGenerator::GetYUVAInfo() and ImageFrameGenerator::DecodeToYUV(). Bug: 1149144 Bug: 1136922 Change-Id: I3790de99fd0e9745c4b3ab9555aa027f25a6d374 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2539329Reviewed-by:Dale Curtis <dalecurtis@chromium.org> Reviewed-by:
Peter Kasting <pkasting@chromium.org> Commit-Queue: Wan-Teh Chang <wtc@google.com> Cr-Commit-Position: refs/heads/master@{#827852}
Showing
Please register or sign in to comment