Created attachment 471504 [details] large animated image Open the attached test case. Result: The image will flicker for a few times after the page is loaded. The same flicker will happen if the page is reloaded. NOTE: This only happens if the image is displayed with multiple sizes: small size followed by a larger size. The smaller size is decoded first, so it is not displayed for the larger size and it is requested for decoding. This is the cause of the flicker. Before 276827@main, BitmapImage::draw() had this logic for animated images: if (frameIsCompatible) image = nativeImageAtIndex(m_currentFrame); else if (frameIsBeingDecoded) { // Draw a yellow rectangle if layer border is enabled ... return ImageDrawResult::DidRequestDecoding; } else { // Decode the image frame synchronously. image = nativeImageAtIndexCacheIfNeeded(m_currentFrame, m_currentSubsamplingLevel, } In 276827@main, the last block was deleted. We need to restore this behavior back.
Created attachment 471505 [details] test case
rdar://128557319
Pull request: https://github.com/WebKit/WebKit/pull/29074
Committed 279483@main (bd4296e26d45): <https://commits.webkit.org/279483@main> Reviewed commits have been landed. Closing PR #29074 and removing active labels.