mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-21 19:10:05 +01:00
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> |
||
|---|---|---|
| .. | ||
| Makefile.am | ||
| xf86Crtc.c | ||
| xf86Crtc.h | ||
| xf86Cursors.c | ||
| xf86cvt.c | ||
| xf86DiDGA.c | ||
| xf86DisplayIDModes.c | ||
| xf86EdidModes.c | ||
| xf86gtf.c | ||
| xf86Modes.c | ||
| xf86Modes.h | ||
| xf86RandR12.c | ||
| xf86RandR12.h | ||
| xf86Rename.h | ||
| xf86Rotate.c | ||