How to enable Direct2D Rendering with Firefox 4 Nightly Builds?

 

Finally Direct2D rendering is here with Firefox 4 nightly build.

Prerequisites

  • Windows 7/Vista with latest service pack
  • You should have DirectX 9/10 enabled Graphics card

 

1. Download Firefox nightly build

2. Take configuration page by navigating to about:config from address bar

3. Change mozilla.widget.render-mode value to 6 (default is –1)

clip_image001

4. Change gfx.font_rendering.directwrite.enabled to true (Just double click. default value is false)

clip_image002

We can’t ensure it’s drawing using Direct2D because some plugins may force the browser to draw using GDI. If possible disable/remove the plugins

Now how to test it?

Check the following tests. Probably these test should execute so smoothly if hardware accelerated.

http://ie.microsoft.com/testdrive/Performance/PsychedelicBrowsing/

http://people.mozilla.com/~vladimir/demos/photos.svg

clip_image003

Bas Schouten has published the performance gain of Direct2D over conventional GDI interface.

clip_image004

Image Courtesy Bas Schouten

 
  • http://codereflect.com/2010/09/18/ie-9-vs-firefox-4-hardware-acceleration-and-page-rendering-comparison/ IE 9 Vs Firefox 4 – Hardware Acceleration and Page Rendering comparison | Reflections of my thoughts….

    [...] After several years IE 9 became my default browser. Despite of my early review I’m not really happy with the rendering of many websites, including facebook, cool tumblr websites. The hardware acceleration is amazing and it’s damn fast. While on the other hand, firefox is doing a real good job with Direct2D rendering and if you believe it or not, almost all websites works well. I’m not sure it’s because of the sites are optimized for Mozilla Platform, while less cared about Internet Explorer. By default Mozilla Firefox 4 isn’t not hardware accelerated. You can run simple test to ensure if the hardware acceleration is enabled or not. Run this stress test. You will get at least 60 FPS if you’re running a good graphic card. If it’s not enabled see my previous post on how to enable to hardware acceleration in Firefox 4. [...]