sna: Apply drawable offsets to partial CPU damage being replaced

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2014-02-01 18:57:06 +00:00
parent 2ba8d40bf7
commit 495bf89496
1 changed files with 3 additions and 0 deletions

View File

@ -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);