diff options
author | Michel Dänzer <daenzer@vmware.com> | 2010-07-20 12:21:17 +0200 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2010-07-20 12:21:17 +0200 |
commit | bd3d2724f51a44b7fc814a5bc43d8ddafa8e3cba (patch) | |
tree | 1dc48fcbf9010c2362c2d70c3d29956d242bc09a /src/glx/dri2_glx.c | |
parent | bdde9d2fcead2e49985f4cd1c73ad4aae5b2878f (diff) | |
download | external_mesa3d-bd3d2724f51a44b7fc814a5bc43d8ddafa8e3cba.zip external_mesa3d-bd3d2724f51a44b7fc814a5bc43d8ddafa8e3cba.tar.gz external_mesa3d-bd3d2724f51a44b7fc814a5bc43d8ddafa8e3cba.tar.bz2 |
glx/dri2: Fix dri2CopySubBuffer() again.
Only refresh the fake front buffer if there is one, and only destroy the region
once.
Fixes X11 protocol errors reported by 'mcgreg' on IRC.
Diffstat (limited to 'src/glx/dri2_glx.c')
-rw-r--r-- | src/glx/dri2_glx.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c index 4fbe949..be8671d 100644 --- a/src/glx/dri2_glx.c +++ b/src/glx/dri2_glx.c @@ -352,13 +352,14 @@ dri2CopySubBuffer(__GLXDRIdrawable *pdraw, int x, int y, int width, int height) region = XFixesCreateRegion(psc->base.dpy, &xrect, 1); DRI2CopyRegion(psc->base.dpy, pdraw->xDrawable, region, DRI2BufferFrontLeft, DRI2BufferBackLeft); - XFixesDestroyRegion(psc->base.dpy, region); /* Refresh the fake front (if present) after we just damaged the real * front. */ - DRI2CopyRegion(psc->base.dpy, pdraw->xDrawable, region, - DRI2BufferFakeFrontLeft, DRI2BufferFrontLeft); + if (priv->have_fake_front) + DRI2CopyRegion(psc->base.dpy, pdraw->xDrawable, region, + DRI2BufferFakeFrontLeft, DRI2BufferFrontLeft); + XFixesDestroyRegion(psc->base.dpy, region); } |