[cairo] Added mmx fast path for fbComposeCopyAreammx
Soeren Sandmann
sandmann at daimi.au.dk
Mon Mar 10 13:30:50 PDT 2008
Hi Frederic
> While profiling some parts of the mmx codepath, I noticed that simple RGB
> blitting (fbComposeCopyArea) from a8r8g8b8 to x8r8g8b8 sources was not being
> accelerated at all by mmx!! I noticed it was because no mmx_fast_path was
> declared for this very case :
>
> { PIXMAN_OP_SRC, PIXMAN_a8r8g8b8, PIXMAN_null, PIXMAN_x8r8g8b8,
> fbCompositeCopyAreammx, 0 }...
>
> ...case which I simply added in pixman-pict.c
>
> it might look weird to drive pixman_blt_mmx between two incoherent sources (RGB
> against ARGB), but since both surfaces are processed as 32 bpp, I don't see why
> we couldn't use some speedup here simply adding this mmx_fast_path
> case.
>
> Here's a speedup chart that supports this optimization :
> http://pastebin.mozilla.org/362713
> A mean perf gain of 1.5X was observed for the image-rgb cases instead of 0.99 as
> seen before this optim.
>
> The associated patch is attached. I'd be please, Soeren, if took a look at it
> :-)
Looks good to me. We already have a plain C fallback that just uses
memcpy() for this case; that's probably why the speed-up is only 1.5.
We can use the MMX fast path in the a8b8g8r8 -> x8b8g8r8 case as well.
Thanks,
Soren
More information about the cairo
mailing list