Firefox 4: hardware acceleration

Editor’s note: If you’ve arrived here via the Mozilla Support site because you are exploring advanced settings or having frequent crashes at startup, this probably isn’t the right solution. It’s been a few years since Firefox 4 was released and this post was written. You might want to visit this Troubleshooting page instead.

What is hardware acceleration?

Hardware acceleration” is basically using the GPU when it’s possible (instead of the CPU). This makes page-drawing operations faster.

There’s two different levels of acceleration going on:

  • Content acceleration speeds up rendering the actual page content, such as the text, images, CSS borders, etc. Content acceleration is also used to speed up the 2D HTML canvas. On Windows Vista/7, we use Direct2D for this and it has been activated in this new beta.
  • Compositing acceleration speeds up putting together chunks of already-rendered content (layers) together for final display in the window, potentially applying effects such as transforms along the way. For example, if you had a HTML5 video that was playing, and it had CSS effects applied to it that was making it rotate and fade in and out, that would be using compositing acceleration to make that go fast. (This feature is not activated by default yet.)

>> Run the test yourself: Hardware Acceleration Stress Test. <<
Credits for the photos: Paul (dex).

Hardware Acceleration by operating system:

These optimizations are available only if you have compatible hardware and the associated drivers.

Operation Linux Windows XP Windows Vista/7 Mac OS X
Content XRender None Direct2D Quartz1
Compositing OpenGL Direct 3D Direct 3D OpenGL

[1]: Quartz is basically CPU-only. QuartzGL (GPU acceleration for the Quartz 2D API) is not activated in Firefox for now (nor in other browsers).

Important note: Don’t confuse hardware acceleration with WebGL. WebGL is an OpenGL-like API for Javascript to draw 3D objects into a <canvas> element. Obviously, WebGL is itself hardware accelerated since it uses OpenGL (or Direct3D through ANGLE on Windows if no OpenGL drivers are present).

We need help!

Help us to improve hardware acceleration in Firefox: Install the Grafx Bot extension (details here and add-on here).

Firefox’s hardware acceleration interacts with a machine’s graphics hardware via DirectX or OpenGL, depending on platform. These interactions tend to be very sensitive to the graphics environment on the system (e.g., the specific video card(s) on the system, how much VRAM is available, the version of the video driver, the OS version, etc). In fact, there are so many permutations of the relevant factors that we can’t test them all internally.

Grafx Bot runs a suite of automatic tests on your machine that exercises interesting aspects of hardware acceleration (for about 5 to 20 minutes). At the end of the tests, you can send your results to Mozilla (with anonymous video configuration information), where the data will be collected and analyzed, and hopefully lead to bug fixes and more reliable code for hardware acceleration than we’d otherwise have.

We need help from the community, so we can get exposure on as many unique hardware environments as possible.

About Paul Rouget

Paul is a Firefox developer.

More articles by Paul Rouget…


  1. al

    this link shows how to change your settings to enable on ie, google, and ffox.

    February 27th, 2013 at 20:35

  2. Shekhar

    When I dont have GPU, here is the result:
    Chrome v 26 = 60+ fps
    Firefox v 20 = 17 fps
    Safari 5 = 7 fps,

    And Firefox gets Screen Lagging largely. Not recommended to use as of now!

    April 8th, 2013 at 03:15

  3. Ron

    My results (52 fps) are slower now, with supposedly faster h/w, than they were 2 years ago.

    April 8th, 2013 at 14:28

Comments are closed for this article.