File U_sna-Restore-local-damage-processing-for-TearFree-DRI.patch of Package xf86-video-intel.openSUSE_Leap_42.2_Update

From 26f8ab5429a554801641415f0ab3b2d68cea1d00 Mon Sep 17 00:00:00 2001
From: Chris Wilson <chris@chris-wilson.co.uk>
Date: Mon, 4 Jul 2016 10:11:50 +0100
Subject: [PATCH] sna: Restore local damage processing for
 TearFree/DRI2/swcursor early

We currently hack TearFree/DRI2/swcursor to avoid recursion from inside
the SwapBuffers to handle the swcursor. This has the issue of a trailing
cursor on the boundary of the DRI2 drawable, but prevents the explosion
from swapping TearFree buffers from within the TearFree handler (i.e.
recursion). This only has to apply to the damage processing before the
swap.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 src/sna/sna_dri2.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -1037,8 +1037,8 @@ static void set_bo(PixmapPtr pixmap, str
 	assert(bo->flush);
 
 	if (APPLY_DAMAGE) {
-		DamageRegionProcessPending(&pixmap->drawable);
 		sna->ignore_copy_area = false;
+		DamageRegionProcessPending(&pixmap->drawable);
 	}
 }
 
@@ -1394,8 +1394,8 @@ __sna_dri2_copy_region(struct sna *sna,
 	}
 
 	if (APPLY_DAMAGE || flags & DRI2_DAMAGE) {
-		DamageRegionProcessPending(&pixmap->drawable);
 		sna->ignore_copy_area = false;
+		DamageRegionProcessPending(&pixmap->drawable);
 	}
 
 	if (clip.data)
@@ -2421,8 +2421,8 @@ static void sna_dri2_xchg_crtc(struct sn
 	}
 	sna_shadow_set_crtc(sna, crtc, get_private(back)->bo);
 	if (APPLY_DAMAGE) {
-		DamageRegionProcessPending(&win->drawable);
 		sna->ignore_copy_area = false;
+		DamageRegionProcessPending(&win->drawable);
 	}
 
 	if (priv->front == NULL) {
openSUSE Build Service is sponsored by