sna: Delete redundant branch
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 12 Feb 2014 07:56:10 +0000 (07:56 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 12 Feb 2014 08:00:44 +0000 (08:00 +0000)
The MOVE_READ else branch is repeated immediately below when marking up
damage for MOVE_WRITE, so remove it for simplicity.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
src/sna/sna_accel.c

index f9246aa..d79eb8a 100644 (file)
@@ -2203,11 +2203,6 @@ skip_inplace_map:
                        __sna_damage_destroy(DAMAGE_PTR(priv->gpu_damage));
                        priv->gpu_damage = NULL;
                }
-       } else {
-               assert(flags & MOVE_WRITE);
-               sna_pixmap_free_gpu(sna, priv);
-               assert(priv->gpu_damage == NULL);
-               assert(priv->clear == false);
        }
 
        if (flags & MOVE_WRITE || priv->create & KGEM_CAN_CREATE_LARGE) {
@@ -2216,8 +2211,9 @@ mark_damage:
                sna_damage_all(&priv->cpu_damage,
                               pixmap->drawable.width,
                               pixmap->drawable.height);
-               assert(priv->gpu_damage == NULL);
                sna_pixmap_free_gpu(sna, priv);
+               assert(priv->gpu_damage == NULL);
+               assert(priv->clear == false);
 
                if (priv->flush) {
                        assert(!priv->shm);