2 * Copyright © 1998 Keith Packard
4 * Permission to use, copy, modify, distribute, and sell this software and its
5 * documentation for any purpose is hereby granted without fee, provided that
6 * the above copyright notice appear in all copies and that both that
7 * copyright notice and this permission notice appear in supporting
8 * documentation, and that the name of Keith Packard not be used in
9 * advertising or publicity pertaining to distribution of the software without
10 * specific, written prior permission. Keith Packard makes no
11 * representations about the suitability of this software for any purpose. It
12 * is provided "as is" without express or implied warranty.
14 * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16 * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20 * PERFORMANCE OF THIS SOFTWARE.
23 #ifdef HAVE_DIX_CONFIG_H
24 #include <dix-config.h>
40 #define BRESSOLID fbBresSolid8
41 #define BRESDASH fbBresDash8
44 #define GLYPH fbGlyph8
45 #define POLYLINE fbPolyline8
46 #define POLYSEGMENT fbPolySegment8
64 #define BRESSOLID fbBresSolid16
65 #define BRESDASH fbBresDash16
68 #define GLYPH fbGlyph16
69 #define POLYLINE fbPolyline16
70 #define POLYSEGMENT fbPolySegment16
93 #define BRESSOLID fbBresSolid24
94 #define BRESDASH fbBresDash24
97 #define POLYLINE fbPolyline24
98 #define POLYSEGMENT fbPolySegment24
101 #define BITSUNIT BYTE
104 #define FbDoTypeStore(b,t,x,s) WRITE(((t *) (b)), (x) >> (s))
105 #define FbDoTypeRRop(b,t,a,x,s) WRITE((t *) (b), FbDoRRop(READ((t *) (b)),\
108 #define FbDoTypeMaskRRop(b,t,a,x,m,s) WRITE((t *) (b), FbDoMaskRRop(READ((t *) (b)),\
112 #if BITMAP_BIT_ORDER == LSBFirst
113 #define BITSSTORE(b,x) ((unsigned long) (b) & 1 ? \
114 (FbDoTypeStore (b, CARD8, x, 0), \
115 FbDoTypeStore ((b) + 1, CARD16, x, 8)) : \
116 (FbDoTypeStore (b, CARD16, x, 0), \
117 FbDoTypeStore ((b) + 2, CARD8, x, 16)))
118 #define BITSRROP(b,a,x) ((unsigned long) (b) & 1 ? \
119 (FbDoTypeRRop(b,CARD8,a,x,0), \
120 FbDoTypeRRop((b)+1,CARD16,a,x,8)) : \
121 (FbDoTypeRRop(b,CARD16,a,x,0), \
122 FbDoTypeRRop((b)+2,CARD8,a,x,16)))
124 #define BITSSTORE(b,x) ((unsigned long) (b) & 1 ? \
125 (FbDoTypeStore (b, CARD8, x, 16), \
126 FbDoTypeStore ((b) + 1, CARD16, x, 0)) : \
127 (FbDoTypeStore (b, CARD16, x, 8), \
128 FbDoTypeStore ((b) + 2, CARD8, x, 0)))
129 #define BITSRROP(b,a,x) ((unsigned long) (b) & 1 ? \
130 (FbDoTypeRRop (b, CARD8, a, x, 16), \
131 FbDoTypeRRop ((b) + 1, CARD16, a, x, 0)) : \
132 (FbDoTypeRRop (b, CARD16, a, x, 8), \
133 FbDoTypeRRop ((b) + 2, CARD8, a, x, 0)))
150 #endif /* FB_24BIT */
152 #define BRESSOLID fbBresSolid32
153 #define BRESDASH fbBresDash32
154 #define DOTS fbDots32
156 #define GLYPH fbGlyph32
157 #define POLYLINE fbPolyline32
158 #define POLYSEGMENT fbPolySegment32