sna: Skip adding damage if it is already contained
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 28 Jun 2014 13:20:00 +0000 (14:20 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Sun, 29 Jun 2014 05:57:05 +0000 (06:57 +0100)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
src/sna/sna_accel.c

index 9f5c0b4..b7e3d90 100644 (file)
@@ -2865,7 +2865,7 @@ move_to_cpu:
 
                                DBG(("%s: region already in CPU damage\n",
                                     __FUNCTION__));
-                               goto done;
+                               goto already_damaged;
                        }
                }
 
@@ -2986,6 +2986,7 @@ done:
                }
        }
 
+already_damaged:
        if (dx | dy)
                RegionTranslate(region, -dx, -dy);