Closed Bug 588975 Opened 11 years ago Closed 9 years ago
Stop animating images in background tabs
Carefully, though - need to remember where they are, and fast-forward them when the tab returns to the top. See helpful comment at https://bugzilla.mozilla.org/show_bug.cgi?id=359608#c29
Sounds like a duplicate of bug 120154 - animated GIF eating cpu when mozilla in another tab or minimized.
Given all the fallout from bug 359608, I think it is not realistic to tackle this any time soon.
Fennec shouldn't block on this.
tracking-fennec: 2.0+ → ---
I was about to file this because it noticeably shortens battery life and probably also responsiveness. How are the chances of this getting fixed?
Aren't images in background tabs throttled down to 1fps now that they're on the refresh driver?
Refresh driver is throttled to exponential backoff, not 1fps. For the rest, good question...
I think this will probably be required as part of bug 686905, at least if we want to discard animated image frames from background tabs. I'm not sure if this is the idea, but we might be able to save memory by discarding frames that aren't being used at the moment. This would require that we redecode, though, but we could save the state of the image & then immediately jump to it once we've done the redecode.
I think this bug is just about not running the animation code and the timers for it for images in background tabs, not about the image data per se.
Small question: could animation also be stopped if window with it completely covered by other window?
That's actually very difficult to impossible to detect (e.g. just because you're covered doesn't mean you're invisible: windows can be translucent or transparent).
So, this two articles are not helpful because of transparency now? http://blogs.msdn.com/b/oldnewthing/archive/2003/08/29/54728.aspx http://blogs.msdn.com/b/oldnewthing/archive/2003/09/02/54758.aspx
The former doesn't apply because this has nothing to do with painting. The latter may apply, but the cost of doing the check may well be comparable to the animation cost. Worth investigating, but in a separate bug.
tracking-fennec: ? → 14+
blocking-fennec1.0: ? → -
Couldn't this be done by imageAnimationMode on nsidomwindowutils? http://mxr.mozilla.org/mozilla-central/source/dom/interfaces/base/nsIDOMWindowUtils.idl#93
qawanted to retest
qawanted: martijn will retest.
I tested with Fennec trunk on the Galaxy Nexus with this animated gif counter going to 0: http://people.mozilla.com/~mwargers/tests/images/60.gif It seems the counting down is stopping after 5 seconds or so when it is in the background tab.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
Issue is resolved - clearing old keywords - qa-wanted clean-up
You need to log in before you can comment on or make changes to this bug.