[webkit-dev] parallel rendering in WebKit

Maciej Stachowiak mjs at apple.com
Fri Feb 19 19:55:50 PST 2010


On Feb 19, 2010, at 7:20 PM, Leo Meyerovich wrote:

> We've been experimenting in our model with various modes of parallel  
> 2D rendering (basic theme: GPU/SMP support rocks) but have a more  
> wide open design space than WebKit's.
>
> For a not-too-painful approach, looks like Firefox is doing well,  
> and that's even for D2D (not retained mode): check out the last few  
> posts @ http://www.basschouten.com/ .  Flash does a bunch as well,  
> but that's less obviously transferred.
>
> Parallelism can be used at multiple levels within the renderer --  
> SIMD, threads, and/or GPU -- I was actually under the impression  
> that WebKit on the iPhone already uses hardware acceleration for  
> painting. For the latter case, the hardware was made for pushing  
> pixels, so the performance question should be of how much of a  
> speedup, not whether there is one.

iPhone uses hardware acceleration for compositing and scrolling, not  
for painting per se. It also does most Web content processing on a  
separate thread from the UI thread, but that is for UI responsiveness,  
not painting throughput.

>
> - Leo
>
> [[ A little further out, I've been going over the CSS spec, and  
> found that a lot of the CSS transform stuff maps nicely into OpenGL  
> as it doesn't impact layout; structured extensions like adding  
> shaders to CSS surfaces doesn't sound too crazy at this point. This  
> seems well-beyond the scope of this list, however. ]]

CSS transitions and transforms were designed to support being done in  
hardware. WebKit supports using hardware acceleration for animation  
and compositing (currently only really working for the Mac port).

Using graphics APIs that send more work to the GPU (OpenGL, OpenVG,  
Direct2D, etc) is definitely a possibility and should not impact  
anything above the GraphicsContext layer. That's a different kid of  
change than dispatching individual drawing commands to a background  
thread though.

Regards,
Maciej



More information about the webkit-dev mailing list