[Pixman] [PATCHv3 0/3] Faster 90/270 degrees rotation
Andrea Canciani
ranma42 at gmail.com
Fri Feb 4 10:45:56 PST 2011
On Fri, Feb 4, 2011 at 7:34 PM, Bill Spitzak <spitzak at gmail.com> wrote:
> 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:
Uhm... that's not how fast path flags are supposed to work.
Currently a if a fast path is valid for a set of flags, it is also valid for any
superset of that set.
For your suggestion to work, the flags matching algorithm would
have to be replaced.
>
> 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.
It would be possible to have a single flag for simple unit transforms
(the on/off
flag you propose) and then dispatch depending on the matrix type.
It is interesting to note that it would be possible to share code between the
8 combinations. I don't know if/how much this would affect performance.
Andrea
More information about the Pixman
mailing list