RESOLVED FIXED 145310
[CG] Regression(r78652): Partially decoded images are not properly removed from MemoryCache when pruning
https://bugs.webkit.org/show_bug.cgi?id=145310
Summary [CG] Regression(r78652): Partially decoded images are not properly removed fr...
Chris Dumez
Reported 2015-05-22 10:41:20 PDT
r78652 added partially decoded images to the MemoryCache's list of live decoded resources so that they can be pruned on memory pressure. This was needed because CG decodes part of the image to determine its properties (e.g. size). On memory pressure, we call BitmapImage::destroyDecodedData() which clears the ImageSource and frees up this extra decoded data. However, we currently fail to remove such partially decoded images from the MemoryCache's list of live resources when pruning. This is because BitmapImage::destroyMetadataAndNotify() fails to take into account the decoded properties size when no frames have been cleared. We thus fail to detect a decoded size change and do not call CachedImage::decodedSizeChanged(). As a result, the CachedImage's decoded size is not reset to 0 and we don't remove it from live decoded resources.
Attachments
Patch (5.51 KB, patch)
2015-05-22 11:54 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2015-05-22 11:54:07 PDT
WebKit Commit Bot
Comment 2 2015-05-22 13:48:05 PDT
Comment on attachment 253597 [details] Patch Clearing flags on attachment: 253597 Committed r184793: <http://trac.webkit.org/changeset/184793>
WebKit Commit Bot
Comment 3 2015-05-22 13:48:10 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.