xserver-multidpi/fb
Keith Packard 3e56efcfb6 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>
2010-08-20 10:01:48 -07:00
..
fb.h Clean up after removal of screen parameters from region macros. 2010-06-05 22:07:21 -07:00
fb24_32.c Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
fb24_32.h Death to RCS tags. 2007-06-29 14:06:52 -04:00
fballpriv.c Change the devPrivates API to require dixRegisterPrivateKey 2010-06-05 19:23:03 -07:00
fbarc.c Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07: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-20 10:01:48 -07: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-16 17:11:35 -08:00
fbcmap.c Remove unnecessary parentheses around return values in functions 2010-06-10 06:42:42 -07:00
fbcopy.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
fbfill.c Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
fbfillrect.c Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
fbfillsp.c Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
fbgc.c Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
fbgetsp.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
fbglyph.c Clean up after removal of screen parameters from region macros. 2010-06-05 22:07:21 -07:00
fbimage.c Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
fbline.c Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
fboverlay.c Clean up after removal of screen parameters from region macros. 2010-06-05 22:07:21 -07:00
fboverlay.h fb: move some code to mi 2009-02-06 18:42:39 +01:00
fbpict.c Don't let alpha maps recurse in fb. Bug 23581. 2010-08-10 09:18:22 -07:00
fbpict.h Add support for RENDER BGRA formats. 2009-08-04 23:23:21 +02:00
fbpixmap.c Remove unnecessary parentheses around return values in functions 2010-06-10 06:42:42 -07:00
fbpoint.c Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
fbpush.c Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
fbrop.h Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
fbscreen.c Remove unnecessary parentheses around return values in functions 2010-06-10 06:42:42 -07:00
fbseg.c Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
fbsetsp.c Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07: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 unifdef -B -DRENDER to always include RENDER code 2010-04-19 09:26:10 -07:00
fbutil.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
fbwindow.c Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
Makefile.am Record some additional library dependencies in xf86 modules 2010-06-10 19:01:22 -07:00
wfbrename.h Change the devPrivates API to require dixRegisterPrivateKey 2010-06-05 19:23:03 -07:00