1
/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */
2
/***********************************************************
4
Copyright (c) 1987 X Consortium
6
Permission is hereby granted, free of charge, to any person obtaining a copy
7
of this software and associated documentation files (the "Software"), to deal
8
in the Software without restriction, including without limitation the rights
9
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
copies of the Software, and to permit persons to whom the Software is
11
furnished to do so, subject to the following conditions:
13
The above copyright notice and this permission notice shall be included in
14
all copies or substantial portions of the Software.
16
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
Except as contained in this notice, the name of the X Consortium shall not be
24
used in advertising or otherwise to promote the sale, use or other dealings
25
in this Software without prior written authorization from the X Consortium.
28
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
32
Permission to use, copy, modify, and distribute this software and its
33
documentation for any purpose and without fee is hereby granted,
34
provided that the above copyright notice appear in all copies and that
35
both that copyright notice and this permission notice appear in
36
supporting documentation, and that the name of Digital not be
37
used in advertising or publicity pertaining to distribution of the
38
software without specific, written prior permission.
40
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
41
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
42
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
43
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
44
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
45
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
48
******************************************************************/
49
/* Monochrome Frame Buffer definitions
50
written by drewry, september 1986
57
#include "regionstr.h"
61
extern int afbInverseAlu[];
62
extern int afbScreenPrivateIndex;
63
/* warning: PixelType definition duplicated in maskbits.h */
65
#define PixelType CARD32
66
#endif /* PixelType */
68
#define AFB_MAX_DEPTH 8
72
extern void afbDoBitblt(
76
RegionPtr /*prgnDst*/,
77
DDXPointPtr /*pptSrc*/,
78
unsigned long /*planemask*/
81
extern RegionPtr afbBitBlt(
95
RegionPtr /*prgnDst*/,
96
DDXPointPtr /*pptSrc*/,
97
unsigned long /*planemask*/
99
unsigned long /*planemask*/
102
extern RegionPtr afbCopyArea(
103
DrawablePtr /*pSrcDrawable*/,
104
DrawablePtr /*pDstDrawable*/,
114
extern RegionPtr afbCopyPlane(
115
DrawablePtr /*pSrcDrawable*/,
116
DrawablePtr /*pDstDrawable*/,
124
unsigned long /*plane*/
127
extern void afbCopy1ToN(
128
DrawablePtr /*pSrc*/,
129
DrawablePtr /*pDst*/,
131
RegionPtr /*prgnDst*/,
132
DDXPointPtr /*pptSrc*/,
133
unsigned long /*planemask*/
137
extern void afbDoBitbltCopy(
138
DrawablePtr /*pSrc*/,
139
DrawablePtr /*pDst*/,
141
RegionPtr /*prgnDst*/,
142
DDXPointPtr /*pptSrc*/,
143
unsigned long /*planemask*/
147
extern void afbDoBitbltCopyInverted(
148
DrawablePtr /*pSrc*/,
149
DrawablePtr /*pDst*/,
151
RegionPtr /*prgnDst*/,
152
DDXPointPtr /*pptSrc*/,
153
unsigned long /*planemask*/
157
extern void afbDoBitbltGeneral(
158
DrawablePtr /*pSrc*/,
159
DrawablePtr /*pDst*/,
161
RegionPtr /*prgnDst*/,
162
DDXPointPtr /*pptSrc*/,
163
unsigned long /*planemask*/
167
extern void afbDoBitbltOr(
168
DrawablePtr /*pSrc*/,
169
DrawablePtr /*pDst*/,
171
RegionPtr /*prgnDst*/,
172
DDXPointPtr /*pptSrc*/,
173
unsigned long /*planemask*/
177
extern void afbDoBitbltXor(
178
DrawablePtr /*pSrc*/,
179
DrawablePtr /*pDst*/,
181
RegionPtr /*prgnDst*/,
182
DDXPointPtr /*pptSrc*/,
183
unsigned long /*planemask*/
187
extern void afbBresS(
188
PixelType * /*addrl*/,
201
unsigned char * /*rrops*/
205
extern void afbBresD(
206
int * /*pdashIndex*/,
207
unsigned char * /*pDash*/,
208
int /*numInDashList*/,
209
int * /*pdashOffset*/,
210
int /*isDoubleDash*/,
211
PixelType * /*addrl*/,
224
unsigned char * /*rrops*/,
225
unsigned char * /*bgrrops*/
229
extern void afbSaveAreas(
230
PixmapPtr /*pPixmap*/,
231
RegionPtr /*prgnSave*/,
237
extern void afbRestoreAreas(
238
PixmapPtr /*pPixmap*/,
239
RegionPtr /*prgnRestore*/,
246
extern RegionPtr afbPixmapToRegion(
252
extern int afbListInstalledColormaps(
253
ScreenPtr /*pScreen*/,
257
extern void afbInstallColormap(
261
extern void afbUninstallColormap(
265
extern void afbResolveColor(
266
unsigned short * /*pred*/,
267
unsigned short * /*pgreen*/,
268
unsigned short * /*pblue*/,
269
VisualPtr /*pVisual*/
272
extern Bool afbInitializeColormap(
276
extern int afbExpandDirectColors(
277
ColormapPtr /*pmap*/,
279
xColorItem * /*indefs*/,
280
xColorItem * /*outdefs*/
283
extern Bool afbCreateDefColormap(
284
ScreenPtr /*pScreen*/
287
extern Bool afbSetVisualTypes(
293
extern Bool afbInitVisuals(
294
VisualPtr * /*visualp*/,
295
DepthPtr * /*depthp*/,
298
int * /*rootDepthp*/,
299
VisualID * /*defaultVisp*/,
300
unsigned long /*sizes*/,
306
extern void afbPolyFillArcSolid(
307
DrawablePtr /*pDraw*/,
314
extern void afbPolyFillRect(
315
DrawablePtr /*pDrawable*/,
318
xRectangle * /*prectInit*/
322
extern void afbFillPolygonSolid(
323
DrawablePtr /*pDrawable*/,
328
DDXPointPtr /*ptsIn*/
333
extern void afbSolidFS(
334
DrawablePtr /*pDrawable*/,
337
DDXPointPtr /*pptInit*/,
338
int * /*pwidthInit*/,
342
extern void afbStippleFS(
343
DrawablePtr /*pDrawable*/,
346
DDXPointPtr /*pptInit*/,
347
int * /*pwidthInit*/,
351
extern void afbTileFS(
352
DrawablePtr /*pDrawable*/,
355
DDXPointPtr /*pptInit*/,
356
int * /*pwidthInit*/,
360
extern void afbUnnaturalTileFS(
361
DrawablePtr /*pDrawable*/,
364
DDXPointPtr /*pptInit*/,
365
int * /*pwidthInit*/,
369
extern void afbUnnaturalStippleFS(
370
DrawablePtr /*pDrawable*/,
373
DDXPointPtr /*pptInit*/,
374
int * /*pwidthInit*/,
378
extern void afbOpaqueStippleFS(
379
DrawablePtr /*pDrawable*/,
382
DDXPointPtr /*pptInit*/,
383
int * /*pwidthInit*/,
387
extern void afbUnnaturalOpaqueStippleFS(
388
DrawablePtr /*pDrawable*/,
391
DDXPointPtr /*pptInit*/,
392
int * /*pwidthInit*/,
398
extern Bool afbRealizeFont(
403
extern Bool afbUnrealizeFont(
409
extern Bool afbCreateGC(
413
extern void afbValidateGC(
415
unsigned long /*changes*/,
416
DrawablePtr /*pDrawable*/
419
extern void afbDestroyGC(
423
extern void afbReduceRop(
426
unsigned long /*planemask*/,
428
unsigned char * /*rrops*/
431
extern void afbReduceOpaqueStipple (
434
unsigned long /*planemask*/,
436
unsigned char * /*rrops*/
439
extern void afbComputeCompositeClip(
441
DrawablePtr /*pDrawable*/
446
extern void afbGetSpans(
447
DrawablePtr /*pDrawable*/,
456
extern void afbHorzS(
457
PixelType * /*addrl*/,
464
unsigned char * /*rrops*/
467
extern void afbVertS(
468
PixelType * /*addrl*/,
475
unsigned char * /*rrops*/
479
extern void afbImageGlyphBlt (
480
DrawablePtr /*pDrawable*/,
484
unsigned int /*nglyph*/,
485
CharInfoPtr * /*ppci*/,
486
pointer /*pglyphBase*/
492
extern void afbPutImage(
505
extern void afbGetImage(
506
DrawablePtr /*pDrawable*/,
511
unsigned int /*format*/,
512
unsigned long /*planeMask*/,
517
extern void afbLineSS(
518
DrawablePtr /*pDrawable*/,
522
DDXPointPtr /*pptInit*/
525
extern void afbLineSD(
526
DrawablePtr /*pDrawable*/,
530
DDXPointPtr /*pptInit*/
535
extern void afbQueryBestSize(
537
unsigned short * /*pwidth*/,
538
unsigned short * /*pheight*/,
539
ScreenPtr /*pScreen*/
543
extern void afbSolidFillArea(
544
DrawablePtr /*pDraw*/,
547
unsigned char * /*rrops*/
550
extern void afbStippleAreaPPW(
551
DrawablePtr /*pDraw*/,
554
PixmapPtr /*pstipple*/,
555
unsigned char * /*rrops*/
557
extern void afbStippleArea(
558
DrawablePtr /*pDraw*/,
561
PixmapPtr /*pstipple*/,
564
unsigned char * /*rrops*/
568
extern void afbPolyGlyphBlt(
569
DrawablePtr /*pDrawable*/,
573
unsigned int /*nglyph*/,
574
CharInfoPtr * /*ppci*/,
575
pointer /*pglyphBase*/
580
extern PixmapPtr afbCreatePixmap(
581
ScreenPtr /*pScreen*/,
587
extern Bool afbDestroyPixmap(
588
PixmapPtr /*pPixmap*/
591
extern PixmapPtr afbCopyPixmap(
595
extern void afbPadPixmap(
596
PixmapPtr /*pPixmap*/
599
extern void afbXRotatePixmap(
604
extern void afbYRotatePixmap(
609
extern void afbCopyRotatePixmap(
610
PixmapPtr /*psrcPix*/,
611
PixmapPtr * /*ppdstPix*/,
615
extern void afbPaintWindow(
617
RegionPtr /*pRegion*/,
622
extern void afbPolyPoint(
623
DrawablePtr /*pDrawable*/,
631
extern void afbPushPixels(
633
PixmapPtr /*pBitMap*/,
634
DrawablePtr /*pDrawable*/,
642
extern Bool afbCloseScreen(
644
ScreenPtr /*pScreen*/
648
extern Bool afbAllocatePrivates(
649
ScreenPtr /*pScreen*/,
654
extern Bool afbScreenInit(
655
ScreenPtr /*pScreen*/,
664
extern PixmapPtr afbGetWindowPixmap(
668
extern void afbSetWindowPixmap(
675
extern void afbSegmentSS(
676
DrawablePtr /*pDrawable*/,
682
extern void afbSegmentSD(
683
DrawablePtr /*pDrawable*/,
690
extern void afbSetScanline(
695
PixelType * /*psrc*/,
697
PixelType * /*pdstBase*/,
704
extern void afbSetSpans(
705
DrawablePtr /*pDrawable*/,
715
extern void afbTEGlyphBlt(
716
DrawablePtr /*pDrawable*/,
720
unsigned int /*nglyph*/,
721
CharInfoPtr * /*ppci*/,
722
pointer /*pglyphBase*/
726
extern void afbTileAreaPPWCopy(
727
DrawablePtr /*pDraw*/,
732
unsigned long /*planemask*/
736
extern void afbTileAreaPPWGeneral(
737
DrawablePtr /*pDraw*/,
742
unsigned long /*planemask*/
745
extern void afbTileAreaCopy(
746
DrawablePtr /*pDraw*/,
753
unsigned long /*planemask*/
757
extern void afbTileAreaGeneral(
758
DrawablePtr /*pDraw*/,
765
unsigned long /*planemask*/
768
extern void afbOpaqueStippleAreaPPWCopy(
769
DrawablePtr /*pDraw*/,
774
unsigned char */*rropsOS*/,
775
unsigned long /*planemask*/
779
extern void afbOpaqueStippleAreaPPWGeneral(
780
DrawablePtr /*pDraw*/,
785
unsigned char */*rropsOS*/,
786
unsigned long /*planemask*/
789
extern void afbOpaqueStippleAreaCopy(
790
DrawablePtr /*pDraw*/,
797
unsigned char */*rropsOS*/,
798
unsigned long /*planemask*/
802
extern void afbOpaqueStippleAreaGeneral(
803
DrawablePtr /*pDraw*/,
810
unsigned char */*rropsOS*/,
811
unsigned long /*planemask*/
816
extern Bool afbCreateWindow(
820
extern Bool afbDestroyWindow(
824
extern Bool afbMapWindow(
825
WindowPtr /*pWindow*/
828
extern Bool afbPositionWindow(
834
extern Bool afbUnmapWindow(
835
WindowPtr /*pWindow*/
838
extern void afbCopyWindow(
840
DDXPointRec /*ptOldOrg*/,
841
RegionPtr /*prgnSrc*/
844
extern Bool afbChangeWindowAttributes(
846
unsigned long /*mask*/
850
extern void afbZeroPolyArcSS(
851
DrawablePtr /*pDraw*/,
858
private field of pixmap
859
pixmap.devPrivate = (PixelType *)pointer_to_bits
860
pixmap.devKind = width_of_pixmap_in_bytes
862
private field of screen
863
a pixmap, for which we allocate storage. devPrivate is a pointer to
864
the bits in the hardware framebuffer. note that devKind can be poked to
865
make the code work for framebuffers that are wider than their
866
displayable screen (e.g. the early vsII, which displayed 960 pixels
867
across, but was 1024 in the hardware.)
873
unsigned char rrops[AFB_MAX_DEPTH]; /* reduction of rasterop to 1 of 3 */
874
unsigned char rropOS[AFB_MAX_DEPTH]; /* rop for opaque stipple */
876
typedef afbPrivGC *afbPrivGCPtr;
878
extern int afbGCPrivateIndex; /* index into GC private array */
879
extern int afbWindowPrivateIndex; /* index into Window private array */
880
#ifdef PIXMAP_PER_WINDOW
881
extern int frameWindowPrivateIndex; /* index into Window private array */
884
#define afbGetGCPrivate(pGC) \
885
((afbPrivGC *)((pGC)->devPrivates[afbGCPrivateIndex].ptr))
887
/* private field of window */
889
unsigned char fastBorder; /* non-zero if border tile is 32 bits wide */
890
unsigned char fastBackground;
891
unsigned short unused; /* pad for alignment with Sun compiler */
892
DDXPointRec oldRotate;
893
PixmapPtr pRotatedBackground;
894
PixmapPtr pRotatedBorder;
897
/* Common macros for extracting drawing information */
899
#define afbGetTypedWidth(pDrawable,wtype)( \
900
(((pDrawable)->type == DRAWABLE_WINDOW) ? \
901
(int)(((PixmapPtr)((pDrawable)->pScreen->devPrivates[afbScreenPrivateIndex].ptr))->devKind) : \
902
(int)(((PixmapPtr)pDrawable)->devKind)) / sizeof (wtype))
904
#define afbGetByteWidth(pDrawable) afbGetTypedWidth(pDrawable, unsigned char)
906
#define afbGetPixelWidth(pDrawable) afbGetTypedWidth(pDrawable, PixelType)
908
#define afbGetTypedWidthAndPointer(pDrawable, width, pointer, wtype, ptype) {\
910
if ((pDrawable)->type == DRAWABLE_WINDOW) \
911
_pPix = (PixmapPtr)(pDrawable)->pScreen->devPrivates[afbScreenPrivateIndex].ptr; \
913
_pPix = (PixmapPtr)(pDrawable); \
914
(pointer) = (ptype *) _pPix->devPrivate.ptr; \
915
(width) = ((int) _pPix->devKind) / sizeof (wtype); \
918
#define afbGetPixelWidthSizeDepthAndPointer(pDrawable, width, size, dep, pointer) {\
920
if ((pDrawable)->type == DRAWABLE_WINDOW) \
921
_pPix = (PixmapPtr)(pDrawable)->pScreen->devPrivates[afbScreenPrivateIndex].ptr; \
923
_pPix = (PixmapPtr)(pDrawable); \
924
(pointer) = (PixelType *)_pPix->devPrivate.ptr; \
925
(width) = ((int)_pPix->devKind) / sizeof (PixelType); \
926
(size) = (width) * _pPix->drawable.height; \
927
(dep) = _pPix->drawable.depth; (void)(dep); \
930
#define afbGetByteWidthAndPointer(pDrawable, width, pointer) \
931
afbGetTypedWidthAndPointer(pDrawable, width, pointer, unsigned char, unsigned char)
933
#define afbGetPixelWidthAndPointer(pDrawable, width, pointer) \
934
afbGetTypedWidthAndPointer(pDrawable, width, pointer, PixelType, PixelType)
936
#define afbGetWindowTypedWidthAndPointer(pWin, width, pointer, wtype, ptype) {\
937
PixmapPtr _pPix = (PixmapPtr)(pWin)->drawable.pScreen->devPrivates[afbScreenPrivateIndex].ptr; \
938
(pointer) = (ptype *) _pPix->devPrivate.ptr; \
939
(width) = ((int) _pPix->devKind) / sizeof (wtype); \
942
#define afbGetWindowPixelWidthAndPointer(pWin, width, pointer) \
943
afbGetWindowTypedWidthAndPointer(pWin, width, pointer, PixelType, PixelType)
945
#define afbGetWindowByteWidthAndPointer(pWin, width, pointer) \
946
afbGetWindowTypedWidthAndPointer(pWin, width, pointer, char, char)
948
/* afb uses the following macros to calculate addresses in drawables.
949
* To support banked framebuffers, the macros come in four flavors.
950
* All four collapse into the same definition on unbanked devices.
952
* afbScanlineFoo - calculate address and do bank switching
953
* afbScanlineFooNoBankSwitch - calculate address, don't bank switch
954
* afbScanlineFooSrc - calculate address, switch source bank
955
* afbScanlineFooDst - calculate address, switch destination bank
958
/* The NoBankSwitch versions are the same for banked and unbanked cases */
960
#define afbScanlineIncNoBankSwitch(_ptr, _off) _ptr += (_off)
961
#define afbScanlineOffsetNoBankSwitch(_ptr, _off) ((_ptr) + (_off))
962
#define afbScanlineDeltaNoBankSwitch(_ptr, _y, _w) \
963
afbScanlineOffsetNoBankSwitch(_ptr, (_y) * (_w))
964
#define afbScanlineNoBankSwitch(_ptr, _x, _y, _w) \
965
afbScanlineOffsetNoBankSwitch(_ptr, (_y) * (_w) + ((_x) >> MFB_PWSH))
969
#include "afblinebank.h" /* get macro definitions from this file */
971
#else /* !MFB_LINE_BANK - unbanked case */
973
#define afbScanlineInc(_ptr, _off) afbScanlineIncNoBankSwitch(_ptr, _off)
974
#define afbScanlineIncSrc(_ptr, _off) afbScanlineInc(_ptr, _off)
975
#define afbScanlineIncDst(_ptr, _off) afbScanlineInc(_ptr, _off)
977
#define afbScanlineOffset(_ptr, _off) afbScanlineOffsetNoBankSwitch(_ptr, _off)
978
#define afbScanlineOffsetSrc(_ptr, _off) afbScanlineOffset(_ptr, _off)
979
#define afbScanlineOffsetDst(_ptr, _off) afbScanlineOffset(_ptr, _off)
981
#define afbScanlineSrc(_ptr, _x, _y, _w) afbScanline(_ptr, _x, _y, _w)
982
#define afbScanlineDst(_ptr, _x, _y, _w) afbScanline(_ptr, _x, _y, _w)
984
#define afbScanlineDeltaSrc(_ptr, _y, _w) afbScanlineDelta(_ptr, _y, _w)
985
#define afbScanlineDeltaDst(_ptr, _y, _w) afbScanlineDelta(_ptr, _y, _w)
987
#endif /* MFB_LINE_BANK */
989
#define afbScanlineDelta(_ptr, _y, _w) \
990
afbScanlineOffset(_ptr, (_y) * (_w))
992
#define afbScanline(_ptr, _x, _y, _w) \
993
afbScanlineOffset(_ptr, (_y) * (_w) + ((_x) >> MFB_PWSH))
995
/* precomputed information about each glyph for GlyphBlt code.
996
this saves recalculating the per glyph information for each box.
999
typedef struct _afbpos{
1000
int xpos; /* xposition of glyph's origin */
1001
int xchar; /* x position mod 32 */
1006
PixelType *pdstBase; /* longword with character origin */
1007
int widthGlyph; /* width in bytes of this glyph */
1010
/* reduced raster ops for afb */
1011
#define RROP_BLACK GXclear
1012
#define RROP_WHITE GXset
1013
#define RROP_NOP GXnoop
1014
#define RROP_INVERT GXinvert
1015
#define RROP_COPY GXcopy
1017
/* macros for afbbitblt.c, afbfillsp.c
1018
these let the code do one switch on the rop per call, rather
1019
than a switch on the rop per item (span or rectangle.)
1022
#define fnCLEAR(src, dst) (0)
1023
#define fnAND(src, dst) (src & dst)
1024
#define fnANDREVERSE(src, dst) (src & ~dst)
1025
#define fnCOPY(src, dst) (src)
1026
#define fnANDINVERTED(src, dst) (~src & dst)
1027
#define fnNOOP(src, dst) (dst)
1028
#define fnXOR(src, dst) (src ^ dst)
1029
#define fnOR(src, dst) (src | dst)
1030
#define fnNOR(src, dst) (~(src | dst))
1031
#define fnEQUIV(src, dst) (~src ^ dst)
1032
#define fnINVERT(src, dst) (~dst)
1033
#define fnORREVERSE(src, dst) (src | ~dst)
1034
#define fnCOPYINVERTED(src, dst) (~src)
1035
#define fnORINVERTED(src, dst) (~src | dst)
1036
#define fnNAND(src, dst) (~(src & dst))
1038
#define fnSET(src, dst) (~0)
1040
/* Using a "switch" statement is much faster in most cases
1041
* since the compiler can do a look-up table or multi-way branch
1042
* instruction, depending on the architecture. The result on
1043
* A Sun 3/50 is at least 2.5 times faster, assuming a uniform
1044
* distribution of RasterOp operation types.
1046
* However, doing some profiling on a running system reveals
1047
* GXcopy is the operation over 99.5% of the time and
1048
* GXxor is the next most frequent (about .4%), so we make special
1049
* checks for those first.
1051
* Note that this requires a change to the "calling sequence"
1052
* since we can't engineer a "switch" statement to have an lvalue.
1055
#define DoRop(result, alu, src, dst) \
1057
if (alu == GXcopy) \
1058
result = fnCOPY (src, dst); \
1059
else if (alu == GXxor) \
1060
result = fnXOR (src, dst); \
1064
result = fnCLEAR (src, dst); \
1067
result = fnAND (src, dst); \
1069
case GXandReverse: \
1070
result = fnANDREVERSE (src, dst); \
1072
case GXandInverted: \
1073
result = fnANDINVERTED (src, dst); \
1077
result = fnNOOP (src, dst); \
1080
result = fnOR (src, dst); \
1083
result = fnNOR (src, dst); \
1086
result = fnEQUIV (src, dst); \
1089
result = fnINVERT (src, dst); \
1092
result = fnORREVERSE (src, dst); \
1094
case GXcopyInverted: \
1095
result = fnCOPYINVERTED (src, dst); \
1097
case GXorInverted: \
1098
result = fnORINVERTED (src, dst); \
1101
result = fnNAND (src, dst); \
1104
result = fnSET (src, dst); \
1110
/* C expression fragments for various operations. These get passed in
1111
* as -D's on the compile command line. See afb/Imakefile. This
1114
* This seems like a good place to point out that afb's use of the
1115
* words black and white is an unfortunate misnomer. In afb code, black
1116
* means zero, and white means one.
1118
#define MFB_OPEQ_WHITE |=
1119
#define MFB_OPEQ_BLACK &=~
1120
#define MFB_OPEQ_INVERT ^=
1121
#define MFB_EQWHOLEWORD_WHITE =~0
1122
#define MFB_EQWHOLEWORD_BLACK =0
1123
#define MFB_EQWHOLEWORD_INVERT ^=~0
1124
#define MFB_OP_WHITE /* nothing */
1125
#define MFB_OP_BLACK ~