Open Bug 1257388 Opened 7 years ago Updated 1 year ago
Play back all animated images via the media framework
Right now, to play back an animated image we have to decode every frame in the image and keep them all in memory. This can result in massive memory usage for large animated images, which can lead to either allocation failures that prevent the images from displaying, or OOMs that kill the browser. In this bug we'll solve that problem by moving animated image playback to the media framework. We'll replace the existing image animation system with media decoders for image/png and image/gif which decode the images in a streaming fashion, just as we would with video. This should give us a number of nice properties for free; for example, we'll only allocate the memory for a few frames at a time instead of the entire image, we can remove all support for paletted images from ImageLib since in the media framework we can afford to work directly in BGRA/BGRX, and features like pausing animation when the animated image is scrolled out of view should "just work".
Andrew: is this something that might get fixed by your aGIF work?
Assignee: seth.bugzilla → nobody
I would say bug 523950 is a stepping stone towards using the media framework, if we prioritize it eventually, but no more than that. It does give some of the same benefits though.
Priority: -- → P3
Whiteboard: [MemShrink:P1] → [MemShrink:P1][gfx-noted]
Whiteboard: [MemShrink:P1][gfx-noted] → [MemShrink:P2][gfx-noted]
You need to log in before you can comment on or make changes to this bug.