sna: Place the pixmap on the DRI dirty list after damaging the shadow copy

In order that we remember to flush the contents back to the GPU
before we wake up the DRI clients, we need to add those dirty
pixmaps to the flushing list. I caught the obvious place, the
central move-to-cpu, but I missed a couple of paths were we
optimise the copy onto the shadow.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2011-06-09 15:53:11 +01:00
parent 190a678656
commit 4b54c89fbd
1 changed files with 5 additions and 0 deletions

View File

@ -902,6 +902,8 @@ sna_put_image_blt(DrawablePtr drawable, GCPtr gc, RegionPtr region,
assert_pixmap_contains_box(pixmap, RegionExtents(region));
sna_damage_subtract(&priv->gpu_damage, region);
sna_damage_add(&priv->cpu_damage, region);
if (priv->flush)
list_move(&priv->list, &sna->dirty_pixmaps);
}
get_drawable_deltas(drawable, pixmap, &dx, &dy);
@ -1181,6 +1183,9 @@ fallback:
&region);
sna_damage_add(&dst_priv->cpu_damage,
&region);
if (dst_priv->flush)
list_move(&dst_priv->list,
&sna->dirty_pixmaps);
}
} else
sna_drawable_move_region_to_cpu(&dst_pixmap->drawable,