For PNG and GIF images, async decoding is used if the file size is bigger than a threshold, otherwise sync decoding is used. Bug 170333, which happens because async decoding stopped being used, revealed that sync decoding is not working properly.
There seems to be an error in ImageFrameCache::destroyDecodedData(). Theoretically this should destroy all the decoded frames except one we want to keep, but what it's actually doing is destroying all the odd ones (including the one we want to keep if it's odd).
Created attachment 306481 [details] Patch
Comment on attachment 306481 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=306481&action=review > Source/WebCore/platform/graphics/ImageFrameCache.cpp:101 > - decodedSize += m_frames[index++].clearImage(); > + decodedSize += m_frames[index].clearImage(); oh! good catch!
Comment on attachment 306481 [details] Patch Clearing flags on attachment: 306481 Committed r215091: <http://trac.webkit.org/changeset/215091>
All reviewed patches have been landed. Closing bug.
<rdar://problem/31617277>