AttrValid.h | 2 - Makefile.am | 6 +-- Oid.h | 2 - pcl/PclArea.c | 85 +++++++++---------------------------------- pcl/PclColor.c | 8 ++-- pcl/PclGC.c | 110 +++++++++----------------------------------------------- pcl/PclInit.c | 20 ++++------ ps/PsInit.c | 4 +- raster/Raster.c | 15 ++----- 9 files changed, 60 insertions(+), 192 deletions(-) Index: Xprint/AttrValid.h =================================================================== RCS file: /cvs/xorg/xserver/xorg/Xprint/AttrValid.h,v retrieving revision 1.3 diff -u -d -r1.3 AttrValid.h --- Xprint/AttrValid.h 3 Jul 2005 07:01:09 -0000 1.3 +++ Xprint/AttrValid.h 26 Jan 2006 03:31:57 -0000 @@ -182,7 +182,7 @@ XPAttributes pool, XpOid oid, const XpOidMediumSS* msss); -const XpOidMediumSS* XpGetDefaultMediumSS(); +const XpOidMediumSS* XpGetDefaultMediumSS(void); /* * XpOidTrayMediumList-valued attribute access Index: Xprint/Makefile.am =================================================================== RCS file: /cvs/xorg/xserver/xorg/Xprint/Makefile.am,v retrieving revision 1.7 diff -u -d -r1.7 Makefile.am --- Xprint/Makefile.am 6 Jan 2006 23:06:14 -0000 1.7 +++ Xprint/Makefile.am 26 Jan 2006 03:31:57 -0000 @@ -10,8 +10,7 @@ Xprt_LDFLAGS = -L$(top_srcdir) Xprt_LDADD = @XPRINT_LIBS@ ps/libps.la raster/libraster.la \ pcl/libpcl.la pcl-mono/libpcl.la \ - ../mfb/libmfb.la ../mi/libmi.la \ - ../cfb32/libcfb32.la ../cfb/libcfb.la ../Xext/libXext.la + ../fb/libfb.la ../render/librender.la ../mi/libmi.la ../Xext/libXext.la miinitext-wrapper.c: echo "#include \"$(top_srcdir)/mi/miinitext.c\"" >> $@ @@ -36,6 +35,7 @@ spooler.h \ Util.c \ miinitext-wrapper.c \ - dpmsstubs-wrapper.c + dpmsstubs-wrapper.c \ + $(top_srcdir)/fb/fbcmap.c EXTRA_DIST = ValTree.c Index: Xprint/Oid.h =================================================================== RCS file: /cvs/xorg/xserver/xorg/Xprint/Oid.h,v retrieving revision 1.5 diff -u -d -r1.5 Oid.h --- Xprint/Oid.h 7 Jul 2005 02:47:06 -0000 1.5 +++ Xprint/Oid.h 26 Jan 2006 03:31:57 -0000 @@ -210,7 +210,7 @@ /* * XpOidLinkedList public methods */ -XpOidLinkedList* XpOidLinkedListNew(); +XpOidLinkedList* XpOidLinkedListNew(void); void XpOidLinkedListDelete(XpOidLinkedList*); #define XpOidLinkedListCount(l) ((l) ? (l)->count : 0) XpOid XpOidLinkedListGetOid(XpOidLinkedList* list, int i); Index: Xprint/pcl/PclArea.c =================================================================== RCS file: /cvs/xorg/xserver/xorg/Xprint/pcl/PclArea.c,v retrieving revision 1.3 diff -u -d -r1.3 PclArea.c --- Xprint/pcl/PclArea.c 3 Jul 2005 07:01:10 -0000 1.3 +++ Xprint/pcl/PclArea.c 26 Jan 2006 03:31:57 -0000 @@ -57,10 +57,7 @@ #include "pixmapstr.h" #include "region.h" -#include "cfb.h" -#if 1 -#include "cfb32.h" -#endif +#include "fb.h" void PclPutImage(DrawablePtr pDrawable, @@ -129,11 +126,7 @@ gcv[0] = i; DoChangeGC( pGC, GCPlaneMask, gcv, 0 ); ValidateGC( pDrawable, pGC ); - if (pPixmap->drawable.depth <= 8 ) - cfbPutImage( (DrawablePtr)pPixmap, pGC, 1, x, y, w, h, - leftPad, XYBitmap, pImage ); - else if (pPixmap->drawable.depth <= 32 ) - cfb32PutImage( (DrawablePtr)pPixmap, pGC, 1, x, y, w, h, + fbPutImage( (DrawablePtr)pPixmap, pGC, 1, x, y, w, h, leftPad, XYBitmap, pImage ); } } @@ -170,13 +163,13 @@ /* * Create a storage area large enough to hold the entire pixmap, - * then use mfbGetImage to get the appropriate bits. + * then use fbGetImage to get the appropriate bits. */ h = y2 - y1; w = BitmapBytePad( x2 - x1 ); bits = (char *)xalloc( h * w ); - mfbGetImage( (DrawablePtr)pix, x1, y1, x2 - x1, h, + fbGetImage( (DrawablePtr)pix, x1, y1, x2 - x1, h, XYPixmap, ~0, bits ); /* @@ -226,18 +219,13 @@ /* * Create a storage area large enough to hold the entire pixmap, - * then use cfbGetImage to get the appropriate bits. + * then use fbGetImage to get the appropriate bits. */ h = y2 - y1; w = PixmapBytePad( x2 - x1, pix->drawable.depth ); bits = (char *)xalloc( h * w ); - if (pix->drawable.depth <= 8) - cfbGetImage( (DrawablePtr)pix, x1, y1, x2 - x1, h, - ZPixmap, ~0, bits ); - else if (pix->drawable.depth <= 32) - cfb32GetImage( (DrawablePtr)pix, x1, y1, x2 - x1, h, - ZPixmap, ~0, bits ); + fbGetImage( (DrawablePtr)pix, x1, y1, x2 - x1, h, ZPixmap, ~0, bits ); /* * Move the cursor to the appropriate place on the page. We have @@ -306,20 +294,10 @@ /* * If we're copying from a pixmap to a pixmap, we just use the - * mfb/cfb code to do the work. + * fb code to do the work. */ if( pDst->type == DRAWABLE_PIXMAP ) - { - if( pSrc->depth == 1 ) - return mfbCopyArea( pSrc, pDst, pGC, srcx, srcy, width, - height, dstx, dsty ); - else if( pSrc->depth <= 8 ) - return cfbCopyArea( pSrc, pDst, pGC, srcx, srcy, width, - height, dstx, dsty ); - else if( pSrc->depth <= 32 ) - return cfb32CopyArea( pSrc, pDst, pGC, srcx, srcy, width, - height, dstx, dsty ); - } + fbCopyArea( pSrc, pDst, pGC, srcx, srcy, width, height, dstx, dsty ); /* PclGetDrawablePrivateStuff( pSrc, &srcGC, &valid, &srcFile ); @@ -328,7 +306,7 @@ /* * If we're copying to a window, we have to do some actual - * drawing, instead of just handing it off to mfb or cfb. Start + * drawing, instead of just handing it off to fb. Start * by determining the region that will be drawn. */ box.x1 = srcx; @@ -427,28 +405,16 @@ if( pSrc->type == DRAWABLE_WINDOW ) return NULL; - /* - * Copying from a pixmap to a pixmap is already implemented by - * mfb/cfb. - */ + /* Copying from a pixmap to a pixmap is already implemented by fb. */ if( pSrc->type == DRAWABLE_PIXMAP && pDst->type == DRAWABLE_PIXMAP ) - { - if( pDst->depth == 1 ) - return mfbCopyPlane( pSrc, pDst, pGC, srcx, srcy, width, - height, dstx, dsty, plane ); - else if( pDst->depth <= 8 ) - return cfbCopyPlane( pSrc, pDst, pGC, srcx, srcy, width, - height, dstx, dsty, plane ); - else if( pDst->depth <= 32 ) - return cfb32CopyPlane( pSrc, pDst, pGC, srcx, srcy, width, - height, dstx, dsty, plane ); - } + fbCopyPlane( pSrc, pDst, pGC, srcx, srcy, width, height, + dstx, dsty, plane ); /* - * We can use the mfb/cfbCopyPlane function to do the work of grabbing - * the plane and converting it to the desired visual. Once that's - * done, we already know how to do a CopyArea. + * We can use fbCopyPlane to do the work of grabbing the plane and + * converting it to the desired visual. Once that's done, we already + * know how to do a CopyArea. */ scratchPix = (*pDst->pScreen->CreatePixmap)( pDst->pScreen, width, height, pDst->depth ); @@ -456,24 +422,9 @@ scratchGC = GetScratchGC( pDst->depth, pDst->pScreen ); CopyGC( pGC, scratchGC, ~0L ); - if( pDst->depth == 1 ) - { - mfbValidateGC( scratchGC, ~0L, (DrawablePtr)scratchPix ); - mfbCopyPlane( pSrc, (DrawablePtr)scratchPix, scratchGC, - srcx, srcy, width, height, 0, 0, plane ); - } - else if( pDst->depth <= 8 ) - { - cfbValidateGC( scratchGC, ~0L, (DrawablePtr)scratchPix ); - cfbCopyPlane( pSrc, (DrawablePtr)scratchPix, scratchGC, - srcx, srcy, width, height, 0, 0, plane ); - } - else if( pDst->depth <= 32 ) - { - cfb32ValidateGC( scratchGC, ~0L, (DrawablePtr)scratchPix ); - cfb32CopyPlane( pSrc, (DrawablePtr)scratchPix, scratchGC, - srcx, srcy, width, height, 0, 0, plane ); - } + fbValidateGC( scratchGC, ~0L, (DrawablePtr)scratchPix ); + fbCopyPlane( pSrc, (DrawablePtr)scratchPix, scratchGC, + srcx, srcy, width, height, 0, 0, plane ); reg = PclCopyArea( (DrawablePtr)scratchPix, pDst, pGC, 0, 0, width, height, dstx, dsty ); Index: Xprint/pcl/PclColor.c =================================================================== RCS file: /cvs/xorg/xserver/xorg/Xprint/pcl/PclColor.c,v retrieving revision 1.3 diff -u -d -r1.3 PclColor.c --- Xprint/pcl/PclColor.c 3 Jul 2005 07:01:10 -0000 1.3 +++ Xprint/pcl/PclColor.c 26 Jan 2006 03:31:57 -0000 @@ -64,7 +64,7 @@ #include "resource.h" #include "Pcl.h" -#include "cfb.h" +#include "fb.h" static void lookup(unsigned char *src, unsigned char *dst, @@ -80,10 +80,10 @@ /* * This seems to be (and is) a duplication of effort; one would think - * that cfbCreateDefColormap would be sufficient. It almost is. The + * that fbCreateDefColormap would be sufficient. It almost is. The * only change made in this function is that the black and white pixels * are allocated with three separate variables for red, green and blue - * values, instead of the single variable in cfbCreateDefColormap. The + * values, instead of the single variable in fbCreateDefColormap. The * single variable leads to the one value being corrected by * ResolveColor three times, which leads to incorrect colors. */ @@ -137,7 +137,7 @@ /* * Use existing code to initialize the values in the colormap */ - cfbInitializeColormap( pColor ); + fbInitializeColormap( pColor ); /* * Set up the mapping between the color map and the context Index: Xprint/pcl/PclGC.c =================================================================== RCS file: /cvs/xorg/xserver/xorg/Xprint/pcl/PclGC.c,v retrieving revision 1.3 diff -u -d -r1.3 PclGC.c --- Xprint/pcl/PclGC.c 3 Jul 2005 07:01:10 -0000 1.3 +++ Xprint/pcl/PclGC.c 26 Jan 2006 03:31:57 -0000 @@ -56,9 +56,7 @@ #include "pixmapstr.h" #include "colormapst.h" #include "windowstr.h" -#include "cfb.h" -#include "cfb32.h" -#include "migc.h" +#include "fb.h" #include "scrnintstr.h" #include "resource.h" @@ -106,22 +104,8 @@ Bool PclCreateGC(GCPtr pGC) { - if( pGC->depth == 1 ) - { - if( mfbCreateGC( pGC ) == FALSE ) - return FALSE; - } - else if( pGC->depth <= 32 ) - { -#if PSZ == 8 - if( cfbCreateGC( pGC ) == FALSE ) -#else - if( cfb32CreateGC( pGC ) == FALSE ) -#endif - return FALSE; - } - else - return FALSE; + if (fbCreateGC(pGC) == FALSE) + return FALSE; pGC->clientClip = NULL; pGC->clientClipType = CT_NONE; @@ -135,7 +119,7 @@ void PclDestroyGC(GCPtr pGC) { - /* Handle the mfb and cfb, which share a GC private struct */ + /* fb doesn't specialize DestroyGC */ miDestroyGC( pGC ); } @@ -655,34 +639,12 @@ h = pGC->tile.pixmap->drawable.height; w = pGC->tile.pixmap->drawable.width; - if( pGC->tile.pixmap->drawable.depth == 1 ) - { - sz = h * BitmapBytePad( w ); - - bits = (char *)xalloc( sz ); - mfbGetImage(&(pGC->tile.pixmap->drawable), 0, 0, w, h, XYPixmap, ~0, bits); - PclSendPattern( bits, sz, 1, h, w, 100, *outFile ); - xfree( bits ); - } - else if( pGC->tile.pixmap->drawable.depth == 8 ) - { - sz = h * PixmapBytePad( w, 8 ); - bits = (char *)xalloc( sz ); - cfbGetImage(&(pGC->tile.pixmap->drawable), 0, 0, w, h, ZPixmap, ~0, bits); - PclSendPattern( bits, sz, 8, h, w, 100, *outFile ); - xfree( bits ); - } -#if PSZ == 32 - else - { - sz = h * PixmapBytePad( w, 24 ); - - bits = (char *)xalloc( sz ); - cfb32GetImage(&(pGC->tile.pixmap->drawable), 0, 0, w, h, ZPixmap, ~0, bits); - PclSendPattern( bits, sz, 24, h, w, 100, *outFile ); - xfree( bits ); - } -#endif + sz = h * PixmapBytePad(w, pGC->tile.pixmap->drawable.depth); + bits = (char *)xalloc(sz); + fbGetImage(&(pGC->tile.pixmap->drawable), 0, 0, w, h, XYPixmap, ~0, + bits); + PclSendPattern( bits, sz, 1, h, w, 100, *outFile ); + xfree( bits ); } if( changeMask & ( GCTileStipXOrigin | GCTileStipYOrigin ) ) @@ -717,7 +679,7 @@ sz = h * BitmapBytePad( w ); bits = (char *)xalloc( sz ); - mfbGetImage( &(pGC->stipple->drawable), 0, 0, w, h, XYPixmap, ~0, bits ); + fbGetImage( &(pGC->stipple->drawable), 0, 0, w, h, XYPixmap, ~0, bits ); w2 = ( w / 8 ) + ( ( w%8 ) ? 1 : 0 ); /* @@ -755,37 +717,12 @@ w, h, pGC->depth ); scratchGC = GetScratchGC( pGC->depth, pGC->pScreen ); CopyGC( pGC, scratchGC, ~0L ); - - if( pGC->depth == 1 ) - { - mfbValidateGC( scratchGC, ~0L, - (DrawablePtr)scratchPix ); - mfbCopyPlane( &(pGC->stipple->drawable), - (DrawablePtr)scratchPix, scratchGC, 0, - 0, w, h, 0, 0, 1 ); - mfbGetImage( &(scratchPix->drawable), 0, 0, w, h, XYPixmap, ~0, - bits ); - } - else if( pGC->depth <= 32 ) - { -#if PSZ == 8 - cfbValidateGC( scratchGC, ~0L, - (DrawablePtr)scratchPix ); - cfbCopyPlane( &(pGC->stipple->drawable), - (DrawablePtr)scratchPix, scratchGC, 0, - 0, w, h, 0, 0, 1 ); - cfbGetImage( &(scratchPix->drawable), 0, 0, w, h, ZPixmap, ~0, - bits ); -#else - cfb32ValidateGC( scratchGC, ~0L, - (DrawablePtr)scratchPix ); - cfb32CopyPlane( pGC->stipple, - (DrawablePtr)scratchPix, scratchGC, 0, - 0, w, h, 0, 0, 1 ); - cfb32GetImage( scratchPix, 0, 0, w, h, ZPixmap, ~0, - bits ); -#endif - } + + fbValidateGC(scratchGC, ~0L, (DrawablePtr)scratchPix); + fbCopyPlane(&(pGC->stipple->drawable), (DrawablePtr)scratchPix, + scratchGC, 0, 0, w, h, 0, 0, 1); + fbGetImage(&(scratchPix->drawable), 0, 0, w, h, XYPixmap, ~0, + bits); PclSendPattern( bits, sz, pGC->depth, h, w, 101, *outFile ); FreeScratchGC( scratchGC ); (*pGC->pScreen->DestroyPixmap)( scratchPix ); @@ -994,18 +931,7 @@ */ if( pDrawable->type == DRAWABLE_PIXMAP ) { - if( pDrawable->depth == 1 ) - { - mfbValidateGC( pGC, ~0, pDrawable ); - } - else if( pDrawable->depth <= 32 ) - { -#if PSZ == 8 - cfbValidateGC( pGC, ~0, pDrawable ); -#else - cfb32ValidateGC( pGC, ~0, pDrawable ); -#endif - } + fbValidateGC(pGC, ~0, pDrawable); return; } Index: Xprint/pcl/PclInit.c =================================================================== RCS file: /cvs/xorg/xserver/xorg/Xprint/pcl/PclInit.c,v retrieving revision 1.6 diff -u -d -r1.6 PclInit.c --- Xprint/pcl/PclInit.c 3 Jul 2005 07:01:10 -0000 1.6 +++ Xprint/pcl/PclInit.c 26 Jan 2006 03:31:59 -0000 @@ -89,7 +89,7 @@ #include "Pcl.h" -#include "cfb.h" +#include "fb.h" #include /* for unlink() */ #include "attributes.h" @@ -200,18 +200,16 @@ maxRes = MAX( xRes, yRes ); #ifdef XP_PCL_COLOR - cfbScreenInit( pScreen, NULL, maxDim, maxDim, maxRes, maxRes, - maxRes ); - /* - * Clean up the fields that we stomp (code taken from cfbCloseScreen) - */ + fbScreenInit( pScreen, NULL, maxDim, maxDim, maxRes, maxRes, + maxRes, 8 ); /* XXX what's the depth here? */ + /* Clean up the fields that we stomp (code taken from fbCloseScreen) */ for( i = 0; (int) i < pScreen->numDepths; i++ ) xfree( pScreen->allowedDepths[i].vids ); xfree( pScreen->allowedDepths ); xfree( pScreen->visuals ); #else - mfbScreenInit( pScreen, NULL, maxDim, maxDim, maxRes, maxRes, - maxRes ); + fbScreenInit( pScreen, NULL, maxDim, maxDim, maxRes, maxRes, + maxRes, 1 ); #endif /* XP_PCL_COLOR */ miInitializeBackingStore ( pScreen ); @@ -241,8 +239,8 @@ pScreen->PaintWindowBorder = PclPaintWindow; pScreen->CopyWindow = PclCopyWindow; /* XXX Hard routine to write! */ - pScreen->CreatePixmap = PclCreatePixmap; - pScreen->DestroyPixmap = PclDestroyPixmap; + pScreen->CreatePixmap = fbCreatePixmap; + pScreen->DestroyPixmap = fbDestroyPixmap; pScreen->RealizeFont = PclRealizeFont; pScreen->UnrealizeFont = PclUnrealizeFont; pScreen->CreateGC = PclCreateGC; @@ -257,7 +255,7 @@ pScreen->ResolveColor = PclResolveColor; */ - pScreen->BitmapToRegion = mfbPixmapToRegion; + pScreen->BitmapToRegion = fbPixmapToRegion; pScreen->ConstrainCursor = PclConstrainCursor; pScreen->CursorLimits = PclCursorLimits; Index: Xprint/ps/PsInit.c =================================================================== RCS file: /cvs/xorg/xserver/xorg/Xprint/ps/PsInit.c,v retrieving revision 1.11 diff -u -d -r1.11 PsInit.c --- Xprint/ps/PsInit.c 3 Jul 2005 07:01:13 -0000 1.11 +++ Xprint/ps/PsInit.c 26 Jan 2006 03:31:59 -0000 @@ -89,7 +89,7 @@ #include "mi.h" #include "micmap.h" #include "AttrValid.h" -#include "mfb.h" +#include "fb.h" #include "windowstr.h" #include "DiPrint.h" @@ -194,7 +194,7 @@ pScreen->StoreColors = PsStoreColors; pScreen->ResolveColor = PsResolveColor; /* Will BitmapToRegion make any difference at all? */ - pScreen->BitmapToRegion = mfbPixmapToRegion; + pScreen->BitmapToRegion = fbPixmapToRegion; visuals = (VisualPtr) xalloc(16*sizeof(VisualRec)); depths = (DepthPtr) xalloc(16*sizeof(DepthRec)); Index: Xprint/raster/Raster.c =================================================================== RCS file: /cvs/xorg/xserver/xorg/Xprint/raster/Raster.c,v retrieving revision 1.6 diff -u -d -r1.6 Raster.c --- Xprint/raster/Raster.c 3 Jul 2005 08:53:37 -0000 1.6 +++ Xprint/raster/Raster.c 26 Jan 2006 03:31:59 -0000 @@ -74,7 +74,7 @@ #include "windowstr.h" #include "propertyst.h" #include "servermd.h" /* needed for IMAGE_BUFSIZE */ -#include "mfb.h" +#include "fb.h" #include "mi.h" #include @@ -222,20 +222,13 @@ /* * Have to allocate maxDim X maxDim to allow for landscape mode. */ - mfbScreenInit(pScreen, pPriv->pBits, maxDim, maxDim, maxRes, - maxRes, maxDim); + fbScreenInit(pScreen, pPriv->pBits, maxDim, maxDim, maxRes, + maxRes, maxDim, 1); miInitializeBackingStore(pScreen); pScreen->blackPixel = 1; pScreen->whitePixel = 0; - if(mfbCreateDefColormap(pScreen) == FALSE) + if(fbCreateDefColormap(pScreen) == FALSE) ; /* XXX what do I do if it fails? */ - - /* - cfbScreenInit(pScreen, pPriv->pBits, maxWidth, maxHeight, maxXres, - maxYres, maxWidth); - miInitializeBackingStore(pScreen); - scalingScreenInit(pScreen); - */ pScreen->SaveScreen = (SaveScreenProcPtr)_XpBoolNoop; pPriv->ChangeWindowAttributes = pScreen->ChangeWindowAttributes;