summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2010-11-15 20:43:18 -0800
committerAaron Plattner <aplattner@nvidia.com>2010-11-30 10:31:43 -0800
commitffcbfa0063bdc7c9ad5ac724285c7b6e67044c18 (patch)
treed2430437b735cbd195df5075ead9dbe8ed5c6fdd /include
parent23e3d1f23318ce69623f91908f888a09f8b74ac2 (diff)
xfree86: Fix rotation of 2-color non-interleaved cursor images
When RandR 1.2's transformation code is enabled, it rotates the cursor image so that it appears upright on a rotated screen. This code completely mangles 2-color cursors on hardware where the the mask and source images are not interleaved due to two problems: 1. stride is calculated as (width / 4) rather than (width / 8), so the expression (y * stride) skips two lines instead of one for every time y is incremented. 2. cursor_bitpos ignores the 'mask' parameter if the hardware doesn't specify any of the HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_* flags. To fix this, refactor the code to pass the whole xf86CursorInfoPtr through to cursor_bitpos and compute the correct stride there based on the flags. If none of the SOURCE_MASK_INTERLEAVE flags are set, use the total cursor size to move the 'image' variable into the mask part of the image before computing the desired byte pointer. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Robert Morell <rmorell@nvidia.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Tested-by: Cyril Brulebois <kibi@debian.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions