[cairo] Transform optimization

André Tupinambá andrelrt at gmail.com
Mon Dec 29 18:33:15 PST 2008


Hi Soeren,

I'm still working in optimizing the transformation code (er... I ran a
little busy :). But I just built a pixman version following your
approach and created a fast-path to this special case.

The good news are, this new code is 3.5x faster in my Turion in some
cases (with Ubuntu 8.10 x64) and only with C code optimization (no MMX
or SSE2). The bad news are, I used some uint64_t variables to optimize
the calculations and I don't know if they perform good with 32bits
code (I have no 32bits Linux), so I implement a optimized version of
bilinear interpolation with 32bits (I choose each one with #ifdef).

If anyone test it for me, I will be very glad (it's just adjust the
#ifdef, compile and run the cairo-perf :).

I didn't tried to ran this code with VTune analyzer yet, and I expect
that is possible to optimize this code a little more, but not too
much. So I'm thinking if the best approach is to find another special
case and create another fast-path to them, instead to try to work with
VTune now.

Happy New Year

André Tupinambá

> The better fix here is to write a bilinear fetcher that special cases
> for the common case of
>
>        - image has format x8r8g8b8 or a8r8g8b8
>        - the transformation is affine
>        - there is no source clip
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: transform_fast-path.patch.bz2
Type: application/x-bzip2
Size: 2514 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20081230/b285f3f8/attachment.bin 


More information about the cairo mailing list