xserver-multidpi/fb
Keith Packard 7c54498665 fb: make isClipped always reject negative coordinates (bug 11503)
A window with either dimension > 32767 can be positioned such that
coordinates > 32767 are visible on the screen. Attempts to draw to
those pixels will generate coordinates wrapped around to negative
values.

The optimized clipping macro, 'isClipped', in fbbits.h, computes
clipping in window space rather than screen space using int16 values,
and so it too has coordinates wrapped around to negative values and
hence ends up accepting the wrapped drawing coordinates.

Two possible fixes for this problem

 1) Detect wrapped region coordinates and clip those to 32767.
 2) Detect negative incoming coordinates and reject those

This patch takes the second approach as it is much shorter, simply
detecting when either X or Y incoming coordinate is negative, which
can never be 'within' any drawable.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 3e56efcfb6)
2010-08-21 20:41:37 +01:00
..
fb.h fb: backport fb changes from master for src window operations. 2009-12-23 14:29:26 +10:00
fb24_32.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
fb24_32.h Death to RCS tags. 2007-06-29 14:06:52 -04:00
fballpriv.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
fbarc.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
fbbits.c Death to RCS tags. 2007-06-29 14:06:52 -04:00
fbbits.h fb: make isClipped always reject negative coordinates (bug 11503) 2010-08-21 20:41:37 +01:00
fbblt.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
fbbltone.c Fix "warning: left-hand operand of comma expression has no effect" 2009-09-07 11:00:50 +10:00
fbcmap_mi.c Update Sun license notices to current X.Org standard form 2009-12-18 17:12:00 -08:00
fbcmap.c Update Sun license notices to current X.Org standard form 2009-12-18 17:12:00 -08:00
fbcopy.c fb: add fbDoCopy and fbCopyRegion compatibility wrappers. 2009-02-11 14:35:17 +01:00
fbfill.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
fbfillrect.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
fbfillsp.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
fbgc.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
fbgetsp.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
fbglyph.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
fbimage.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
fbline.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
fboverlay.c fb: move some code to mi 2009-02-06 18:42:39 +01:00
fboverlay.h fb: move some code to mi 2009-02-06 18:42:39 +01:00
fbpict.c Fix source pictures getting random transforms after 2d6a8f6683. 2010-01-27 14:58:56 -08:00
fbpict.h Add support for RENDER BGRA formats. 2009-08-04 23:23:21 +02:00
fbpixmap.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
fbpoint.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
fbpush.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
fbrop.h Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
fbscreen.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
fbseg.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
fbsetsp.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
fbsolid.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
fbstipple.c Fix "warning: left-hand operand of comma expression has no effect" 2009-09-07 11:00:50 +10:00
fbtile.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
fbtrap.c fb: backport fb changes from master for src window operations. 2009-12-23 14:29:26 +10:00
fbutil.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
fbwindow.c fb: move some code to mi 2009-02-06 18:42:39 +01:00
Makefile.am Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
wfbrename.h fb: backport fb changes from master for src window operations. 2009-12-23 14:29:26 +10:00