diff options
author | keith <empty> | 1991-12-19 18:36:15 +0000 |
---|---|---|
committer | keith <empty> | 1991-12-19 18:36:15 +0000 |
commit | a411cdd868cf5bda4a478b6360eb928ce586db03 (patch) | |
tree | 6bb2470b9609115bedeca8371509a547e9a1076f | |
parent | 6e245fae6c2c6abfca16be1d1dd0691cd27c1c89 (diff) |
use PSZ instead of PPW
-rw-r--r-- | xc/programs/Xserver/cfb/cfb8bit.c | 8 | ||||
-rw-r--r-- | xc/programs/Xserver/cfb/cfb8bit.h | 20 | ||||
-rw-r--r-- | xc/programs/Xserver/cfb/cfb8cppl.c | 6 | ||||
-rw-r--r-- | xc/programs/Xserver/cfb/cfballpriv.c | 4 | ||||
-rw-r--r-- | xc/programs/Xserver/cfb/cfbbitblt.c | 6 | ||||
-rw-r--r-- | xc/programs/Xserver/cfb/cfbblt.c | 6 | ||||
-rw-r--r-- | xc/programs/Xserver/cfb/cfbfillrct.c | 6 | ||||
-rw-r--r-- | xc/programs/Xserver/cfb/cfbfillsp.c | 10 | ||||
-rw-r--r-- | xc/programs/Xserver/cfb/cfbgc.c | 4 | ||||
-rw-r--r-- | xc/programs/Xserver/cfb/cfbgetsp.c | 2 | ||||
-rw-r--r-- | xc/programs/Xserver/cfb/cfbhrzvert.c | 8 | ||||
-rw-r--r-- | xc/programs/Xserver/cfb/cfbimage.c | 4 | ||||
-rw-r--r-- | xc/programs/Xserver/cfb/cfbmap.h | 6 | ||||
-rw-r--r-- | xc/programs/Xserver/cfb/cfbmskbits.c | 395 | ||||
-rw-r--r-- | xc/programs/Xserver/cfb/cfbpntwin.c | 4 | ||||
-rw-r--r-- | xc/programs/Xserver/cfb/cfbpush8.c | 6 | ||||
-rw-r--r-- | xc/programs/Xserver/cfb/cfbrctstp8.c | 7 | ||||
-rw-r--r-- | xc/programs/Xserver/cfb/cfbscrinit.c | 4 | ||||
-rw-r--r-- | xc/programs/Xserver/cfb/cfbsolid.c | 8 | ||||
-rw-r--r-- | xc/programs/Xserver/cfb/cfbteblt8.c | 8 |
20 files changed, 438 insertions, 84 deletions
diff --git a/xc/programs/Xserver/cfb/cfb8bit.c b/xc/programs/Xserver/cfb/cfb8bit.c index e2fc9912d..45b639af1 100644 --- a/xc/programs/Xserver/cfb/cfb8bit.c +++ b/xc/programs/Xserver/cfb/cfb8bit.c @@ -4,7 +4,9 @@ * 8 bit color frame buffer utility routines */ -/* $XConsortium: cfb8bit.c,v 1.5 91/01/27 13:02:56 keith Exp $ */ +/* $XConsortium: cfb8bit.c,v 1.6 91/12/19 14:15:28 keith Exp $ */ + +#if PSZ == 8 #include "X.h" #include "Xmd.h" @@ -18,8 +20,6 @@ #include "cfbmskbits.h" #include "cfb8bit.h" -#if (PPW == 4) - unsigned long cfb8StippleMasks[16] = { 0x00000000, 0x000000ff, 0x0000ff00, 0x0000ffff, 0x00ff0000, 0x00ff00ff, 0x00ffff00, 0x00ffffff, @@ -222,4 +222,4 @@ cfb8ComputeClipMasks32 (pBox, numRects, x, y, w, h, clips) return result; } -#endif /* PPW == 4 */ +#endif /* PSZ == 8 */ diff --git a/xc/programs/Xserver/cfb/cfb8bit.h b/xc/programs/Xserver/cfb/cfb8bit.h index 4fb0cab53..e5ac6adbd 100644 --- a/xc/programs/Xserver/cfb/cfb8bit.h +++ b/xc/programs/Xserver/cfb/cfb8bit.h @@ -18,7 +18,7 @@ representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ -/* $XConsortium: cfb8bit.h,v 1.11 91/07/11 17:58:48 keith Exp $ */ +/* $XConsortium: cfb8bit.h,v 1.12 91/12/19 14:15:30 keith Exp $ */ #include "servermd.h" @@ -42,7 +42,7 @@ purpose. It is provided "as is" without express or implied warranty. : "0" (x), "dI" (k)) #endif -#if (PPW == 4) +#if PSZ == 8 #define GetFourPixels(x) (cfb8StippleXor[GetFourBits(x)]) #define RRopPixels(dst,x) (DoRRop(dst,cfb8StippleAnd[x], cfb8StippleXor[x])) @@ -164,9 +164,9 @@ extern int cfb8SetStipple (), cfb8SetOpaqueStipple(); register int _bitsTmp = (bits); \ *(dst) = MaskRRopPixels(*(dst),bits,mask); \ } -#endif /* PPW == 4 */ +#endif /* PSZ == 8 */ -#if !defined(AVOID_MEMORY_READ) && PPW == 4 +#if !defined(AVOID_MEMORY_READ) && PSZ == 8 #define WriteFourBits(dst,pixel,bits) \ { \ @@ -208,7 +208,7 @@ extern int cfb8SetStipple (), cfb8SetOpaqueStipple(); #define Long2 2 #define Long3 3 -#if PPW == 4 +#if PSZ == 8 #define WriteFourBits(dst,pixel,bits) \ switch (bits) { \ @@ -329,9 +329,9 @@ extern int cfb8SetStipple (), cfb8SetOpaqueStipple(); break; \ } \ } -#endif /* PPW == 4 */ +#endif /* PSZ == 8 */ -#if PPW == 2 +#if PSZ == 16 #define WriteFourBits(dst,pixel,bits) \ switch (bits) { \ @@ -454,8 +454,8 @@ extern int cfb8SetStipple (), cfb8SetOpaqueStipple(); } \ } -#endif /* PPW == 2 */ -#if PPW == 1 +#endif /* PSZ == 16 */ +#if PSZ == 32 #define WriteFourBits(dst,pixel,bits) \ switch (bits) { \ @@ -594,7 +594,7 @@ extern int cfb8SetStipple (), cfb8SetOpaqueStipple(); } \ } -#endif /* PPW == 1 */ +#endif /* PSZ == 32 */ #endif /* AVOID_MEMORY_READ */ extern unsigned long cfb8BitLenMasks[32]; diff --git a/xc/programs/Xserver/cfb/cfb8cppl.c b/xc/programs/Xserver/cfb/cfb8cppl.c index 0d9ff5a6c..8c3e1023d 100644 --- a/xc/programs/Xserver/cfb/cfb8cppl.c +++ b/xc/programs/Xserver/cfb/cfb8cppl.c @@ -1,5 +1,5 @@ /* - * $XConsortium: cfb8cppl.c,v 1.5 91/08/22 15:41:05 keith Exp $ + * $XConsortium: cfb8cppl.c,v 1.6 91/12/19 14:15:32 keith Exp $ * * Copyright 1990 Massachusetts Institute of Technology * @@ -23,7 +23,7 @@ * Author: Keith Packard, MIT X Consortium */ -#if PPW == 4 +#if PSZ == 8 #include "X.h" #include "Xmd.h" #include "gcstruct.h" @@ -32,7 +32,7 @@ #include "scrnintstr.h" #include "windowstr.h" #include "cfb.h" -#undef PPW /* for maskbits.h */ +#undef PSZ /* for maskbits.h */ #include "maskbits.h" #include "mergerop.h" diff --git a/xc/programs/Xserver/cfb/cfballpriv.c b/xc/programs/Xserver/cfb/cfballpriv.c index 507cd1e1a..2a04a294d 100644 --- a/xc/programs/Xserver/cfb/cfballpriv.c +++ b/xc/programs/Xserver/cfb/cfballpriv.c @@ -1,5 +1,5 @@ /* - * $XConsortium$ + * $XConsortium: cfballpriv.c,v 1.1 91/12/19 14:15:38 keith Exp $ * * Copyright 1991 Massachusetts Institute of Technology * @@ -71,7 +71,7 @@ cfbAllocatePrivates(pScreen, window_index, gc_index) sizeof(cfbPrivWin)) || !AllocateGCPrivate(pScreen, cfbGCPrivateIndex, sizeof(cfbPrivGC))) return FALSE; -#if PPW != 4 +#if PSZ != 8 cfbPuntCopyPlane = miCopyPlane; #endif #ifdef CFB_NEED_SCREEN_PRIVATE diff --git a/xc/programs/Xserver/cfb/cfbbitblt.c b/xc/programs/Xserver/cfb/cfbbitblt.c index e30c4c452..e69bda050 100644 --- a/xc/programs/Xserver/cfb/cfbbitblt.c +++ b/xc/programs/Xserver/cfb/cfbbitblt.c @@ -18,7 +18,7 @@ purpose. It is provided "as is" without express or implied warranty. Author: Keith Packard */ -/* $XConsortium: cfbbitblt.c,v 5.43 91/07/19 23:20:45 keith Exp $ */ +/* $XConsortium: cfbbitblt.c,v 5.44 91/12/19 14:15:53 keith Exp $ */ #include "X.h" #include "Xmd.h" @@ -342,7 +342,7 @@ cfbCopyArea(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, width, height, dstx, dsty, doBitBlt, 0); } -#if (PPW == 4) +#if PSZ == 8 cfbCopyPlane1to8 (pSrcDrawable, pDstDrawable, rop, prgnDst, pptSrc, planemask, bitPlane) DrawablePtr pSrcDrawable; @@ -624,7 +624,7 @@ RegionPtr cfbCopyPlane(pSrcDrawable, pDstDrawable, extern RegionPtr miHandleExposures(); int (*doBitBlt)(); -#if (PPW == 4) +#if PSZ == 8 extern cfbCopyPlane8to1(); if (pSrcDrawable->bitsPerPixel == 1 && pDstDrawable->bitsPerPixel == 8) diff --git a/xc/programs/Xserver/cfb/cfbblt.c b/xc/programs/Xserver/cfb/cfbblt.c index 5b38c8b1c..1a72e136d 100644 --- a/xc/programs/Xserver/cfb/cfbblt.c +++ b/xc/programs/Xserver/cfb/cfbblt.c @@ -18,7 +18,7 @@ purpose. It is provided "as is" without express or implied warranty. Author: Keith Packard */ -/* $XConsortium: cfbblt.c,v 1.7 91/05/06 15:13:21 rws Exp $ */ +/* $XConsortium: cfbblt.c,v 1.8 91/12/11 21:57:39 eswu Exp $ */ #include "X.h" #include "Xmd.h" @@ -35,12 +35,12 @@ Author: Keith Packard #include "mergerop.h" #ifdef notdef /* XXX fails right now, walks off end of pixmaps */ -#if defined (FAST_UNALIGNED_READS) && (PPW == 4) +#if defined (FAST_UNALIGNED_READS) && PSZ == 8 #define DO_UNALIGNED_BITBLT #endif #endif -#if defined(FAST_MEMCPY) && (MROP == Mcopy) && (PPW == 4) +#if defined(FAST_MEMCPY) && (MROP == Mcopy) && PSZ == 8 #define DO_MEMCPY #endif diff --git a/xc/programs/Xserver/cfb/cfbfillrct.c b/xc/programs/Xserver/cfb/cfbfillrct.c index cefe5fcc4..645a60355 100644 --- a/xc/programs/Xserver/cfb/cfbfillrct.c +++ b/xc/programs/Xserver/cfb/cfbfillrct.c @@ -16,7 +16,7 @@ representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ -/* $XConsortium: cfbfillrct.c,v 5.12 90/03/29 18:29:18 keith Exp $ */ +/* $XConsortium: cfbfillrct.c,v 5.13 90/05/15 18:40:19 keith Exp $ */ #include "X.h" #include "Xmd.h" @@ -31,7 +31,7 @@ purpose. It is provided "as is" without express or implied warranty. #include "cfbmskbits.h" #include "mergerop.h" -#if PPW == 4 +#if PSZ == 8 extern void cfb8FillRectOpaqueStippled32(); extern void cfb8FillRectTransparentStippled32(); extern void cfb8FillRectStippledUnnatural(); @@ -146,7 +146,7 @@ cfbPolyFillRect(pDrawable, pGC, nrectFill, prectInit) BoxFill = cfbFillRectTile32General; } break; -#if (PPW == 4) +#if PSZ == 8 case FillStippled: if (!((cfbPrivGCPtr) pGC->devPrivates[cfbGCPrivateIndex].ptr)-> pRotatedPixmap) diff --git a/xc/programs/Xserver/cfb/cfbfillsp.c b/xc/programs/Xserver/cfb/cfbfillsp.c index ceee56763..fdddfaa7d 100644 --- a/xc/programs/Xserver/cfb/cfbfillsp.c +++ b/xc/programs/Xserver/cfb/cfbfillsp.c @@ -50,7 +50,7 @@ SOFTWARE. ******************************************************************/ -/* $XConsortium: cfbfillsp.c,v 5.17 91/07/18 23:31:04 keith Exp $ */ +/* $XConsortium: cfbfillsp.c,v 5.18 91/12/19 14:16:13 keith Exp $ */ #include "X.h" #include "Xmd.h" @@ -66,7 +66,7 @@ SOFTWARE. #include "mergerop.h" -#if PPW == 4 +#if PSZ == 8 #include "cfb8bit.h" #endif @@ -174,7 +174,7 @@ int fSorted; DEALLOCATE_LOCAL(pwidth); } -#if PPW == 4 +#if PSZ == 8 void cfbUnnaturalStippleFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) @@ -530,9 +530,9 @@ int fSorted; DEALLOCATE_LOCAL(pwidthFree); } -#endif /* PPW == 4 */ +#endif /* PSZ == 8 */ -#if PPW == 4 +#if PSZ == 8 void cfb8Stipple32FS (pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) diff --git a/xc/programs/Xserver/cfb/cfbgc.c b/xc/programs/Xserver/cfb/cfbgc.c index 492fbdb84..4fe64d106 100644 --- a/xc/programs/Xserver/cfb/cfbgc.c +++ b/xc/programs/Xserver/cfb/cfbgc.c @@ -22,7 +22,7 @@ SOFTWARE. ******************************************************************/ -/* $XConsortium: cfbgc.c,v 5.51 91/07/18 23:36:42 keith Exp $ */ +/* $XConsortium: cfbgc.c,v 5.53 91/12/19 14:16:21 keith Exp $ */ #include "X.h" #include "Xmd.h" @@ -45,7 +45,7 @@ SOFTWARE. void cfbValidateGC(), cfbChangeGC(), cfbCopyGC(), cfbDestroyGC(); void cfbChangeClip(), cfbDestroyClip(), cfbCopyClip(); -#if PPW == 4 +#if PSZ == 8 # define useTEGlyphBlt cfbTEGlyphBlt8 #else # ifdef WriteFourBits diff --git a/xc/programs/Xserver/cfb/cfbgetsp.c b/xc/programs/Xserver/cfb/cfbgetsp.c index d58cc1e5e..920c4ef25 100644 --- a/xc/programs/Xserver/cfb/cfbgetsp.c +++ b/xc/programs/Xserver/cfb/cfbgetsp.c @@ -78,7 +78,7 @@ cfbGetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart) cfbGetLongWidthAndPointer (pDrawable, widthSrc, psrcBase) -#if PPW == 4 +#if PSZ == 8 if ((nspans == 1) && (*pwidth == 1)) { tmpSrc = *((unsigned char *)(psrcBase + (ppt->y * (widthSrc >> 2))) diff --git a/xc/programs/Xserver/cfb/cfbhrzvert.c b/xc/programs/Xserver/cfb/cfbhrzvert.c index 141e900c9..5e2530eee 100644 --- a/xc/programs/Xserver/cfb/cfbhrzvert.c +++ b/xc/programs/Xserver/cfb/cfbhrzvert.c @@ -21,7 +21,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XConsortium: cfbhrzvert.c,v 1.4 89/11/19 18:41:52 rws Exp $ */ +/* $XConsortium: cfbhrzvert.c,v 1.5 90/01/31 12:31:37 keith Exp $ */ #include "X.h" #include "gc.h" @@ -108,10 +108,10 @@ register int nlwidth; /* width in longwords of bitmap */ int x1, y1; /* initial point */ register int len; /* length of line */ { -#if (PPW == 4) - register unsigned char *bits = (unsigned char *) addrl; +#ifdef PIXEL_ADDR + register PixelType *bits = (PixelType *) addrl; - nlwidth <<= 2; + nlwidth <<= PWSH; bits = bits + (y1 * nlwidth) + x1; /* diff --git a/xc/programs/Xserver/cfb/cfbimage.c b/xc/programs/Xserver/cfb/cfbimage.c index 15ebc1c7e..8aa8cfb50 100644 --- a/xc/programs/Xserver/cfb/cfbimage.c +++ b/xc/programs/Xserver/cfb/cfbimage.c @@ -21,7 +21,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XConsortium: cfbimage.c,v 1.7 91/07/18 23:36:48 keith Exp $ */ +/* $XConsortium: cfbimage.c,v 1.8 91/12/19 14:16:34 keith Exp $ */ #include "X.h" #include "windowstr.h" @@ -167,7 +167,7 @@ cfbGetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine) } else { -#if PPW == 4 +#if PSZ == 8 FakePixmap.drawable.type = DRAWABLE_PIXMAP; FakePixmap.drawable.class = 0; FakePixmap.drawable.pScreen = pDrawable->pScreen; diff --git a/xc/programs/Xserver/cfb/cfbmap.h b/xc/programs/Xserver/cfb/cfbmap.h index 2c1167329..1b08ba398 100644 --- a/xc/programs/Xserver/cfb/cfbmap.h +++ b/xc/programs/Xserver/cfb/cfbmap.h @@ -1,5 +1,5 @@ /* - * $XConsortium: cfbmap.h,v 1.1 91/12/19 14:16:37 keith Exp $ + * $XConsortium: cfbmap.h,v 1.2 91/12/19 14:41:46 keith Exp $ * * Copyright 1991 Massachusetts Institute of Technology * @@ -41,7 +41,7 @@ #endif #ifndef NAME -cfb can not hack PPW yet +cfb can not hack PSZ yet #endif #if __STDC__ && !defined(UNIXCPP) @@ -178,4 +178,4 @@ cfb can not hack PPW yet #define cfbZeroPolyArcSS8Xor NAME(ZeroPolyArcSSXor) #define cfbZeroPolyArcSS8General NAME(ZeroPolyArcSSGeneral) -#endif /* PPW != 4 */ +#endif /* PSZ != 8 */ diff --git a/xc/programs/Xserver/cfb/cfbmskbits.c b/xc/programs/Xserver/cfb/cfbmskbits.c index 20fd71069..ce80944f0 100644 --- a/xc/programs/Xserver/cfb/cfbmskbits.c +++ b/xc/programs/Xserver/cfb/cfbmskbits.c @@ -26,7 +26,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XConsortium: cfbmskbits.c,v 4.6 91/07/05 10:52:59 rws Exp $ */ +/* $XConsortium: cfbmskbits.c,v 4.7 91/12/19 14:17:00 keith Exp $ */ /* * ========================================================================== @@ -68,35 +68,60 @@ lets us deal with a full first word in the middle loop, rather than having to do the multiple reads and masks that we'd have to do if we thought it was partial. */ -#if PPW == 4 +#if PSZ == 4 unsigned int cfbstarttab[] = { cfbBits(0x00000000), + cfbBits(0x0FFFFFFF), cfbBits(0x00FFFFFF), + cfbBits(0x000FFFFF), cfbBits(0x0000FFFF), + cfbBits(0x00000FFF) cfbBits(0x000000FF) + cfbBits(0x0000000F) }; unsigned int cfbendtab[] = { cfbBits(0x00000000), + cfbBits(0xF0000000), cfbBits(0xFF000000), + cfbBits(0xFFF00000), cfbBits(0xFFFF0000), + cfbBits(0xFFFFF000), cfbBits(0xFFFFFF00) + cfbBits(0xFFFFFFF0) }; #endif -#if PPW == 2 + +#if PSZ == 8 unsigned int cfbstarttab[] = { cfbBits(0x00000000), + cfbBits(0x00FFFFFF), cfbBits(0x0000FFFF), + cfbBits(0x000000FF) }; unsigned int cfbendtab[] = { cfbBits(0x00000000), + cfbBits(0xFF000000), cfbBits(0xFFFF0000), + cfbBits(0xFFFFFF00) }; #endif -#if PPW == 1 +#if PSZ == 16 +unsigned int cfbstarttab[] = + { + cfbBits(0x00000000), + cfbBits(0x0000FFFF), + }; +unsigned int cfbendtab[] = + { + cfbBits(0x00000000), + cfbBits(0xFFFF0000), + }; +#endif +#if PSZ == 32 unsigned int cfbstarttab[] = { cfbBits(0x00000000), @@ -112,24 +137,49 @@ unsigned int cfbendtab[] = this means the code DOES NOT WORK for segments of length 0 (which is only a problem in the horizontal line code.) */ -#if PPW == 4 +#if PSZ == 4 unsigned int cfbstartpartial[] = { cfbBits(0xFFFFFFFF), + cfbBits(0x0FFFFFFF), cfbBits(0x00FFFFFF), + cfbBits(0x000FFFFF), cfbBits(0x0000FFFF), + cfbBits(0x00000FFF), cfbBits(0x000000FF) + cfbBits(0x0000000F) }; unsigned int cfbendpartial[] = { cfbBits(0xFFFFFFFF), + cfbBits(0xF0000000), cfbBits(0xFF000000), + cfbBits(0xFFF00000), cfbBits(0xFFFF0000), + cfbBits(0xFFFFF000), cfbBits(0xFFFFFF00) + cfbBits(0xFFFFFFF0) }; #endif -#if PPW == 2 +#if PSZ == 8 +unsigned int cfbstartpartial[] = + { + cfbBits(0xFFFFFFFF), + cfbBits(0x00FFFFFF), + cfbBits(0x0000FFFF), + cfbBits(0x000000FF) + }; + +unsigned int cfbendpartial[] = + { + cfbBits(0xFFFFFFFF), + cfbBits(0xFF000000), + cfbBits(0xFFFF0000), + cfbBits(0xFFFFFF00) + }; +#endif +#if PSZ == 16 unsigned int cfbstartpartial[] = { cfbBits(0xFFFFFFFF), @@ -142,7 +192,7 @@ unsigned int cfbendpartial[] = cfbBits(0xFFFF0000), }; #endif -#if PPW == 1 +#if PSZ == 32 unsigned int cfbstartpartial[] = { cfbBits(0xFFFFFFFF), @@ -161,7 +211,31 @@ screen position). is a screen posiotion.) */ -#if PPW == 4 +#if PSZ == 4 +unsigned int cfbmask[] = + { + cfbBits(0xF0000000), + cfbBits(0x0F000000), + cfbBits(0x00F00000), + cfbBits(0x000F0000), + cfbBits(0x0000F000), + cfbBits(0x00000F00), + cfbBits(0x000000F0), + cfbBits(0x0000000F) + }; +unsigned int cfbrmask[] = + { + cfbBits(0x0FFFFFFF), + cfbBits(0xF0FFFFFF), + cfbBits(0xFF0FFFFF), + cfbBits(0xFFF0FFFF), + cfbBits(0xFFFF0FFF), + cfbBits(0xFFFFF0FF), + cfbBits(0xFFFFFF0F), + cfbBits(0xFFFFFFF0) + }; +#endif +#if PSZ == 8 unsigned int cfbmask[] = { cfbBits(0xFF000000), @@ -177,7 +251,7 @@ unsigned int cfbrmask[] = cfbBits(0xFFFFFF00) }; #endif -#if PPW == 2 +#if PSZ == 16 unsigned int cfbmask[] = { cfbBits(0xFFFF0000), @@ -189,7 +263,7 @@ unsigned int cfbrmask[] = cfbBits(0xFFFF0000), }; #endif -#if PPW == 1 +#if PSZ == 32 unsigned int cfbmask[] = { cfbBits(0xFFFFFFFF), @@ -205,7 +279,32 @@ unsigned int cfbrmask[] = * low order quartet that contain the number of bits specified in the * index. This table is used by getstipplepixels. */ -#if PPW == 4 +#if PSZ == 4 +unsigned int QuartetBitsTable[] = { +#if (BITMAP_BIT_ORDER == MSBFirst) + 0x00000000, /* 0 - 00000000 */ + 0x00000080, /* 1 - 10000000 */ + 0x000000C0, /* 2 - 11000000 */ + 0x000000E0, /* 3 - 11100000 */ + 0x000000F0, /* 4 - 11110000 */ + 0x000000F8, /* 5 - 11111000 */ + 0x000000FC, /* 6 - 11111100 */ + 0x000000FE, /* 7 - 11111110 */ + 0x000000FF, /* 8 - 11111111 */ +#else /* (BITMAP_BIT_ORDER == LSBFirst */ + 0x00000000, /* 0 - 00000000 */ + 0x00000001, /* 1 - 00000001 */ + 0x00000003, /* 2 - 00000011 */ + 0x00000007, /* 3 - 00000111 */ + 0x0000000F /* 4 - 00001111 */ + 0x0000001F /* 5 - 00011111 */ + 0x0000003F /* 6 - 00111111 */ + 0x0000007F /* 7 - 01111111 */ + 0x000000FF /* 8 - 11111111 */ +#endif /* (BITMAP_BIT_ORDER == MSBFirst) */ +}; +#endif +#if PSZ == 8 unsigned int QuartetBitsTable[] = { #if (BITMAP_BIT_ORDER == MSBFirst) 0x00000000, /* 0 - 0000 */ @@ -222,7 +321,7 @@ unsigned int QuartetBitsTable[] = { #endif /* (BITMAP_BIT_ORDER == MSBFirst) */ }; #endif -#if PPW == 2 +#if PSZ == 16 unsigned int QuartetBitsTable[] = { #if (BITMAP_BIT_ORDER == MSBFirst) 0x00000000, /* 0 - 00 */ @@ -235,7 +334,7 @@ unsigned int QuartetBitsTable[] = { #endif /* (BITMAP_BIT_ORDER == MSBFirst) */ }; #endif -#if PPW == 1 +#if PSZ == 32 unsigned int QuartetBitsTable[] = { #if (BITMAP_BIT_ORDER == MSBFirst) 0x00000000, /* 0 - 0 */ @@ -252,7 +351,267 @@ unsigned int QuartetBitsTable[] = { * corresponding to a quartet of bits. Note: the bit/byte order dependency * is handled by QuartetBitsTable above. */ -#if PPW == 4 +#if PSZ == 4 +unsigned int QuartetPixelMaskTable[] = { + 0x00000000, + 0x0000000F, + 0x000000F0, + 0x000000FF, + 0x00000F00, + 0x00000F0F, + 0x00000FF0, + 0x00000FFF, + 0x0000F000, + 0x0000F00F, + 0x0000F0F0, + 0x0000F0FF, + 0x0000FF00, + 0x0000FF0F, + 0x0000FFF0, + 0x0000FFFF, + 0x000F0000, + 0x000F000F, + 0x000F00F0, + 0x000F00FF, + 0x000F0F00, + 0x000F0F0F, + 0x000F0FF0, + 0x000F0FFF, + 0x000FF000, + 0x000FF00F, + 0x000FF0F0, + 0x000FF0FF, + 0x000FFF00, + 0x000FFF0F, + 0x000FFFF0, + 0x000FFFFF, + 0x00F00000, + 0x00F0000F, + 0x00F000F0, + 0x00F000FF, + 0x00F00F00, + 0x00F00F0F, + 0x00F00FF0, + 0x00F00FFF, + 0x00F0F000, + 0x00F0F00F, + 0x00F0F0F0, + 0x00F0F0FF, + 0x00F0FF00, + 0x00F0FF0F, + 0x00F0FFF0, + 0x00F0FFFF, + 0x00FF0000, + 0x00FF000F, + 0x00FF00F0, + 0x00FF00FF, + 0x00FF0F00, + 0x00FF0F0F, + 0x00FF0FF0, + 0x00FF0FFF, + 0x00FFF000, + 0x00FFF00F, + 0x00FFF0F0, + 0x00FFF0FF, + 0x00FFFF00, + 0x00FFFF0F, + 0x00FFFFF0, + 0x00FFFFFF, + 0x0F000000, + 0x0F00000F, + 0x0F0000F0, + 0x0F0000FF, + 0x0F000F00, + 0x0F000F0F, + 0x0F000FF0, + 0x0F000FFF, + 0x0F00F000, + 0x0F00F00F, + 0x0F00F0F0, + 0x0F00F0FF, + 0x0F00FF00, + 0x0F00FF0F, + 0x0F00FFF0, + 0x0F00FFFF, + 0x0F0F0000, + 0x0F0F000F, + 0x0F0F00F0, + 0x0F0F00FF, + 0x0F0F0F00, + 0x0F0F0F0F, + 0x0F0F0FF0, + 0x0F0F0FFF, + 0x0F0FF000, + 0x0F0FF00F, + 0x0F0FF0F0, + 0x0F0FF0FF, + 0x0F0FFF00, + 0x0F0FFF0F, + 0x0F0FFFF0, + 0x0F0FFFFF, + 0x0FF00000, + 0x0FF0000F, + 0x0FF000F0, + 0x0FF000FF, + 0x0FF00F00, + 0x0FF00F0F, + 0x0FF00FF0, + 0x0FF00FFF, + 0x0FF0F000, + 0x0FF0F00F, + 0x0FF0F0F0, + 0x0FF0F0FF, + 0x0FF0FF00, + 0x0FF0FF0F, + 0x0FF0FFF0, + 0x0FF0FFFF, + 0x0FFF0000, + 0x0FFF000F, + 0x0FFF00F0, + 0x0FFF00FF, + 0x0FFF0F00, + 0x0FFF0F0F, + 0x0FFF0FF0, + 0x0FFF0FFF, + 0x0FFFF000, + 0x0FFFF00F, + 0x0FFFF0F0, + 0x0FFFF0FF, + 0x0FFFFF00, + 0x0FFFFF0F, + 0x0FFFFFF0, + 0x0FFFFFFF, + 0xF0000000, + 0xF000000F, + 0xF00000F0, + 0xF00000FF, + 0xF0000F00, + 0xF0000F0F, + 0xF0000FF0, + 0xF0000FFF, + 0xF000F000, + 0xF000F00F, + 0xF000F0F0, + 0xF000F0FF, + 0xF000FF00, + 0xF000FF0F, + 0xF000FFF0, + 0xF000FFFF, + 0xF00F0000, + 0xF00F000F, + 0xF00F00F0, + 0xF00F00FF, + 0xF00F0F00, + 0xF00F0F0F, + 0xF00F0FF0, + 0xF00F0FFF, + 0xF00FF000, + 0xF00FF00F, + 0xF00FF0F0, + 0xF00FF0FF, + 0xF00FFF00, + 0xF00FFF0F, + 0xF00FFFF0, + 0xF00FFFFF, + 0xF0F00000, + 0xF0F0000F, + 0xF0F000F0, + 0xF0F000FF, + 0xF0F00F00, + 0xF0F00F0F, + 0xF0F00FF0, + 0xF0F00FFF, + 0xF0F0F000, + 0xF0F0F00F, + 0xF0F0F0F0, + 0xF0F0F0FF, + 0xF0F0FF00, + 0xF0F0FF0F, + 0xF0F0FFF0, + 0xF0F0FFFF, + 0xF0FF0000, + 0xF0FF000F, + 0xF0FF00F0, + 0xF0FF00FF, + 0xF0FF0F00, + 0xF0FF0F0F, + 0xF0FF0FF0, + 0xF0FF0FFF, + 0xF0FFF000, + 0xF0FFF00F, + 0xF0FFF0F0, + 0xF0FFF0FF, + 0xF0FFFF00, + 0xF0FFFF0F, + 0xF0FFFFF0, + 0xF0FFFFFF, + 0xFF000000, + 0xFF00000F, + 0xFF0000F0, + 0xFF0000FF, + 0xFF000F00, + 0xFF000F0F, + 0xFF000FF0, + 0xFF000FFF, + 0xFF00F000, + 0xFF00F00F, + 0xFF00F0F0, + 0xFF00F0FF, + 0xFF00FF00, + 0xFF00FF0F, + 0xFF00FFF0, + 0xFF00FFFF, + 0xFF0F0000, + 0xFF0F000F, + 0xFF0F00F0, + 0xFF0F00FF, + 0xFF0F0F00, + 0xFF0F0F0F, + 0xFF0F0FF0, + 0xFF0F0FFF, + 0xFF0FF000, + 0xFF0FF00F, + 0xFF0FF0F0, + 0xFF0FF0FF, + 0xFF0FFF00, + 0xFF0FFF0F, + 0xFF0FFFF0, + 0xFF0FFFFF, + 0xFFF00000, + 0xFFF0000F, + 0xFFF000F0, + 0xFFF000FF, + 0xFFF00F00, + 0xFFF00F0F, + 0xFFF00FF0, + 0xFFF00FFF, + 0xFFF0F000, + 0xFFF0F00F, + 0xFFF0F0F0, + 0xFFF0F0FF, + 0xFFF0FF00, + 0xFFF0FF0F, + 0xFFF0FFF0, + 0xFFF0FFFF, + 0xFFFF0000, + 0xFFFF000F, + 0xFFFF00F0, + 0xFFFF00FF, + 0xFFFF0F00, + 0xFFFF0F0F, + 0xFFFF0FF0, + 0xFFFF0FFF, + 0xFFFFF000, + 0xFFFFF00F, + 0xFFFFF0F0, + 0xFFFFF0FF, + 0xFFFFFF00, + 0xFFFFFF0F, + 0xFFFFFFF0, + 0xFFFFFFFF, +}; +#endif +#if PSZ == 8 unsigned int QuartetPixelMaskTable[] = { 0x00000000, 0x000000FF, @@ -272,7 +631,7 @@ unsigned int QuartetPixelMaskTable[] = { 0xFFFFFFFF }; #endif -#if PPW == 2 +#if PSZ == 16 unsigned int QuartetPixelMaskTable[] = { 0x00000000, 0x0000FFFF, @@ -280,13 +639,9 @@ unsigned int QuartetPixelMaskTable[] = { 0xFFFFFFFF, }; #endif -#if PPW == 1 +#if PSZ == 32 unsigned int QuartetPixelMaskTable[] = { 0x00000000, 0xFFFFFFFF, }; #endif - -#ifdef vax -#undef VAXBYTEORDER -#endif diff --git a/xc/programs/Xserver/cfb/cfbpntwin.c b/xc/programs/Xserver/cfb/cfbpntwin.c index 4578ed349..2e8f39480 100644 --- a/xc/programs/Xserver/cfb/cfbpntwin.c +++ b/xc/programs/Xserver/cfb/cfbpntwin.c @@ -188,7 +188,7 @@ cfbFillBoxSolid (pDrawable, nBox, pBox, pixel) pdst = pdstBase + pBox->y1 * widthDst; h = pBox->y2 - pBox->y1; w = pBox->x2 - pBox->x1; -#if PPW == 4 +#if PSZ == 8 if (w == 1) { register char *pdstb = ((char *) pdst) + pBox->x1; @@ -246,7 +246,7 @@ cfbFillBoxSolid (pDrawable, nBox, pBox, pixel) } } } -#if PPW == 4 +#if PSZ == 8 } #endif } diff --git a/xc/programs/Xserver/cfb/cfbpush8.c b/xc/programs/Xserver/cfb/cfbpush8.c index 7be75be96..7a9544fde 100644 --- a/xc/programs/Xserver/cfb/cfbpush8.c +++ b/xc/programs/Xserver/cfb/cfbpush8.c @@ -15,7 +15,9 @@ without specific, written prior permission. M.I.T. makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ -/* $XConsortium: cfbpush8.c,v 5.8 91/01/27 13:02:54 keith Exp $ */ +/* $XConsortium: cfbpush8.c,v 5.9 91/04/10 11:41:54 keith Exp $ */ + +#if PSZ == 8 #include "X.h" #include "Xmd.h" @@ -29,8 +31,6 @@ purpose. It is provided "as is" without express or implied warranty. #include "cfbmskbits.h" #include "cfb8bit.h" -#if PPW == 4 - extern void mfbPushPixels(); void diff --git a/xc/programs/Xserver/cfb/cfbrctstp8.c b/xc/programs/Xserver/cfb/cfbrctstp8.c index 19322c06d..b893527c5 100644 --- a/xc/programs/Xserver/cfb/cfbrctstp8.c +++ b/xc/programs/Xserver/cfb/cfbrctstp8.c @@ -18,7 +18,9 @@ Author: Keith Packard, MIT X Consortium */ -/* $XConsortium: cfbrctstp8.c,v 1.12 90/02/09 13:14:28 rws Exp $ */ +/* $XConsortium: cfbrctstp8.c,v 1.13 91/04/10 11:41:33 keith Exp $ */ + +#if PSZ == 8 #include "X.h" #include "Xmd.h" @@ -33,9 +35,6 @@ Author: Keith Packard, MIT X Consortium #include "cfbmskbits.h" #include "cfb8bit.h" -#if (PPW == 4) - - void cfb8FillRectOpaqueStippled32 (pDrawable, pGC, nBox, pBox) DrawablePtr pDrawable; diff --git a/xc/programs/Xserver/cfb/cfbscrinit.c b/xc/programs/Xserver/cfb/cfbscrinit.c index 29b17107b..ea7410d98 100644 --- a/xc/programs/Xserver/cfb/cfbscrinit.c +++ b/xc/programs/Xserver/cfb/cfbscrinit.c @@ -25,7 +25,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XConsortium: cfbscrinit.c,v 5.19 91/06/28 12:40:07 keith Exp $ */ +/* $XConsortium: cfbscrinit.c,v 5.20 91/12/19 14:17:17 keith Exp $ */ #include "X.h" #include "Xmd.h" @@ -139,7 +139,7 @@ cfbFinishScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width) VisualID defaultVisual; rootdepth = 0; - if (!cfbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &rootdepth, &defaultVisual, 1<<PSZ)) + if (!cfbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &rootdepth, &defaultVisual, 1<<(PSZ-1))) return FALSE; #ifdef NEED_CFB_SCREEN_PRIVATE oldDevPrivate = pScreen->devPrivate; diff --git a/xc/programs/Xserver/cfb/cfbsolid.c b/xc/programs/Xserver/cfb/cfbsolid.c index 66d59caed..fcf9c02b4 100644 --- a/xc/programs/Xserver/cfb/cfbsolid.c +++ b/xc/programs/Xserver/cfb/cfbsolid.c @@ -1,5 +1,5 @@ /* - * $XConsortium: cfbsolid.c,v 1.4 91/04/26 21:33:55 keith Exp $ + * $XConsortium: cfbsolid.c,v 1.5 91/07/11 21:48:24 keith Exp $ * * Copyright 1990 Massachusetts Institute of Technology * @@ -132,7 +132,7 @@ RROP_NAME(cfbFillRectSolid) (pDrawable, pGC, nBox, pBox) pdstRect = pdstBase + pBox->y1 * widthDst; h = pBox->y2 - pBox->y1; w = pBox->x2 - pBox->x1; -#if PPW == 4 +#if PSZ == 8 if (w == 1) { register char *pdstb = ((char *) pdstRect) + pBox->x1; @@ -187,7 +187,7 @@ RROP_NAME(cfbFillRectSolid) (pDrawable, pGC, nBox, pBox) } } } -#if PPW == 4 +#if PSZ == 8 } #endif } @@ -248,7 +248,7 @@ RROP_NAME(cfbSolidSpans) (pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) w = *pwidth++; if (!w) continue; -#if PPW == 4 +#if PSZ == 8 if (w <= 4) { register char *addrb; diff --git a/xc/programs/Xserver/cfb/cfbteblt8.c b/xc/programs/Xserver/cfb/cfbteblt8.c index 4e5792b10..8fc880457 100644 --- a/xc/programs/Xserver/cfb/cfbteblt8.c +++ b/xc/programs/Xserver/cfb/cfbteblt8.c @@ -17,7 +17,9 @@ representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ -/* $XConsortium: cfbteblt8.c,v 5.14 91/04/10 11:41:38 keith Exp $ */ +/* $XConsortium: cfbteblt8.c,v 5.15 91/12/19 14:17:20 keith Exp $ */ + +#if PSZ == 8 #include "X.h" #include "Xmd.h" @@ -33,8 +35,6 @@ purpose. It is provided "as is" without express or implied warranty. #include "cfbmskbits.h" #include "cfb8bit.h" -#if (PPW == 4) - /* * this code supports up to 5 characters at a time. The performance * differences between 4 and 5 is usually small (~7% on PMAX) and @@ -551,4 +551,4 @@ CFBTEGBLT8 (pDrawable, pGC, xInit, yInit, nglyph, ppci, pglyphBase) } } } -#endif /* PPW == 4 */ +#endif /* PSZ == 8 */ |