Thursday 10 March 2011
A browser that "fully hardware-accelerates the entire Web platform" shouldn't have any trouble with a simple HTML scrolling testcase, should it? Try this testcase in the browsers on your machine. Running fullscreen on my laptop, IE9 RC1 takes more than ten times as long as Firefox 4. That doesn't seem very accelerated to me. View the source to see that the testcase does nothing tricky.
When we designed our "layers" framework for GPU acceleration in Firefox, one of the goals was to accelerate scrolling, especially on pages where some parts of the page move as you scroll and other parts don't --- like that testcase. We have a component called FrameLayerBuilder that separates the moving parts from the stationary parts and assigns them to separate "layers". (The vicissitudes of CSS make this surprisingly difficult, but that's a topic for another blog post...) Each layer gets a VRAM buffer into which we draw the layer's contents; when we scroll, we only have to draw the content that has scrolled into view, and then we use the GPU to composite the layers together at their new positions.
I can't say for sure what IE9 is doing in this case, but experimentation suggests that it simply repaints the entire page from scratch every time it scrolls the above testcase. This does not make best use of the hardware.