summaryrefslogtreecommitdiff
path: root/xserver/fb/fbbltone.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2010-07-27 19:02:39 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2010-07-27 19:02:39 +0000
commit269d40cbcc43b41f621ca6d91c182952f60ec48e (patch)
tree872f2fddd3f2207e57a28595e73886713ce4a77a /xserver/fb/fbbltone.c
parent917a2249b787451cad3f9697872aeccfd0da3324 (diff)
Update to xserver 1.8. Tested by many. Ok oga@, todd@.
Diffstat (limited to 'xserver/fb/fbbltone.c')
-rw-r--r--xserver/fb/fbbltone.c100
1 files changed, 50 insertions, 50 deletions
diff --git a/xserver/fb/fbbltone.c b/xserver/fb/fbbltone.c
index f06357a37..5d5d2e6bf 100644
--- a/xserver/fb/fbbltone.c
+++ b/xserver/fb/fbbltone.c
@@ -1,6 +1,4 @@
/*
- * Id: fbbltone.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
- *
* Copyright © 1998 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
@@ -51,17 +49,17 @@
#define LoadBits {\
if (leftShift) { \
- bitsRight = (src < srcEnd ? *src++ : 0); \
+ bitsRight = (src < srcEnd ? READ(src++) : 0); \
bits = (FbStipLeft (bitsLeft, leftShift) | \
FbStipRight(bitsRight, rightShift)); \
bitsLeft = bitsRight; \
} else \
- bits = (src < srcEnd ? *src++ : 0); \
+ bits = (src < srcEnd ? READ(src++) : 0); \
}
#ifndef FBNOPIXADDR
-#define LaneCases1(n,a) case n: (void)FbLaneCase(n,a); break
+#define LaneCases1(n,a) case n: FbLaneCase(n,a); break
#define LaneCases2(n,a) LaneCases1(n,a); LaneCases1(n+1,a)
#define LaneCases4(n,a) LaneCases2(n,a); LaneCases2(n+2,a)
#define LaneCases8(n,a) LaneCases4(n,a); LaneCases4(n+4,a)
@@ -285,7 +283,7 @@ fbBltOne (FbStip *src,
bitsLeft = 0;
if (srcX > dstS)
- bitsLeft = *src++;
+ bitsLeft = READ(src++);
if (n)
{
/*
@@ -338,7 +336,7 @@ fbBltOne (FbStip *src,
else
#endif
mask = fbBits[FbLeftStipBits(bits,pixelsPerDst)];
- *dst = FbOpaqueStipple (mask, fgxor, bgxor);
+ WRITE(dst, FbOpaqueStipple (mask, fgxor, bgxor));
dst++;
bits = FbStipLeft(bits, pixelsPerDst);
}
@@ -368,8 +366,8 @@ fbBltOne (FbStip *src,
if (left || !transparent)
{
mask = fbBits[left];
- *dst = FbStippleRRop (*dst, mask,
- fgand, fgxor, bgand, bgxor);
+ WRITE(dst, FbStippleRRop (READ(dst), mask,
+ fgand, fgxor, bgand, bgxor));
}
dst++;
bits = FbStipLeft(bits, pixelsPerDst);
@@ -537,7 +535,7 @@ const FbBits fbStipple24Bits[3][1 << FbStip24Len] = {
stip = FbLeftStipBits(bits, len); \
} else { \
stip = FbLeftStipBits(bits, remain); \
- bits = (src < srcEnd ? *src++ : 0); \
+ bits = (src < srcEnd ? READ(src++) : 0); \
__len = (len) - remain; \
stip = FbMergePartStip24Bits(stip, FbLeftStipBits(bits, __len), \
remain, __len); \
@@ -548,7 +546,7 @@ const FbBits fbStipple24Bits[3][1 << FbStip24Len] = {
}
#define fbInitStipBits(offset,len,stip) {\
- bits = FbStipLeft (*src++,offset); \
+ bits = FbStipLeft (READ(src++),offset); \
remain = FB_STIP_UNIT - offset; \
fbFirstStipBits(len,stip); \
stip = FbMergeStip24Bits (0, stip, len); \
@@ -631,10 +629,11 @@ fbBltOne24 (FbStip *srcLine,
if (leftMask)
{
mask = fbStipple24Bits[rot >> 3][stip];
- *dst = (*dst & ~leftMask) | (FbOpaqueStipple (mask,
- FbRot24(fgxor, rot),
- FbRot24(bgxor, rot))
- & leftMask);
+ WRITE(dst, (READ(dst) & ~leftMask) |
+ (FbOpaqueStipple (mask,
+ FbRot24(fgxor, rot),
+ FbRot24(bgxor, rot))
+ & leftMask));
dst++;
fbNextStipBits(rot,stip);
}
@@ -642,19 +641,20 @@ fbBltOne24 (FbStip *srcLine,
while (nl--)
{
mask = fbStipple24Bits[rot>>3][stip];
- *dst = FbOpaqueStipple (mask,
- FbRot24(fgxor, rot),
- FbRot24(bgxor, rot));
+ WRITE(dst, FbOpaqueStipple (mask,
+ FbRot24(fgxor, rot),
+ FbRot24(bgxor, rot)));
dst++;
fbNextStipBits(rot,stip);
}
if (rightMask)
{
mask = fbStipple24Bits[rot >> 3][stip];
- *dst = (*dst & ~rightMask) | (FbOpaqueStipple (mask,
- FbRot24(fgxor, rot),
- FbRot24(bgxor, rot))
- & rightMask);
+ WRITE(dst, (READ(dst) & ~rightMask) |
+ (FbOpaqueStipple (mask,
+ FbRot24(fgxor, rot),
+ FbRot24(bgxor, rot))
+ & rightMask));
}
dst += dstStride;
src += srcStride;
@@ -674,7 +674,7 @@ fbBltOne24 (FbStip *srcLine,
if (stip)
{
mask = fbStipple24Bits[rot >> 3][stip] & leftMask;
- *dst = (*dst & ~mask) | (FbRot24(fgxor, rot) & mask);
+ WRITE(dst, (READ(dst) & ~mask) | (FbRot24(fgxor, rot) & mask));
}
dst++;
fbNextStipBits (rot, stip);
@@ -685,7 +685,7 @@ fbBltOne24 (FbStip *srcLine,
if (stip)
{
mask = fbStipple24Bits[rot>>3][stip];
- *dst = (*dst & ~mask) | (FbRot24(fgxor,rot) & mask);
+ WRITE(dst, (READ(dst) & ~mask) | (FbRot24(fgxor,rot) & mask));
}
dst++;
fbNextStipBits (rot, stip);
@@ -695,7 +695,7 @@ fbBltOne24 (FbStip *srcLine,
if (stip)
{
mask = fbStipple24Bits[rot >> 3][stip] & rightMask;
- *dst = (*dst & ~mask) | (FbRot24(fgxor, rot) & mask);
+ WRITE(dst, (READ(dst) & ~mask) | (FbRot24(fgxor, rot) & mask));
}
}
dst += dstStride;
@@ -712,12 +712,12 @@ fbBltOne24 (FbStip *srcLine,
if (leftMask)
{
mask = fbStipple24Bits[rot >> 3][stip];
- *dst = FbStippleRRopMask (*dst, mask,
- FbRot24(fgand, rot),
- FbRot24(fgxor, rot),
- FbRot24(bgand, rot),
- FbRot24(bgxor, rot),
- leftMask);
+ WRITE(dst, FbStippleRRopMask (READ(dst), mask,
+ FbRot24(fgand, rot),
+ FbRot24(fgxor, rot),
+ FbRot24(bgand, rot),
+ FbRot24(bgxor, rot),
+ leftMask));
dst++;
fbNextStipBits(rot,stip);
}
@@ -725,23 +725,23 @@ fbBltOne24 (FbStip *srcLine,
while (nl--)
{
mask = fbStipple24Bits[rot >> 3][stip];
- *dst = FbStippleRRop (*dst, mask,
- FbRot24(fgand, rot),
- FbRot24(fgxor, rot),
- FbRot24(bgand, rot),
- FbRot24(bgxor, rot));
+ WRITE(dst, FbStippleRRop (READ(dst), mask,
+ FbRot24(fgand, rot),
+ FbRot24(fgxor, rot),
+ FbRot24(bgand, rot),
+ FbRot24(bgxor, rot)));
dst++;
fbNextStipBits(rot,stip);
}
if (rightMask)
{
mask = fbStipple24Bits[rot >> 3][stip];
- *dst = FbStippleRRopMask (*dst, mask,
- FbRot24(fgand, rot),
- FbRot24(fgxor, rot),
- FbRot24(bgand, rot),
- FbRot24(bgxor, rot),
- rightMask);
+ WRITE(dst, FbStippleRRopMask (READ(dst), mask,
+ FbRot24(fgand, rot),
+ FbRot24(fgxor, rot),
+ FbRot24(bgand, rot),
+ FbRot24(bgxor, rot),
+ rightMask));
}
dst += dstStride;
}
@@ -832,7 +832,7 @@ fbBltPlane (FbBits *src,
if (srcBpp == 24)
srcMask0 = FbRot24(pm,rot0) & FbBitsMask(0, srcBpp);
#endif
- srcBits = *s++;
+ srcBits = READ(s++);
dstMask = dstMaskFirst;
dstUnion = 0;
@@ -844,7 +844,7 @@ fbBltPlane (FbBits *src,
{
if (!srcMask)
{
- srcBits = *s++;
+ srcBits = READ(s++);
#ifdef FB_24BIT
if (srcBpp == 24)
srcMask0 = FbNext24Pix(srcMask0) & FbBitsMask(0,24);
@@ -853,9 +853,9 @@ fbBltPlane (FbBits *src,
}
if (!dstMask)
{
- *d = FbStippleRRopMask(*d, dstBits,
- fgand, fgxor, bgand, bgxor,
- dstUnion);
+ WRITE(d, FbStippleRRopMask(READ(d), dstBits,
+ fgand, fgxor, bgand, bgxor,
+ dstUnion));
d++;
dstMask = FbStipMask(0,1);
dstUnion = 0;
@@ -871,9 +871,9 @@ fbBltPlane (FbBits *src,
dstMask = FbStipRight(dstMask,1);
}
if (dstUnion)
- *d = FbStippleRRopMask(*d,dstBits,
- fgand, fgxor, bgand, bgxor,
- dstUnion);
+ WRITE(d, FbStippleRRopMask(READ(d),dstBits,
+ fgand, fgxor, bgand, bgxor,
+ dstUnion));
}
}