xserver-multidpi/hw/xfree86/modes
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
..
Makefile.am displayid: Implement mode decoding. 2009-07-17 14:48:55 -04:00
xf86Crtc.c Remove more superfluous if(p!=NULL) checks around free(p). 2010-11-11 08:29:54 +10:00
xf86Crtc.h Allow for missing or disabled compat_output 2010-02-25 12:48:27 -08:00
xf86Cursors.c xfree86: Fix rotation of 2-color non-interleaved cursor images 2010-11-30 10:31:43 -08:00
xf86cvt.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
xf86DiDGA.c Remove more superfluous if(p) checks around free(p) 2010-06-06 20:27:18 +07:00
xf86DisplayIDModes.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
xf86EdidModes.c edid: Fix the HDTV sync pulse adjustment 2010-10-05 08:19:25 -07:00
xf86gtf.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
xf86Modes.c Xserver need not be compatible with old versions of xserver. 2010-09-18 11:17:18 +02:00
xf86Modes.h modes: Fix duplicate detection, and do it more consistently 2009-10-29 14:06:00 -04:00
xf86RandR12.c xfree86: store the screen's gamma information on init. 2010-11-24 11:35:04 -08:00
xf86RandR12.h Clean up RandR12 bits on screen close (bug 27114) 2010-06-15 14:39:25 -07:00
xf86Rename.h Allow drivers to set crtc transforms. 2008-11-24 13:24:40 -08:00
xf86Rotate.c Replace usage of DamageRegionAppend with DamageDamageRegion to fix reportAfter. 2010-11-10 15:51:03 -08:00