VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.0.1/iplmergerop.h@ 69348

Last change on this file since 69348 was 51223, checked in by vboxsync, 11 years ago

Additions/x11/x11include: added header files for X.Org Server 1.0 and 1.1.

  • Property svn:eol-style set to native
File size: 4.4 KB
Line 
1/* $XFree86: xc/programs/Xserver/iplan2p4/iplmergerop.h,v 3.0 1996/08/18 01:54:53 dawes Exp $ */
2#ifdef HAVE_DIX_CONFIG_H
3#include <dix-config.h>
4#endif
5
6#ifndef _IPLANMERGEROP_H_
7#define _IPLANMERGEROP_H_
8
9/* Modified nov 94 by Martin Schaller ([email protected]) for use with
10interleaved planes */
11
12/* defines:
13 INTER_MROP_NAME
14 INTER_MROP_DECLARE_REG()
15 INTER_MROP_INITIALIZE(alu, pm)
16 INTER_MROP_SOLID(src1, src2, dst)
17 INTER_MROP_MASK(src1, src2, mask, dst)
18 INTER_MROP_PREBUILD(src)
19 INTER_MROP_PREBUILT_DECLARE()
20 INTER_MROP_PREBUILT_SOLID(src,dst)
21 INTER_MROP_PREBUILT_MASK(src,dst,mask)
22*/
23
24#ifndef GXcopy
25#include <X11/X.h>
26#endif
27
28typedef struct _mergeRopBits {
29 unsigned long ca1, cx1, ca2, cx2;
30} mergeRopRec, *mergeRopPtr;
31
32extern mergeRopRec mergeRopBits[16];
33
34#define INTER_DeclareMergeRop() \
35 INTER_DECLAREGP(_ca1); \
36 INTER_DECLAREGP(_cx1); \
37 INTER_DECLAREGP(_ca2); \
38 INTER_DECLAREGP(_cx2);
39
40#define INTER_DeclarePrebuiltMergeRop() \
41 INTER_DECLAREGP(_cca); \
42 INTER_DECLAREGP(_ccx);
43
44#define INTER_InitializeMergeRop(alu,pm) { \
45 INTER_DECLAREGP(_pm); \
46 mergeRopPtr _bits; \
47 INTER_PFILL(pm, _pm); \
48 _bits = &mergeRopBits[alu]; \
49 INTER_ANDMSK(_pm, _bits->ca1, _ca1); \
50 INTER_ANDMSK(_pm, _bits->ca2, _ca2); \
51 INTER_ANDMSK(_pm, _bits->cx2, _cx2); \
52 INTER_NOT(_pm, _pm); \
53 INTER_ORMSK(_pm, _bits->cx1, _cx1); \
54}
55
56#define INTER_DoMergeRop(src1, src2, dst) \
57 INTER_CPLX(src1, src2, _ca1, _cx1, _ca2, _cx2, dst)
58
59#define INTER_DoMaskMergeRop(src1, src2, mask, dst) \
60 INTER_CPLXM(src1, src2, _ca1, _cx1, _ca2, _cx2, mask, dst)
61
62#define INTER_DoPrebuiltMergeRop(src, dst) \
63 INTER_DoRRop(src, _cca, _ccx, dst)
64
65#define INTER_DoMaskPrebuiltMergeRop(src, mask, dst) \
66 INTER_DoMaskRRop(src, _cca, _ccx, mask, dst)
67
68#define INTER_PrebuildMergeRop(src) \
69 INTER_DoRRop(src, _ca1, _cx1, _cca); \
70 INTER_DoRRop(src, _ca2, _cx2, _ccx);
71
72#ifndef MROP
73#define MROP 0
74#endif
75
76#define Mclear (1<<GXclear)
77#define Mand (1<<GXand)
78#define MandReverse (1<<GXandReverse)
79#define Mcopy (1<<GXcopy)
80#define MandInverted (1<<GXandInverted)
81#define Mnoop (1<<GXnoop)
82#define Mxor (1<<GXxor)
83#define Mor (1<<GXor)
84#define Mnor (1<<GXnor)
85#define Mequiv (1<<GXequiv)
86#define Minvert (1<<GXinvert)
87#define MorReverse (1<<GXorReverse)
88#define McopyInverted (1<<GXcopyInverted)
89#define MorInverted (1<<GXorInverted)
90#define Mnand (1<<GXnand)
91#define Mset (1<<GXset)
92
93#if (MROP) == Mcopy
94#define INTER_MROP_NAME(prefix) INTER_MROP_NAME_CAT(prefix,Copy)
95#define INTER_MROP_DECLARE_REG()
96#define INTER_MROP_INITIALIZE(alu,pm)
97#define INTER_MROP_SOLID(src,dst,dst2) INTER_COPY(src, dst2)
98#define INTER_MROP_MASK(src,dst,mask, dst2) INTER_COPYM(src,dst,mask,dst2)
99#endif
100
101#if (MROP) == Mxor
102#define INTER_MROP_NAME(prefix) INTER_MROP_NAME_CAT(prefix,Xor)
103#define INTER_MROP_DECLARE_REG()
104#define INTER_MROP_INITIALIZE(alu,pm)
105#define INTER_MROP_SOLID(src,dst,dst2) INTER_XOR(src,dst,dst2)
106#define INTER_MROP_MASK(src,dst,mask,dst2) INTER_XORM(src,dst,mask,dst2)
107#endif
108
109#if (MROP) == Mor
110#define INTER_MROP_NAME(prefix) INTER_MROP_NAME_CAT(prefix,Or)
111#define INTER_MROP_DECLARE_REG()
112#define INTER_MROP_INITIALIZE(alu,pm)
113#define INTER_MROP_SOLID(src,dst,dst2) INTER_OR(src,dst,dst2)
114#define INTER_MROP_MASK(src,dst,mask,dst2) INTER_ORM(src,dst,mask,dst2)
115#endif
116
117#if (MROP) == 0
118#define INTER_MROP_NAME(prefix) INTER_MROP_NAME_CAT(prefix,General)
119#define INTER_MROP_DECLARE_REG() INTER_DeclareMergeRop()
120#define INTER_MROP_INITIALIZE(alu,pm) INTER_InitializeMergeRop(alu,pm)
121#define INTER_MROP_SOLID(src,dst,dst2) INTER_DoMergeRop(src, dst, dst2)
122#define INTER_MROP_MASK(src,dst,mask,dst2) \
123 INTER_DoMaskMergeRop(src, dst, mask, dst2)
124#define INTER_MROP_PREBUILD(src) INTER_PrebuildMergeRop(src)
125#define INTER_MROP_PREBUILT_DECLARE() INTER_DeclarePrebuiltMergeRop()
126#define INTER_MROP_PREBUILT_SOLID(src,dst, dst2) \
127 INTER_DoPrebuiltMergeRop(dst,dst2)
128#define INTER_MROP_PREBUILT_MASK(src,dst,mask,dst2) \
129 INTER_DoMaskPrebuiltMergeRop(dst,mask, dst2)
130#endif
131
132#ifndef INTER_MROP_PREBUILD
133#define INTER_MROP_PREBUILD(src)
134#define INTER_MROP_PREBUILT_DECLARE()
135#define INTER_MROP_PREBUILT_SOLID(src,dst,dst2) INTER_MROP_SOLID(src,dst,dst2)
136#define INTER_MROP_PREBUILT_MASK(src,dst,mask,dst2) \
137 INTER_MROP_MASK(src,dst,mask,dst2)
138#endif
139
140#if !defined(UNIXCPP) || defined(ANSICPP)
141#define INTER_MROP_NAME_CAT(prefix,suffix) prefix##suffix
142#else
143#define INTER_MROP_NAME_CAT(prefix,suffix) prefix/**/suffix
144#endif
145
146#endif /* _IPLANMERGEROP_H_ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette