RESOLVED INVALID 156945
[CG] REGRESSION (r198782): CGImageSourceCopyPropertiesAtIndex() is called twice when calculating the size of an Image
https://bugs.webkit.org/show_bug.cgi?id=156945
Summary [CG] REGRESSION (r198782): CGImageSourceCopyPropertiesAtIndex() is called twi...
Said Abou-Hallawa
Reported 2016-04-22 21:02:52 PDT
Prior to change r198782, ImageSource was actually the decoder. ImageSource::frameSizeAtIndex() was calculating the size without calling ImageSource::orientationAtIndex(). Instead it was making a single call to CGImageSourceCopyPropertiesAtIndex() and it was using the returned properties to calculate the size and the orientation. Currently ImageSource::frameSizeAtIndex() calls ImageDecoder::frameSizeAtIndex() and ImageDecoder::orientationAtIndex(). Each of these functions makes a call to CGImageSourceCopyPropertiesAtIndex(). Notice: To get the size of an image, BitmapImage::updateSize() calls ImageSource::size() and ImageSource::sizeRespectingOrientation(). Each of these functions calls ImageSource::frameSizeAtIndex(0).-
Attachments
Patch (7.12 KB, patch)
2016-04-22 21:06 PDT, Said Abou-Hallawa
no flags
Said Abou-Hallawa
Comment 1 2016-04-22 21:06:01 PDT
Said Abou-Hallawa
Comment 2 2016-04-25 13:14:37 PDT
I thought this was the cause of a recent perf regression but it turned out it wasn't. It has been confirmed that the recent perf regression was actually fixed by http://trac.webkit.org/changeset/198818. Since the current code design is better than what is suggested in this patch. Close this bug as INVALID.
Note You need to log in before you can comment on or make changes to this bug.