[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Public WebGL] Firefox 14 auto-loses WebGL contexts on memory pressure; can be manually triggered



Hi List,

I thought that was worth mentioning as it's the first step in gradually making developers aware of context loss and able to test it more easily (of course there already is WEBGL_lose_context).

In Firefox 14 (currently on the Aurora channel), on "memory pressure" events, the browser automatically loses all WebGL contexts.

You can open a tab, go to about:memory and click "Minimize memory usage": this will send such a "memory-pressure" even, causing WebGL contexts to be lost.

Currently it's very simple and naive: it loses all WebGL contexts, and allows them all to get restored immediately. This could get tweaked in the future. At least, I'd like to only restore WebGL contexts of background tabs when these tabs become active again.

Try this:
1. open Google's Aquarium demo in one tab:
   http://webglsamples.googlecode.com/hg/aquarium/aquarium.html
2. open about:memory in another tab, click 'Minimize memory usage'.
3. go back to first tab. The WebGL context has been restored.

By the way, there is a minor bug in the Aquarium's webglcontextrestored handler: everytime the context gets restored, it does 'Change View'.

Cheers,
Benoit

-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------