sna: Add CPU damage to DRI flush

When we damage the CPU shadow of a DRI exported pixmap, we must remember
to add that pixmap of the list to be flushed.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2016-08-17 09:42:18 +01:00
parent c8fc7f5e4b
commit 0bbd55fd1d
1 changed files with 8 additions and 0 deletions

View File

@ -2470,6 +2470,10 @@ done:
DBG(("%s: discarding idle GPU bo\n", __FUNCTION__));
sna_pixmap_free_gpu(sna, priv);
}
if (priv->flush) {
assert(!priv->shm);
sna_add_flush_pixmap(sna, priv, priv->gpu_bo);
}
priv->source_count = SOURCE_BIAS;
}
@ -2718,6 +2722,10 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable,
}
}
sna_damage_add_to_pixmap(&priv->cpu_damage, region, pixmap);
if (priv->flush) {
assert(!priv->shm);
sna_add_flush_pixmap(sna, priv, priv->gpu_bo);
}
if (dx | dy)
RegionTranslate(region, -dx, -dy);