diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-15 22:13:20 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-16 01:30:13 +0000 |
commit | 380a2fca3cce4c99c5026ab800f7885a1959b16d (patch) | |
tree | a7f0a95a9d01e56c7413f08c1fcf92144f56d251 /src/sna/sna_composite.c | |
parent | 9f89250de1dc134f54cb68012fa5eb996c61d57e (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.c | 9 |
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(®ion), - REGION_NUM_RECTS(®ion)); + if (region.data == NULL) + tmp.box(sna, &tmp, ®ion.extents); + else + tmp.boxes(sna, &tmp, + REGION_BOXPTR(®ion), + REGION_NUM_RECTS(®ion)); apply_damage(&tmp, ®ion); tmp.done(sna, &tmp); |