[cairo] Operator optimization based on source or dest opacity
sandmann at daimi.au.dk
Sun Apr 6 07:55:50 PDT 2008
Antoine Azar <cairo at antoineazar.com> writes:
> I've been taken these past days, but here's a (hopefully) final version of
> my patch to optimize operators based on source and/or dest opacity.
The patch looks good to me.
> When I fetched the latest pixman, I saw to my surprise almost all the
> performance gains were gone. This is due to the fact that the MMX fast paths
> already incorporate some of the optimized cases for OVER/SOURCE (which are
> the only two tested in our performance suite).
As long as there are no slow-downs, I think the optimization is still
worthwhile because in many cases it will eliminate memory reads, which
is usually the most critical part of these ops.
> I added two MMX fast paths (in the second patch) which give nice
> performance boosts and do take advantage of my first patch. Also
> note that all other operators will benefit from this patch.
The two MMX paths you added are unfortunately not correct. We can't
use fbCopyAreammx to copy from xrgb to argb because we don't know what
the 'x' channel contains.
More information about the cairo