summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-11-19 19:12:06 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-11-19 19:12:31 +0000
commit3b9479dc39d32fd97f80c1e5e0fac67d36ee5e40 (patch)
tree485f27162e1ed5945ad834bcf93cd9999816b62d
parent297f7680cfd73ab6eb099adca7aefe00e61c9e85 (diff)
sna: Micro-optimise sna_push_pixels_solid_blt()
Unroll the byte reversal as we know the row length is word aligned. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 69e286bf..cfb32c60 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -7979,18 +7979,18 @@ sna_push_pixels_solid_blt(GCPtr gc,
break;
dst = ptr;
- bstride -= bw;
src_stride = bitmap->devKind;
src = (uint8_t*)bitmap->devPrivate.ptr;
src += (box->y1 - region->extents.y1) * src_stride + bx1/8;
- src_stride -= bw;
+ src_stride -= bstride;
do {
- int i = bw;
+ int i = bstride;
do {
*dst++ = byte_reverse(*src++);
- } while (--i);
- dst += bstride;
+ *dst++ = byte_reverse(*src++);
+ i -= 2;
+ } while (i);
src += src_stride;
} while (--bh);