In slow imageblit, the pixel value is shifted by a certain amount (dependent
on the bpp and endianness) for each iteration. This is inefficient. Better
do the shifting once before going into the loop.
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
u32 i, j, l;
dst2 = (u32 __iomem *) dst1;
+ fgcolor <<= LEFT_POS(bpp);
+ bgcolor <<= LEFT_POS(bpp);
for (i = image->height; i--; ) {
shift = val = 0;
while (j--) {
l--;
color = (*s & 1 << (BIT_NR(l))) ? fgcolor : bgcolor;
- color <<= LEFT_POS(bpp);
val |= SHIFT_HIGH(color, shift);
/* Did the bitshift spill bits to the next long? */