summaryrefslogtreecommitdiff
path: root/src/sna/sna_composite.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-01-15 22:13:20 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-01-16 01:30:13 +0000
commit380a2fca3cce4c99c5026ab800f7885a1959b16d (patch)
treea7f0a95a9d01e56c7413f08c1fcf92144f56d251 /src/sna/sna_composite.c
parent9f89250de1dc134f54cb68012fa5eb996c61d57e (diff)
sna: Optimise call to composite with single box
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.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/sna/sna_composite.c b/src/sna/sna_composite.c
index 4111b8d1..15876f52 100644
--- a/src/sna/sna_composite.c
+++ b/src/sna/sna_composite.c
@@ -495,9 +495,12 @@ sna_composite(CARD8 op,
goto fallback;
}
- tmp.boxes(sna, &tmp,
- REGION_RECTS(&region),
- REGION_NUM_RECTS(&region));
+ if (region.data == NULL)
+ tmp.box(sna, &tmp, &region.extents);
+ else
+ tmp.boxes(sna, &tmp,
+ REGION_BOXPTR(&region),
+ REGION_NUM_RECTS(&region));
apply_damage(&tmp, &region);
tmp.done(sna, &tmp);