aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/fb/fb.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-09-15 10:39:59 +0000
committermarha <marha@users.sourceforge.net>2009-09-15 10:39:59 +0000
commita233ed27754bb0d373d63569d9a28aeb8fee5b82 (patch)
tree2732a9434bbc102653dc22df9887d94e19570836 /xorg-server/fb/fb.h
parenta915739887477b28d924ecc8417ee107d125bd6c (diff)
downloadvcxsrv-a233ed27754bb0d373d63569d9a28aeb8fee5b82.tar.gz
vcxsrv-a233ed27754bb0d373d63569d9a28aeb8fee5b82.tar.bz2
vcxsrv-a233ed27754bb0d373d63569d9a28aeb8fee5b82.zip
Checked in xorg-server-1.6.99.901
Diffstat (limited to 'xorg-server/fb/fb.h')
-rw-r--r--xorg-server/fb/fb.h44
1 files changed, 28 insertions, 16 deletions
diff --git a/xorg-server/fb/fb.h b/xorg-server/fb/fb.h
index 2d3c85d44..c35e7654b 100644
--- a/xorg-server/fb/fb.h
+++ b/xorg-server/fb/fb.h
@@ -487,22 +487,34 @@ extern _X_EXPORT void fbSetBits (FbStip *bits, int stride, FbStip data);
* The term "lane" comes from the hardware term "byte-lane" which
*/
-#define FbLaneCase1(n,a,o) ((n) == 0x01 ? (void) \
- WRITE((CARD8 *) ((a)+FbPatternOffset(o,CARD8)), \
- fgxor) : (void) 0)
-#define FbLaneCase2(n,a,o) ((n) == 0x03 ? (void) \
- WRITE((CARD16 *) ((a)+FbPatternOffset(o,CARD16)), \
- fgxor) : \
- ((void)FbLaneCase1((n)&1,a,o), \
- FbLaneCase1((n)>>1,a,(o)+1)))
-#define FbLaneCase4(n,a,o) ((n) == 0x0f ? (void) \
- WRITE((CARD32 *) ((a)+FbPatternOffset(o,CARD32)), \
- fgxor) : \
- ((void)FbLaneCase2((n)&3,a,o), \
- FbLaneCase2((n)>>2,a,(o)+2)))
-#define FbLaneCase8(n,a,o) ((n) == 0x0ff ? (void) (*(FbBits *) ((a)+(o)) = fgxor) : \
- ((void)FbLaneCase4((n)&15,a,o), \
- FbLaneCase4((n)>>4,a,(o)+4)))
+#define FbLaneCase1(n,a,o) \
+ if ((n) == 0x01) { \
+ WRITE((CARD8 *) ((a)+FbPatternOffset(o,CARD8)), fgxor); \
+ }
+
+#define FbLaneCase2(n,a,o) \
+ if ((n) == 0x03) { \
+ WRITE((CARD16 *) ((a)+FbPatternOffset(o,CARD16)), fgxor); \
+ } else { \
+ FbLaneCase1((n)&1,a,o) \
+ FbLaneCase1((n)>>1,a,(o)+1) \
+ }
+
+#define FbLaneCase4(n,a,o) \
+ if ((n) == 0x0f) { \
+ WRITE((CARD32 *) ((a)+FbPatternOffset(o,CARD32)), fgxor); \
+ } else { \
+ FbLaneCase2((n)&3,a,o) \
+ FbLaneCase2((n)>>2,a,(o)+2) \
+ }
+
+#define FbLaneCase8(n,a,o) \
+ if ((n) == 0x0ff) { \
+ *(FbBits *) ((a)+(o)) = fgxor; \
+ } else { \
+ FbLaneCase4((n)&15,a,o) \
+ FbLaneCase4((n)>>4,a,(o)+4) \
+ }
#if FB_SHIFT == 6
#define FbLaneCase(n,a) FbLaneCase8(n,(CARD8 *) (a),0)