WebGL Can Be Moved Off The Main Thread With Latest Firefox

Written by Michael Larabel in Mozilla on 22 January 2016 at 11:41 AM EST. 8 Comments
MOZILLA
With Firefox 44 and newer it will be possible to move the WebGL rendering work off the main processing thread.

With Firefox 44 when setting the gfx.offscreencanvas.enabled option, it's possible to move the WebGL rendering work off the main thread and to allow for the alternative thread(s) to change what is displayed to the user. "This API is the first that allows a thread other than the main thread to change what is displayed to the user. This allows rendering to progress no matter what is going on in the main thread...Developers will now be able to render to the screen without blocking on the main thread, thanks to the new OffscreenCanvas API. There’s still more work to do with getting requestAnimationFrame on Workers. I was able to port existing WebGL code to run in a worker in a few minutes. For comparison, see animation.html vs. animation-worker.html and worker.js."

More details on this new off-main-thread rendering support can be found via this Mozilla Hacks blog post.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week