xserver-multidpi/hw
Jesse Barnes 8476d99231 DRI2: drawable lifetime fixes
Handle drawable destruction and lifetime correctly.

Check whether the drawable priv is valid in DRI2SwapInterval(),
DRI2WaitSBC() and DRI2WaitMSC(); it may have gone away, so be sure to
check it before using it.

If more than 1 outstanding swap is queued, we may complete several after
an app has exited.  If we free it after the first one completes and the
refcount reaches 0, we'll crash the server on subsequent completions.
So delay freeing until all swaps complete and remove the error message
as this is a normal occurence.  To do this properly, we must also avoid
destroying drawables in DRI2DestroyDrawable() if a swap or wait event is
pending.

And finally, make sure we free drawables in DRI2WaitMSCComplete() if
necessary (i.e. if the refcount has reached 0 and this MSC was the last
pending event on the object).

Reported-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-29 10:02:22 -07:00
..
dmx Fix .man.N targets for AM_SILENT_RULES 2010-03-22 00:45:55 -05:00
kdrive Catch errors in recursive relink targets 2010-03-22 00:45:57 -05:00
vfb Fix .man.N targets for AM_SILENT_RULES 2010-03-22 00:45:55 -05:00
xfree86 DRI2: drawable lifetime fixes 2010-03-29 10:02:22 -07:00
xnest Fix .man.N targets for AM_SILENT_RULES 2010-03-22 00:45:55 -05:00
xquartz Merge remote branch 'jeremyhu/master' 2010-03-21 23:01:58 -07:00
xwin Cygwin/X: Make X -> XWin symlink during install 2010-03-22 00:48:33 -05:00
Makefile.am Catch errors in recursive relink targets 2010-03-22 00:45:57 -05:00