15
Sep 10

So you want to help us with hardware acceleration

Right now, Firefox has layers/compositing hardware acceleration enabled on Windows, and we have clean test runs on OS X too. However, enabling our implementation of accelerated composition using OpenGL on Linux currently causes a lot of test failures, and we’d be ecstatic if you would try to help us fix them.

So, let’s say you want to debug Firefox’s hardware acceleration test failures. Here is how to go about doing that:

  1. Build Mozilla. Follow the instructions in https://developer.mozilla.org/En/Developer_Guide/Build_Instructions.
  2. As part of step 1, you created your object directory. cd to it, and then execute the following:export MOZ_ACCELERATED=1
    make reftest

    This will take a while. Make sure to give the reftest window focus, because some tests require focus to finish.

  3. The reftest will generate a lot of output, all of which is  saved in reftest.log, which is probably saved in your object directory.  Grep the reftest for UNEXPECTED – each of these is failures. The output  will also contain data: URIs for the output – both for the reference  image (correct) and the actual output. Open those in Firefox and compare  the images. This will hopefully give you hints as to what the problems are.
  4. Debug the problem(s). All of our OpenGL code is in gfx/layers/opengl and gfx/thebes/GL*. We are also available to help debug on irc.mozilla.org channel #gfx.

15
Sep 10

Testing hardware acceleration

Firefox 4 nightly builds (and soon, betas) now include hardware acceleration on all versions of Windows! We would simply love it if you would help us test this acceleration.

To know if you’re using hardware acceleration, check the Graphics section of about:support. If your computer is capable of using content acceleration using Direct2D, you will see “Direct2D Enabled: true.” If your computer is capable of using layers/compositing acceleration using Direct3D 9, you will see “GPU Accelerated Windows: 2/2 Direct3D 9″[1] (for example).

To test if a problem you’re seeing is due to hardware acceleration, you can disable it. There are two ways to accomplish this:

  • Run Firefox in safe mode. (All hardware acceleration is always disabled in safe mode.)
  • Uncheck “Use hardware acceleration when available” in the Advanced section of the Preferences/Options dialog.

When reporting a bug caused by hardware acceleration, please copy the entire Graphics information block from about:support into your bug report. This will help us work out root causes and reproducing your problems.

In the very near future, we plan to enable layers/compositing hardware acceleration on Mac OS X using OpenGL. The same testing procedure works there, too, and we will even more gratefully accept your bug reports for hardware acceleration issues on OS X.

1. Due to some technical issues, each window can have a different hardware acceleration status, which is why we show a ratio. Most of the time all of your windows will be accelerated, though.