It had been long predicted, that this day would come when Browsers will learn to leverage GPU for rendering webpages. After Microsoft’s announcement of GPU acceleration in it’s upcoming browser IE9, Firefox also started to get into it seriously. Microsoft had published new API with Windows 7 called Direct2D. Direct2D is designed to be replacement for GDI and takes the task of vector graphics rendering engine, using GPU acceleration to give large performance boosts to the webpage rendering.
The support for D2D is being seen on Firefox’s Latest alpha release Minefield 3.7 a1(nightly)
Direct2D has been implemented in Firefox as a Cairo backend. Firefox uses Direct3D textures as backing store for all surfaces. This allows Firefox to implement operations not supported by Direct2D using Direct3D
Since we are offloading the CPU task to GPU, there is a delay in between the data transfers from GPU to CPU before the CPU can read it. Readbacks have significant performance penalties because of GPU-CPU synchronization being required.
If we alook at the pattern from the graph, 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).
These test were done on a Direct X 10 card, but older PCs with pre-D3D10 graphics cards and WDDM 1.0 drivers will not show significant improvements, moreover, It may or may not work on D3D9 graphic cards, depending on exact graphics card specifications.
Let’s hope the support goes better for Direct X 9 cards as well, may be Google has a better solution on this, we will have to wait and see.