[Pixman] [PATCHv3 0/3] Faster 90/270 degrees rotation

Andrea Canciani ranma42 at gmail.com
Fri Feb 4 03:42:42 PST 2011

On Fri, Feb 4, 2011 at 11:52 AM, Siarhei Siamashka
<siarhei.siamashka at gmail.com> wrote:
> From: Siarhei Siamashka <siarhei.siamashka at nokia.com>
> Changes since the previous sumbission:
> 1. coding style fixes
> 2. sligthly tweaked flags setting code to make it a bit faster
> Siarhei Siamashka (3):
>  New flags for 90/180/270 rotation
>  C fast paths for a simple 90/270 degrees rotation
>  test: affine-test updated to stress 90/180/270 degrees rotation more
>  pixman/pixman-fast-path.c |  292 +++++++++++++++++++++++++++++++++++++++++++++
>  pixman/pixman-image.c     |   17 +++
>  pixman/pixman-private.h   |    3 +
>  test/affine-test.c        |   34 +++++-
>  4 files changed, 342 insertions(+), 4 deletions(-)

While reviewing this code I noticed that there is no fast path for flipping
(it goes through FAST_PATH_SCALE_TRANSFORM).
Would it be a good idea to provide that as well?
In that case, pixman would have fast paths for all unit transforms.

The main use I know for flipping is to pass data between negative and
positive stride images. I don't know if it is worth the additional effort, but
this is a known slow path in Quartz.

Another thing I noticed is that if we want to get real performance benefits
we should also be careful about the stack above pixman. For example
cairo would trigger these fast paths only if the translational part of the
matrix is 0, because it tries to spread the translation evenly between
the matrix and the integer offset (unless the matrix is a translation).
The patch for cairo is trivial, but other libraries/applications might
not get the expected benefit from this change.


More information about the Pixman mailing list