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

Chris Wilson ickle at kemper.freedesktop.org
Fri Mar 2 10:13:49 PST 2012


 src/sna/sna_composite.c |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

New commits:
commit f890fc25c6c2ca358323be5a0d636c3f2ab4b298
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Mar 2 18:11:56 2012 +0000

    sna: And fix compilation for last commit
    
    I skipped a GCC warning about the implicit function declaration, which
    of course results in a runtime silent death. Oops.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_composite.c b/src/sna/sna_composite.c
index 5b81596..55a496e 100644
--- a/src/sna/sna_composite.c
+++ b/src/sna/sna_composite.c
@@ -740,15 +740,18 @@ sna_composite_rectangles(CARD8		 op,
 		goto fallback;
 	}
 
+	priv = sna_pixmap(pixmap);
+	if (priv == NULL) {
+		DBG(("%s: fallback, not attached\n", __FUNCTION__));
+		goto fallback;
+	}
+
 	/* If we going to be overwriting any CPU damage with a subsequent
 	 * operation, then we may as well delete it without moving it
 	 * first to the GPU.
 	 */
-	if (op <= PictOpSrc) {
-		priv = sna_pixmap_attach(pixmap);
-		if (priv)
-			sna_damage_subtract(&priv->cpu_damage, &region);
-	}
+	if (op <= PictOpSrc)
+		sna_damage_subtract(&priv->cpu_damage, &region);
 
 	priv = sna_pixmap_move_to_gpu(pixmap, MOVE_READ | MOVE_WRITE);
 	if (priv == NULL) {


More information about the xorg-commit mailing list