Closed Bug 1245409 Opened 6 years ago Closed 6 years ago

ImageContainer will always contain 100 decoded images when the parent element is hidden


(Core :: Graphics: Layers, defect)

Not set



Tracking Status
firefox47 --- affected


(Reporter: jya, Unassigned)



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.
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

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.
See Also: → 1222308
oops silly me, only the ID is kept, an int. not the image.

time for bed.
Closed: 6 years ago
Resolution: --- → INVALID
Whiteboard: [MemShrink:P2]
You need to log in before you can comment on or make changes to this bug.