summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-09-14 19:32:06 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-09-14 19:32:06 +0100
commitd995705fb01842652a79076cbecee4392f653bfe (patch)
treea48bc0ac5793002f5767478e5d5b794129c076e7
parentdeacab87e4ba7fe09f0f16568dc2848949f2707a (diff)
sna: Only discard CPU damage if we completely overwrite its extents
If we are performing a clipped copy, then we must be careful not to completely discard the CPU damage as it may not be entirely replaced. Reported-by: Roman Jarosz <kedgedev@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54937 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 7db7368b..6832a7c1 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -4410,7 +4410,8 @@ sna_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc,
sna_damage_destroy(&dst_priv->cpu_damage);
list_del(&dst_priv->list);
}
- hint |= IGNORE_CPU;
+ if (region->data == NULL)
+ hint |= IGNORE_CPU;
}
bo = sna_drawable_use_bo(&dst_pixmap->drawable, hint,