mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 22:10:10 +01:00
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.
This commit is contained in:
parent
bdde9d2fce
commit
bd3d2724f5
1 changed files with 4 additions and 3 deletions
|
|
@ -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.
|
||||
*/
|
||||
if (priv->have_fake_front)
|
||||
DRI2CopyRegion(psc->base.dpy, pdraw->xDrawable, region,
|
||||
DRI2BufferFakeFrontLeft, DRI2BufferFrontLeft);
|
||||
|
||||
XFixesDestroyRegion(psc->base.dpy, region);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue