xserver-multidpi/hw
Aaron Plattner ffcbfa0063 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>
2010-11-30 10:31:43 -08:00
..
dmx doc: refactor Makefile and xmlrules.in code for reusability 2010-11-24 11:44:35 -08:00
kdrive Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-api 2010-11-11 12:54:46 +10:00
vfb input: Purge Register*Device() functions. 2010-09-01 15:26:47 +10:00
xfree86 xfree86: Fix rotation of 2-color non-interleaved cursor images 2010-11-30 10:31:43 -08:00
xnest Abstract valuator masks through a set of APIs. 2010-10-22 11:02:48 +10:00
xquartz XQuartz: Remove unused CloseInputDevice stub 2010-11-24 01:47:16 -05:00
xwin Fix compilation after input API change 2010-11-15 07:39:11 +10:00
Makefile.am Catch errors in recursive relink targets 2010-03-22 00:45:57 -05:00