Closed Bug 1245409 Opened 6 years ago Closed 6 years ago
Container will always contain 100 decoded images when the parent element is hidden
The issue was noticed while investigating bug 1237160. The media element's ImageContainer will drop images only in the following two circumstances: 1- A new image has been composited, and that image was newer than images currently held by the ImageContainer. All images older than this image will be dropped. https://dxr.mozilla.org/mozilla-central/source/gfx/layers/ImageContainer.cpp#358 2- When new images are added to the ImageContainer, the images that haven't been composited yet will be dropped if there are more than 100 images in the FIFO queue. This is done in https://dxr.mozilla.org/mozilla-central/source/gfx/layers/ImageContainer.cpp#218 If a media element is hidden, none of its images will ever be painted, so 1) won't occur. Due to the eviction policy for 2), it means that as the element is playing in the background, we will always have at least 100 images in ImageContainer::mFrameIDsNotYetComposited As the drop of images occurs only once new images are added, if the video stopped playing and is hidden, the remaining 100 images will never be dropped until the element becomes visible again. 100 raw images can amount to a fairly significant amount of memory.
oops silly me, only the ID is kept, an int. not the image. time for bed.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.