Handle tileStride > 1 in fbEvenTile.
Patch courtesy of James Jones.
This commit is contained in:
parent
bf1ad1aa42
commit
1e189ed1da
1
fb/fb.h
1
fb/fb.h
|
@ -2032,6 +2032,7 @@ fbEvenTile (FbBits *dst,
|
||||||
int height,
|
int height,
|
||||||
|
|
||||||
FbBits *tile,
|
FbBits *tile,
|
||||||
|
FbStride tileStride,
|
||||||
int tileHeight,
|
int tileHeight,
|
||||||
|
|
||||||
int alu,
|
int alu,
|
||||||
|
|
12
fb/fbtile.c
12
fb/fbtile.c
|
@ -42,6 +42,7 @@ fbEvenTile (FbBits *dst,
|
||||||
int height,
|
int height,
|
||||||
|
|
||||||
FbBits *tile,
|
FbBits *tile,
|
||||||
|
FbStride tileStride,
|
||||||
int tileHeight,
|
int tileHeight,
|
||||||
|
|
||||||
int alu,
|
int alu,
|
||||||
|
@ -68,9 +69,9 @@ fbEvenTile (FbBits *dst,
|
||||||
/*
|
/*
|
||||||
* Compute tile start scanline and rotation parameters
|
* Compute tile start scanline and rotation parameters
|
||||||
*/
|
*/
|
||||||
tileEnd = tile + tileHeight;
|
tileEnd = tile + tileHeight * tileStride;
|
||||||
modulus (- yRot, tileHeight, tileY);
|
modulus (- yRot, tileHeight, tileY);
|
||||||
t = tile + tileY;
|
t = tile + tileY * tileStride;
|
||||||
modulus (- xRot, FB_UNIT, tileX);
|
modulus (- xRot, FB_UNIT, tileX);
|
||||||
rot = tileX;
|
rot = tileX;
|
||||||
|
|
||||||
|
@ -80,8 +81,9 @@ fbEvenTile (FbBits *dst,
|
||||||
/*
|
/*
|
||||||
* Pick up bits for this scanline
|
* Pick up bits for this scanline
|
||||||
*/
|
*/
|
||||||
bits = READ(t++);
|
bits = READ(t);
|
||||||
if (t == tileEnd) t = tile;
|
t += tileStride;
|
||||||
|
if (t >= tileEnd) t = tile;
|
||||||
bits = FbRotLeft(bits,rot);
|
bits = FbRotLeft(bits,rot);
|
||||||
and = fbAnd(alu,bits,pm);
|
and = fbAnd(alu,bits,pm);
|
||||||
xor = fbXor(alu,bits,pm);
|
xor = fbXor(alu,bits,pm);
|
||||||
|
@ -194,7 +196,7 @@ fbTile (FbBits *dst,
|
||||||
{
|
{
|
||||||
if (FbEvenTile (tileWidth))
|
if (FbEvenTile (tileWidth))
|
||||||
fbEvenTile (dst, dstStride, dstX, width, height,
|
fbEvenTile (dst, dstStride, dstX, width, height,
|
||||||
tile, tileHeight,
|
tile, tileStride, tileHeight,
|
||||||
alu, pm, xRot, yRot);
|
alu, pm, xRot, yRot);
|
||||||
else
|
else
|
||||||
fbOddTile (dst, dstStride, dstX, width, height,
|
fbOddTile (dst, dstStride, dstX, width, height,
|
||||||
|
|
Loading…
Reference in New Issue