- Jan 29, 2007
- 6,374
- 1
- 76
Hi everybody
If you have a Direct3d10 GPU and a good cpu (tester used a corei7 920 and hd4850) you can use a beta version of Firefox 3.7alpha to render the entire firefox program and web content on your GPU.
The best part of it is that it improves speed and decreases page load times by offloading work from the CPU!
download:
http://www.bassified.nl/firefox-3.7a1pre.en-US.win32.d2d.2009.12.13.zip
If you have a Direct3d10 GPU and a good cpu (tester used a corei7 920 and hd4850) you can use a beta version of Firefox 3.7alpha to render the entire firefox program and web content on your GPU.
The best part of it is that it improves speed and decreases page load times by offloading work from the CPU!
http://www.basschouten.com/blog1.php/2009/11/22/direct2d-hardware-rendering-a-browserDirect2D usage in Firefox
A while ago I started my investigation into Direct2D usage in firefox (see bug 527707). Since then we've made significant progress and are now able to present a Firefox browser completely rendered using Direct2D, making intensive usage of the GPU (this includes the UI, menu bars, etc.). I won't be showing any screenshots, since it is not supposed to look much different. But I will be sharing some technical details, first performance indications and a test build for those of you running Windows 7 or an updated version of Vista!
Implementation
Direct2D has been implemented as a Cairo backend, meaning our work can eventually be used to facilitate Direct2D usage by all Cairo based software. We use Direct3D textures as backing store for all surfaces. This allows us to implement operations not supported by Direct2D using Direct3D, this will prevent software fallbacks being needed, which will require readbacks. Since a readback forces the GPU to transfer memory to the CPU before the CPU can read it, readbacks have significant performance penalties because of GPU-CPU synchronization being required. On Direct3D10+ hardware this should not negatively impact performance, it does mean it is harder to implement effective D2D software fallback. Although in that scenario we could continue using Cairo with GDI as our vector graphics rendering system.
Internally here's a rough mapping of cairo concepts to D2D concepts:
cairo_surface_t - ID2D1RenderTarget
cairo_pattern_t - ID2D1Brush
cairo clip path - ID2D1Layer with GeometryMask
cairo_path_t - ID2D1PathGeometry
cairo_stroke_style_t - ID2D1StrokeStyle
More about the implementation can be learned by looking at the patches included on the bug! Now to look at how well it works.
Website Benchmarks
First of all let's look at the page rendering times. I've graphed the rendering time for several common websites together with the error margin of my measurements. The used testing hardware was a Core i7 920 with a Radeon HD4850 Graphics card:
There's some interesting conclusions to be drawn from this graph. First of all it can be seen that Direct2D, on this hardware, performance significantly better or similarly on all tested website. What can also be seen is that on complexly structured websites the performance advantages are significantly less, and the error margin in the measurements can be seen to be larger (i.e. different rendering runs of the same site deviated more strongly). The exact reasons for this I am still unsure of. One reason could be is that the websites contain significant amounts of text or complex polygons as well, for those scenarios with few transformations and blending operations the GPU will show smaller advantages over the CPU. Additionally the CPU will be spending more time processing the actual items to be displayed, which might decrease the significance of the actual drawing operations somewhat.
Other Performance Considerations
Although the static website rendering is an interesting benchmarks. There are other, atleast as important considerations to the performance. As websites become more graphically intense dynamic graphics will start playing a larger role. Especially in user interfaces.

download:
http://www.bassified.nl/firefox-3.7a1pre.en-US.win32.d2d.2009.12.13.zip
Last edited: