GPU Acceleration In Firefox 4 beta 9: Direct3D for Windows, OpenGL for MacOSX and Nothing for Linux

Firefox 4 beta

Firefox 4 beta 9 is now available with WebGL enabled by default. But Firefox WebGL implementation exploits the OpenGL API only on Mac OS X because Apple offers an excellent OpenGL support. On Windows, WebGL and GPU acceleration are implemented via Direct3D:

Firefox 4 supports full hardware acceleration on Windows 7 and Windows Vista via a combination of D2D, DX9 and DX10. This allows us to accelerate everything from Canvas drawing to video rendering. Windows XP users will also enjoy hardware acceleration for many operations because we’re using our new Layers infrastructure along with DX9. And, of course, OSX users have excellent OpenGL support, so we’ve got that covered as well.

On Linux, there is currently no hardware acceleration due to buggy graphics drivers:

Comment by Boris Zbarsky (Mozilla developer):

We tried enabling OpenGL on Linux, and discovered that most Linux drivers are so disastrously buggy (think “crash the X server at the drop of a hat, and paint incorrectly the rest of the time” buggy) that we had to disable it for now. Heck, we’re even disabling WebGL for most Linux drivers, last I checked…

If your drivers are decent (some of the closed-source ones can be, nouveau can be sometimes), you do get something akin to Direct2D on Linux through XRender, though. So while you don’t get compositing acceleration, you do get faster canvas drawing and the like. drawImage, for example, can be much faster on Linux than on Mac. But only if you manage to find a driver and X version that happens to not suck…

We do plan to put more work into the Linux end of this, look for workarounds for the various bugs, etc. But we could really use some help from Xorg and distros and the like here…

Comment by Boris Zbarsky (Mozilla developer):

Sadly enough, GL drivers on Windows aren’t that great either. This is why WebGL is done via Direct3D on Windows now…. but that mostly a matter of performance issues.

You can download Firefox 4 Beta 9 HERE.


[ Subscribe to Geeks3D latest news by email ]

↑ Grab this Headline Animator