summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/common
diff options
context:
space:
mode:
authorPeter Hutterer <[email protected]>2008-08-21 11:22:40 +0200
committerMichel Dänzer <[email protected]>2008-08-21 11:22:40 +0200
commit3a94b25538c647df965a93cd7734b841257ef203 (patch)
tree5ad065c705740ca3714eaad00a5725638cf73185 /src/mesa/drivers/dri/common
parent495c02262eaaa68f2df23c2265362da51851c57a (diff)
Report damage before modifying the area, not after.
If we copy the area before reporting the damage in this area, the server may restore buffered data over the new data, leading to artefacts on the screen. Reproducable with two cursors (second of which is SW rendered) and moving windows around in compiz. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=16384 .
Diffstat (limited to 'src/mesa/drivers/dri/common')
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index 9655741bbba..93b9f458e41 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -512,13 +512,13 @@ static void driCopySubBuffer(__DRIdrawable *dPriv,
{
drm_clip_rect_t rect;
- dPriv->driScreenPriv->DriverAPI.CopySubBuffer(dPriv, x, y, w, h);
-
rect.x1 = x;
rect.y1 = dPriv->h - y - h;
rect.x2 = x + w;
rect.y2 = rect.y1 + h;
driReportDamage(dPriv, &rect, 1);
+
+ dPriv->driScreenPriv->DriverAPI.CopySubBuffer(dPriv, x, y, w, h);
}
const __DRIcopySubBufferExtension driCopySubBufferExtension = {