[cairo] Pixman refactoring

Soeren Sandmann sandmann at daimi.au.dk
Tue May 19 08:42:02 PDT 2009

Soeren Sandmann <sandmann at daimi.au.dk> writes:

> I expect to merge the refactor branch to master soon, and the
> separate-images branch soon after that. Review and testing (especially
> if you use wfb), is appreciated.

Both those branches are in master now; the refactor one is also in the
pixman-0.15.4 release.

Coming up next is the 'implementations' branch:


That branch adds the concept of an 'implementation' to pixman, which
is an object that encapsulates the various types of SIMD code. This
eliminates the fast path look-up from the general implementation,
making it much simpler. It becomes close to readable:


An implementation has a reference to another implementation that it
can use for fallbacks. For example, the sse2 implementation knows
about an mmx implementation, which knows about a "C fast path"
implementation, which knows about a "general" implementation.

An implementation can optionally implement accelerated combiners,
which will be used from the general implementation. To make this work,
each implementation also knows about the toplevel implementation in
the stack, so that when it calls a lower level virtual function, it
can get the best implementation available.

I did not make ARM and VMX implementations; I'd appreciate help with
that, especially for ARM since I have no way of even compiling for
that architecture. Making an implementation is not difficult at all -
see pixman-mmx.c for an example.

Longer term, the idea is that the concept of implementations can be
generalized to allow hardware accelerated backends.

Comments, both on the code and the concepts, are appreciated.


More information about the cairo mailing list