summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-02-01 18:57:06 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2014-02-01 18:57:29 +0000
commit495bf89496a96eff0b2c5b6a95aa29df8d7fbc81 (patch)
tree7b4e2d131d8a03f10b7d4b678c43bf21d0d1d312
parent2ba8d40bf7e4d3e8fa541c001f82aa65f26bed3a (diff)
sna: Apply drawable offsets to partial CPU damage being replaced
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 1fbbddc6..aecae513 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -2424,6 +2424,9 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable,
priv->cpu_bo && !priv->cpu_bo->flush &&
__kgem_bo_is_busy(&sna->kgem, priv->cpu_bo)) {
if (!region_subsumes_pixmap(region, pixmap)) {
+ if (get_drawable_deltas(drawable, pixmap, &dx, &dy))
+ RegionTranslate(region, dx, dy);
+
sna_damage_subtract(&priv->cpu_damage, region);
if (sna_pixmap_move_to_gpu(pixmap, MOVE_READ | MOVE_ASYNC_HINT)) {
sna_pixmap_free_cpu(sna, priv, false);