summaryrefslogtreecommitdiff
path: root/src/sna/sna_composite.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-03-14 11:26:03 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-03-14 11:26:03 +0000
commit8a303f195b53a78dcbb2b6c84e7e691bedc86d25 (patch)
treeacb8a24110fbc06642e347ac1276431927668415 /src/sna/sna_composite.c
parent63eeb98463a77adadc26d9de1e640b75eefebf1a (diff)
sna: Remove existing damage before overwriting with a composite op
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_composite.c')
-rw-r--r--src/sna/sna_composite.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sna/sna_composite.c b/src/sna/sna_composite.c
index a610e7cd..b098fcc9 100644
--- a/src/sna/sna_composite.c
+++ b/src/sna/sna_composite.c
@@ -479,6 +479,11 @@ sna_composite(CARD8 op,
get_drawable_dx(dst->pDrawable),
get_drawable_dy(dst->pDrawable)));
+ if (op <= PictOpSrc) {
+ struct sna_pixmap *priv = sna_pixmap_from_drawable(dst->pDrawable);
+ sna_damage_subtract(&priv->cpu_damage, &region);
+ }
+
memset(&tmp, 0, sizeof(tmp));
if (!sna->render.composite(sna,
op, src, mask, dst,