1 | /* $XFree86: xc/programs/Xserver/iplan2p4/iplrrop.h,v 3.0 1996/08/18 01:55:04 dawes Exp $ */
|
---|
2 | /* Modified nov 94 by Martin Schaller ([email protected]) for use with
|
---|
3 | interleaved planes */
|
---|
4 |
|
---|
5 | /* reduced raster ops */
|
---|
6 | /* INTER_RROP_DECLARE INTER_RROP_FETCH_GC,
|
---|
7 | INTER_RROP_SOLID_MASK, INTER_RROP_SPAN INTER_RROP_NAME */
|
---|
8 |
|
---|
9 | #define INTER_RROP_FETCH_GC(gc) \
|
---|
10 | INTER_RROP_FETCH_GCPRIV(((iplPrivGCPtr)(gc)->devPrivates[iplGCPrivateIndex].ptr))
|
---|
11 |
|
---|
12 | #ifdef HAVE_DIX_CONFIG_H
|
---|
13 | #include <dix-config.h>
|
---|
14 | #endif
|
---|
15 |
|
---|
16 | #if RROP == GXcopy
|
---|
17 | #define INTER_RROP_DECLARE register unsigned short *rrop_xor;
|
---|
18 | #define INTER_RROP_FETCH_GCPRIV(devPriv) rrop_xor = (devPriv)->xorg;
|
---|
19 | #define INTER_RROP_SOLID(dst) INTER_COPY(rrop_xor, dst)
|
---|
20 | #define INTER_RROP_SOLID_MASK(dst,mask) INTER_COPYM(rrop_xor, dst, mask, dst)
|
---|
21 | #define INTER_RROP_NAME(prefix) INTER_RROP_NAME_CAT(prefix,Copy)
|
---|
22 | #endif /* GXcopy */
|
---|
23 |
|
---|
24 | #if RROP == GXxor
|
---|
25 | #define INTER_RROP_DECLARE register unsigned short *rrop_xor;
|
---|
26 | #define INTER_RROP_FETCH_GCPRIV(devPriv) rrop_xor = (devPriv)->xorg;
|
---|
27 | #define INTER_RROP_SOLID(dst) INTER_XOR(rrop_xor, dst, dst)
|
---|
28 | #define INTER_RROP_SOLID_MASK(dst,mask) INTER_XORM(rrop_xor, dst, mask, dst)
|
---|
29 | #define INTER_RROP_NAME(prefix) INTER_RROP_NAME_CAT(prefix,Xor)
|
---|
30 | #endif /* GXxor */
|
---|
31 |
|
---|
32 | #if RROP == GXand
|
---|
33 | #define INTER_RROP_DECLARE register unsigned short *rrop_and;
|
---|
34 | #define INTER_RROP_FETCH_GCPRIV(devPriv) rrop_and = (devPriv)->andg;
|
---|
35 | #define INTER_RROP_SOLID(dst) INTER_AND(rrop_and, dst, dst)
|
---|
36 | #define INTER_RROP_SOLID_MASK(dst,mask) INTER_ANDM(rrop_and, dst, mask, dst)
|
---|
37 | #define INTER_RROP_NAME(prefix) INTER_RROP_NAME_CAT(prefix,And)
|
---|
38 | #endif /* GXand */
|
---|
39 |
|
---|
40 | #if RROP == GXor
|
---|
41 | #define INTER_RROP_DECLARE register unsigned short *rrop_or;
|
---|
42 | #define INTER_RROP_FETCH_GCPRIV(devPriv) rrop_or = (devPriv)->xorg;
|
---|
43 | #define INTER_RROP_SOLID(dst) INTER_OR(rrop_or, dst, dst)
|
---|
44 | #define INTER_RROP_SOLID_MASK(dst,mask) INTER_ORM(mask, rrop_or, dst, dst)
|
---|
45 | #define INTER_RROP_NAME(prefix) INTER_RROP_NAME_CAT(prefix,Or)
|
---|
46 | #endif /* GXor */
|
---|
47 |
|
---|
48 | #if RROP == GXnoop
|
---|
49 | #define INTER_RROP_DECLARE
|
---|
50 | #define INTER_RROP_FETCH_GCPRIV(devPriv)
|
---|
51 | #define INTER_RROP_SOLID(dst)
|
---|
52 | #define INTER_RROP_SOLID_MASK(dst,mask)
|
---|
53 | #define INTER_RROP_NAME(prefix) INTER_RROP_NAME_CAT(prefix,Noop)
|
---|
54 | #endif /* GXnoop */
|
---|
55 |
|
---|
56 | #if RROP == GXset
|
---|
57 | #define INTER_RROP_DECLARE register unsigned short *rrop_and, *rrop_xor;
|
---|
58 | #define INTER_RROP_FETCH_GCPRIV(devPriv) rrop_and = (devPriv)->andg; \
|
---|
59 | rrop_xor = (devPriv)->xorg;
|
---|
60 | #define INTER_RROP_SOLID(dst) INTER_DoRRop(dst, rrop_and, rrop_xor, dst)
|
---|
61 | #define INTER_RROP_SOLID_MASK(dst,mask) \
|
---|
62 | INTER_DoMaskRRop(dst, rrop_and, rrop_xor, mask, dst)
|
---|
63 | #define INTER_RROP_NAME(prefix) INTER_RROP_NAME_CAT(prefix,General)
|
---|
64 | #endif /* GXset */
|
---|
65 |
|
---|
66 | #ifndef INTER_RROP_SPAN
|
---|
67 | #define INTER_RROP_SPAN(pdst,nmiddle) \
|
---|
68 | while (--(nmiddle) >= 0) { \
|
---|
69 | INTER_RROP_SOLID(pdst); \
|
---|
70 | (pdst) = INTER_NEXT(pdst); \
|
---|
71 | }
|
---|
72 |
|
---|
73 | #endif
|
---|
74 |
|
---|
75 | #if !defined(UNIXCPP) || defined(ANSICPP)
|
---|
76 | #define INTER_RROP_NAME_CAT(prefix,suffix) prefix##suffix
|
---|
77 | #else
|
---|
78 | #define INTER_RROP_NAME_CAT(prefix,suffix) prefix/**/suffix
|
---|
79 | #endif
|
---|
80 |
|
---|