[cairo] rewriting libpixman

Daniel Amelang daniel.amelang at gmail.com
Wed Mar 28 21:44:54 PDT 2007

On 3/28/07, Jeff Muizelaar <jeff at infidigm.net> wrote:
> I have put up a copy of cairo that has a partially rewritten libpixman
> in the pixman-new branch of my cairo tree.
> The main change is that all of the hand written special cases have been
> replaced with machine generated special cases. The impact of this is
> that now all regular compositing operations will not use the
> compositeGeneral case. In addition, the python script allows handwritten
> substitutions to be made. In this case, I've added substitutions using
> liboil for the operations that it supports. These substitutions cover
> alot of the common cases and cause a lot of the speed up seen below.
> I've also included a patch against liboil that adds another useful
> operation for cairo.

Nice. So how much bigger does cairo get with all the statically
generated code compiled in? I remember suggesting this approach once,
but Soren scared me away. Hmmm...I see 54k lines of C code in
composite.c.ref. I would have thought it would be worse, actually.

Also, I noticed that when you convert from 16-bit to 32-bit color, you
don't replicate the upper bits of the 5 (or 6)-bit color component in
the lower half of the resulting 8-bit color channel. Pixman does that
currently, and as I understand it, it's the Right Thing To Do to
prevent fading.

Great stuff! I'll be keeping a close eye on this.


More information about the cairo mailing list