sna: Remove damaged region after converting CPU bo to GPU bo

Reported-by: Jiri Slaby <jirislaby@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=70461
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2014-02-10 16:42:06 +00:00
parent 1267235fd4
commit 5142d1ca3f
1 changed files with 2 additions and 1 deletions

View File

@ -2440,6 +2440,7 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable,
priv->gpu_damage = priv->cpu_damage;
priv->cpu_damage = NULL;
sna_damage_subtract(&priv->gpu_damage, region);
discard_gpu = false;
} else {
DBG(("%s: pushing surrounding damage to GPU bo\n", __FUNCTION__));
@ -2449,13 +2450,13 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable,
sna_pixmap_free_cpu(sna, priv, false);
if (priv->flush)
sna_add_flush_pixmap(sna, priv, priv->gpu_bo);
discard_gpu = false;
assert(priv->cpu_damage == NULL);
sna_damage_all(&priv->gpu_damage,
pixmap->drawable.width,
pixmap->drawable.height);
sna_damage_subtract(&priv->gpu_damage, region);
discard_gpu = false;
}
}
sna_damage_add(&priv->cpu_damage, region);