From 4b54c89fbddc7aa72e5f2c5eded44e84bce70b77 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 9 Jun 2011 15:53:11 +0100 Subject: [PATCH] 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 --- src/sna/sna_accel.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index ead56dfb..af021b64 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -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: ®ion); sna_damage_add(&dst_priv->cpu_damage, ®ion); + if (dst_priv->flush) + list_move(&dst_priv->list, + &sna->dirty_pixmaps); } } else sna_drawable_move_region_to_cpu(&dst_pixmap->drawable,