Patch for picture.c's ReduceCompositeOp

John Tapsell johnflux at gmail.com
Fri Dec 5 07:11:32 PST 2008


Hi all,

  Attached is a patch to extend the ReduceCompositeOp function.  This
should speed up any drivers that don't do these optimizations
themselves.

For example, take the operation OverReverse, from an ARGB surface to
an XRGB surface.

PictOp                     Fa                        Fb
OverReverse          1-Ab                      1

For an XRGB surface, Ab is always 1, so this operation becomes:
PictOp                     Fa                        Fb
OverReverse            0                         1

which is the same as the Dst operation.  So when we are told to do an
OverReverse operation to a XRGB surface, we actually just apply the
Dst operation to a ARGB surface.

We can also use that 1/Ab is always >=1  to simplify functions further.

This was tested with ./rendercheck -f a8r8g8b8,x8r8g8b8 -t blend
which passed all tests.

Applies against xorg/xserver

John Tapsell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Extend-the-ReduceCompositeOp-function-to-map-more-fu.patch
Type: text/x-diff
Size: 4885 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20081205/1baedda3/attachment.patch>


More information about the xorg mailing list