summaryrefslogtreecommitdiff
path: root/src/sna/sna_trapezoids_boxes.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-09-10 16:52:36 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-09-10 16:55:14 +0100
commitf2b62ab38f0f5970b2f868e10dc3499ff3118dbb (patch)
treee476d0c1cde569f8e6552cb3cf6c1d0c0dfcaffb /src/sna/sna_trapezoids_boxes.c
parent9b25eeee85d32223841640c3a39901e4b63707ce (diff)
sna: Prune damage that covers the entire target Pixmap
Reduce it early and mark it complete. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_trapezoids_boxes.c')
-rw-r--r--src/sna/sna_trapezoids_boxes.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sna/sna_trapezoids_boxes.c b/src/sna/sna_trapezoids_boxes.c
index a2045dcb..9900e3f0 100644
--- a/src/sna/sna_trapezoids_boxes.c
+++ b/src/sna/sna_trapezoids_boxes.c
@@ -85,7 +85,8 @@ static void apply_damage(struct sna_composite_op *op, RegionPtr region)
RegionTranslate(region, op->dst.x, op->dst.y);
assert_pixmap_contains_box(op->dst.pixmap, RegionExtents(region));
- sna_damage_add(op->damage, region);
+ if (sna_damage_add_to_pixmap(op->damage, region, op->dst.pixmap))
+ op->damage = NULL;
}
static void _apply_damage_box(struct sna_composite_op *op, const BoxRec *box)