sna: Restore the shadow pixels when reducing CPU damage to all

Reported-by: Joe Nahmias <joe@nahmias.net>
References: https://bugs.freedesktop.org/show_bug.cgi?id=46346
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-02-20 23:50:42 +00:00
parent dbe0580e20
commit 7ea4499755
1 changed files with 10 additions and 1 deletions

View File

@ -1215,8 +1215,17 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable,
if (sna_damage_is_all(&priv->cpu_damage,
pixmap->drawable.width,
pixmap->drawable.height))
pixmap->drawable.height)) {
sna_damage_destroy(&priv->gpu_damage);
sna_pixmap_free_gpu(sna, priv);
priv->undamaged = false;
if (pixmap->devPrivate.ptr == NULL &&
!sna_pixmap_alloc_cpu(sna, pixmap, priv, false))
return false;
goto out;
}
if (priv->clear)
return _sna_pixmap_move_to_cpu(pixmap, flags);