[Pixman] [PATCHv3 0/3] Faster 90/270 degrees rotation
Bill Spitzak
spitzak at gmail.com
Fri Feb 4 10:34:20 PST 2011
I would think that rather than a flag for each rotation, you can use 3
flags to get all the unit rotations and flipping, and avoid the annoying
possibility of setting the flags to invalid combinations:
TRANSPOSE: flip about the x==y diagonal, before the MIRROR transforms
MIRROR_X: flip about x==0 (y axis)
MIRROR_Y: flip about y==0 (x axis)
90 CCW rotation is TRANSPOSE+MIRROR_X
180 rotation is MIRROR_X+MIRROR_Y
270 rotation is TRANSPOSE+MIRROR_Y
There would also need to be a flag indicating if the transform is not
one of these. If this flag is set then it may still be useful to set
these flags to indicate the closest such transform, applying them would
reduce the remaining transform to less than +/- 45 degrees.
Andrea Canciani wrote:
> 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.
More information about the Pixman
mailing list