Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r244372 - ScalableImageDecoder: don't forcefully decode image d…
…ata when querying frame completeness, duration https://bugs.webkit.org/show_bug.cgi?id=191354 <rdar://problem/46123406> Reviewed by Michael Catanzaro. ScalableImageDecoder::frameIsCompleteAtIndex() should only check the index validity and, if the index is valid, check for completeness of the corresponding frame. ScalableImageDecoder::frameDurationAtIndex() should also only retrieve duration for already-complete frames, or expand the default 0-second value according to the flashing-protection rule when the target frame is not yet complete. Both methods avoid calling ScalableImageDecoder::frameBufferAtIndex() as that method goes on and decodes image data to determine specific information. The ImageSource class that's querying this information doesn't anticipate this, and doesn't handle the increased memory consumption of the decoded data, leaving MemoryCache in the blind about the image resource's actual amount of consumed memory. ImageSource can instead gracefully handle any incomplete frame by marking the decoding status for this frame as only partial. * platform/image-decoders/ScalableImageDecoder.cpp: (WebCore::ScalableImageDecoder::frameIsCompleteAtIndex const): (WebCore::ScalableImageDecoder::frameHasAlphaAtIndex const): (WebCore::ScalableImageDecoder::frameDurationAtIndex const):
- Loading branch information
1 parent
9604568
commit 9589f91
Showing
2 changed files
with
51 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters