Chromium Code Reviews
DescriptionDo not set m_decodeFailed in ImageFrameGenerator::decodeToYUV
This method sets m_decodeFailed bit to be true at the end on VUY
decode failure, which can result a null SkImage in
DeferredImageDecoder::createFrameAtIndex()
when Ganesh is enabled and the image is Progressive JPEG. Ganesh
falls back to displaying an RGBA decoded image on decode failure
but the null SkImage was shown instead (see bug examples).
When decodeToYUV() fails, do not set m_decodeFailed. Instead set
m_yuvDecodingFailed to allow Ganesh fallback logic (that decodes
the image to RGBA on the CPU) to render Progressive JPEG. Update
getYUVComponentSizes() to early return if m_yuvDecodingFailed to
deny subsequent Ganesh requests to YUV decode the image.
BUG=597127
Review URL: https://codereview.chromium.org/1829923004
Cr-Commit-Position: refs/heads/master@{#383472}
(cherry picked from commit 0e4b0bc92e29939d10ff76a3540b4c2b3b5549b6)
Committed: https://chromium.googlesource.com/chromium/src/+/e367e01f30ded9fef9dac6a8574cc372e5b05e0f
Patch Set 1 #
Messages
Total messages: 2 (1 generated)
|
||||||||||||||||||||||||||||