Comment on attachment 9165788 [details]
Bug 1654929. Drop old FBOs that we haven't used in a while.
Beta/Release Uplift Approval Request
- User impact if declined: Memory usage (Both CPU and GPU) can grow without bound in the GPU process when WebRender is enabled. It's not known how big a problem this is in the wild but it's pretty easy to reproduce the problem and grow the GPU process arbitrarily large by aggressively tab cycling for a couple of minutes (See bug 1654013).
This code dates back to when DirectComposition was enabled for WebRender (around the beginning of the year) so we've already shipped it and it obviously isn't catastrophic. On the other hand, a lot of active reporters test on Nightly and so a slower leak like this might not be as obvious. It may also impact people with less memory more severely which is something to take into consideration as 79 rolls out WebRender to a set of users with lower end/older hardware.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: No
- If yes, steps to reproduce: https://bugzilla.mozilla.org/show_bug.cgi?id=1654013#c5
- List of other uplifts needed: None
- Risk to taking this patch: Medium
- Why is the change risky/not risky? (and alternatives if risky): The patch is pretty easy to understand and takes a pretty conservative approach to freeing memory so it should not have a big impact on performance. I tested it locally and it does prevent the leak.
The patch touches code that runs on every paint so it should be reasonably well tested even with a simple smoke test.
- String changes made/needed: