[cairo] new gradient code and pixman/xserver optimizations

Carl Worth cworth at cworth.org
Wed Jan 4 18:04:55 PST 2006


On Thu, 13 Oct 2005 12:02:22 -0400, David Reveman wrote:
> 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.

Thanks for this work, David.

> 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.

I assume that on closer inspection you decided that the results were
close enough to be correct? (as you said in the following message). So
you do consider all of this ready for CVS now, right?

I hope so, since...

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

This is in now.

> pixman-composite-general-fix-opt-1.patch - Some major performance
> improvements to the general composite code used for gradients and

This one too.

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

This one is in except for the changes to cairo-glitz-surface.c which
no longer apply cleanly, and it wasn't obvious to me how to
fix. David, I assume you can handle this OK.

> 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.

I have not looked at this one yet. I plan to do that tomorrow.

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

Nor this one. Is this going to be "hard" to merge after the recent
code drop to xserver? Or did that code drop include this already?

> Once all these patches land in CVS, gradient performance is going to be
> significantly better.

Yes, I see about a 1.5x speedup to "svg2png gearflowers.svg" so that
is encouraging.

>                    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.

Is that "in some cases" because there are only limited conditions
under which it gets the right answer? If so, what are those
conditions?

Thanks again,

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060104/636a1287/attachment.pgp


More information about the cairo mailing list