diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-03-28 19:38:51 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-03-28 19:42:06 +0100 |
commit | 7418d53c589719f71154c5ec58a2b7c486020587 (patch) | |
tree | 65b1ea6f09ae0afbc8a1577a770060180233a295 | |
parent | 6c1e70ca4234a5ab23fcdb3735fc55ac7939c52c (diff) |
sna/dri2: Clip application of damage to windowed swapbuffers
Since forever we have been passing region=NULL when doing a windowed
swapbuffer on vblank, and using that to mark the entire pixmap as being
damaged. For an uncomposited window, this is incorrect as it points to a
clipped region of the ScreenPixmap and so we were marking the entire
ScreenPixmap as being flushed, but only having operated on the windowed
region. Instead pass along the clip extents if region is unset.
References: https://bugs.freedesktop.org/show_bug.cgi?id=105720
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_dri2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c index 2d822369..9cddb57f 100644 --- a/src/sna/sna_dri2.c +++ b/src/sna/sna_dri2.c @@ -1303,7 +1303,7 @@ __sna_dri2_copy_region(struct sna *sna, DrawablePtr draw, RegionPtr region, assert(region == NULL || region == &clip); priv = sna_pixmap_move_area_to_gpu(pixmap, &clip.extents, hint); if (priv) { - damage(pixmap, priv, region); + damage(pixmap, priv, region ?: &clip); dst_bo = priv->gpu_bo; } DBG(("%s: updated FrontLeft dst_bo from handle=%d to handle=%d\n", |