xf86-video-intel: src/sna/sna_dri2.c

Chris Wilson ickle at kemper.freedesktop.org
Wed Mar 28 18:42:52 UTC 2018


 src/sna/sna_dri2.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7418d53c589719f71154c5ec58a2b7c486020587
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Mar 28 19:38:51 2018 +0100

    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 at chris-wilson.co.uk>

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",


More information about the xorg-commit mailing list