Optimize ImageDecoderCG::frameAllowSubsamplingAtIndex() currently checks if the image is a Progressive JPEG. We do not need CGImageSourceCopyPropertiesAtIndex() for non-JPEG images.
Created attachment 341219 [details] Patch
Comment on attachment 341219 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=341219&action=review r=me > Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp:388 > + // Workaround for <rdar://problem/5184655> - Hang rendering very large progressive JPEG. Decoding progressive > + // images hangs for a very long time right now. Until this is fixed, don't sub-sample progressive images. This > + // will cause them to fail our large image check and they won't be decoded. > + // FIXME: Remove once underlying issue is fixed (<rdar://problem/5191418>) This patch is fine -- but the FIXME here is about a bug that was fixed in 2014. Maybe we should just remove this code entirely?
(In reply to Geoffrey Garen from comment #2) > Comment on attachment 341219 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=341219&action=review > > r=me > > > Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp:388 > > + // Workaround for <rdar://problem/5184655> - Hang rendering very large progressive JPEG. Decoding progressive > > + // images hangs for a very long time right now. Until this is fixed, don't sub-sample progressive images. This > > + // will cause them to fail our large image check and they won't be decoded. > > + // FIXME: Remove once underlying issue is fixed (<rdar://problem/5191418>) > > This patch is fine -- but the FIXME here is about a bug that was fixed in > 2014. Maybe we should just remove this code entirely? Simon, do you think we can remove this code entirely?
(In reply to Chris Dumez from comment #3) > (In reply to Geoffrey Garen from comment #2) > > Comment on attachment 341219 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=341219&action=review > > > > r=me > > > > > Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp:388 > > > + // Workaround for <rdar://problem/5184655> - Hang rendering very large progressive JPEG. Decoding progressive > > > + // images hangs for a very long time right now. Until this is fixed, don't sub-sample progressive images. This > > > + // will cause them to fail our large image check and they won't be decoded. > > > + // FIXME: Remove once underlying issue is fixed (<rdar://problem/5191418>) > > > > This patch is fine -- but the FIXME here is about a bug that was fixed in > > 2014. Maybe we should just remove this code entirely? > > Simon, do you think we can remove this code entirely? I uploaded the test image to https://ibb.co/bG0pwT. I'll drop the code and try to load it.
Created attachment 341227 [details] Patch
Comment on attachment 341227 [details] Patch Clearing flags on attachment: 341227 Committed r232177: <https://trac.webkit.org/changeset/232177>
All reviewed patches have been landed. Closing bug.
<rdar://problem/40541935>