diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-02-20 23:50:42 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-02-20 23:50:42 +0000 |
commit | 7ea44997553ffdf57b346dc9d83742c511c9e5a4 (patch) | |
tree | f120f8f2e21b0659e069ae3aee374d89375a5157 | |
parent | dbe0580e207ad85cb6a659f86c5746a7ecbcd036 (diff) |
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>
-rw-r--r-- | src/sna/sna_accel.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index aab85d85..c8fcc75b 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -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); |