[cairo] new gradient code and pixman/xserver optimizations

David Reveman davidr at novell.com
Thu Oct 13 09:02:22 PDT 2005


During the gnome summit I did some work to make cairo use the gradient
code in pixman and xserver instead of the code currently in cairo. This
allows us to do optimizations we couldn't do before and in the xserver
case we can even accelerate the gradients in similar ways to what glitz
is doing.

I've attached a number of patches and a short description of them
follows. They are probably not ready for going into CVS yet as the fb
gradient code seam to produce slightly different results than the code
currently in cairo but it shouldn't take a big effort to fix that.


pixman-gradient-1.patch - Enables the gradient support in pixman.

pixman-composite-general-fix-opt-1.patch - Some major performance
improvements to the general composite code used for gradients and
transformed images. Like fetching of mask scanline before source
scanline so that only the necessary pixels from source needs to be
computed in case of gradients or transformed images as source. This
patch also include some gradient specific fixes and performance
improvement.

cairo-new-gradients-2.patch - Makes cairo use pixman for gradients.

cairo-xlib-gradients-1.patch - Makes xlib backend use server-side
gradients when available. To work properly the next patch will have to
go into the server. There's a weird issue that is mysteriously worked
around with a call to XSync right now, see the comment in the patch for
more details on this. BTW, what's the rules for client-side libXrender
requirements? I just bumped the version requirement in configure.in for
now.

xserver-composite-general-fix-and-opt-1.patch - Basically the same as
pixman-composite-general-fix-opt-1.patch but for the server.


Once all these patches land in CVS, gradient performance is going to be
significantly better. There's also some color table code for gradients
in pixman/xserver that is disabled now but can be enabled in some cases
for even better performance.
 
-David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pixman-gradient-1.patch
Type: text/x-patch
Size: 20574 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20051013/d7670692/pixman-gradient-1-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pixman-composite-general-fix-opt-1.patch
Type: text/x-patch
Size: 55965 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20051013/d7670692/pixman-composite-general-fix-opt-1-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cairo-new-gradients-2.patch
Type: text/x-patch
Size: 28297 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20051013/d7670692/cairo-new-gradients-2-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cairo-xlib-gradients-1.patch
Type: text/x-patch
Size: 9342 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20051013/d7670692/cairo-xlib-gradients-1-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xserver-composite-general-fix-and-opt-2.patch
Type: text/x-patch
Size: 66596 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20051013/d7670692/xserver-composite-general-fix-and-opt-2-0001.bin


More information about the cairo mailing list