summaryrefslogtreecommitdiff
path: root/src/sna/gen6_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-11-14 13:05:00 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-11-14 13:05:00 +0000
commit6fc2928f578ae1e278c968d5c778d99d56bd667a (patch)
tree854d987c4c58fc8bf32c24da946c12e67e170f6a /src/sna/gen6_render.c
parent99338ebe61917a07611cbc81cfaf70c0ec905014 (diff)
sna: tidy assignment of composite damage
Make sure that the damage is always set, even if only to NULL, so that we are safe if in future the operation state is not initially cleared. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen6_render.c')
-rw-r--r--src/sna/gen6_render.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c
index 66bbb9e9..164f69d5 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -2046,9 +2046,10 @@ gen6_composite_set_target(struct sna_composite_op *op, PicturePtr dst)
return FALSE;
op->dst.bo = priv->gpu_bo;
- if (!sna_damage_is_all(&priv->gpu_damage,
- op->dst.width, op->dst.height))
- op->damage = &priv->gpu_damage;
+ op->damage = &priv->gpu_damage;
+ if (sna_damage_is_all(&priv->gpu_damage,
+ op->dst.width, op->dst.height))
+ op->damage = NULL;
}
get_drawable_deltas(dst->pDrawable, op->dst.pixmap,