Bug #4766: Convert all Xprint drivers to fb.
This commit is contained in:
parent
d9b8bfbfaf
commit
373f9f9256
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
||||||
|
2006-04-03 Adam Jackson <ajax@freedesktop.org>
|
||||||
|
|
||||||
|
* Xprint/Makefile.am:
|
||||||
|
* Xprint/pcl/PclArea.c:
|
||||||
|
* Xprint/pcl/PclColor.c:
|
||||||
|
* Xprint/pcl/PclGC.c:
|
||||||
|
* Xprint/pcl/PclInit.c:
|
||||||
|
* Xprint/ps/PsInit.c:
|
||||||
|
* Xprint/raster/Raster.c:
|
||||||
|
Bug #4766: Convert all Xprint drivers to fb.
|
||||||
|
|
||||||
2006-04-03 Adam Jackson <ajax@freedesktop.org>
|
2006-04-03 Adam Jackson <ajax@freedesktop.org>
|
||||||
|
|
||||||
* fb/fbfill.c:
|
* fb/fbfill.c:
|
||||||
|
|
|
@ -9,9 +9,8 @@ Xprt_CFLAGS = @SERVER_DEFINES@ @DIX_CFLAGS@ @XPRINT_CFLAGS@ \
|
||||||
|
|
||||||
Xprt_LDFLAGS = -L$(top_srcdir)
|
Xprt_LDFLAGS = -L$(top_srcdir)
|
||||||
Xprt_LDADD = @XPRINT_LIBS@ ps/libps.la raster/libraster.la \
|
Xprt_LDADD = @XPRINT_LIBS@ ps/libps.la raster/libraster.la \
|
||||||
pcl/libpcl.la pcl-mono/libpcl.la \
|
pcl/libpcl.la pcl-mono/libpcl.la ../fb/libfb.la \
|
||||||
../mfb/libmfb.la ../mi/libmi.la \
|
../render/librender.la ../mi/libmi.la ../Xext/libXext.la \
|
||||||
../cfb32/libcfb32.la ../cfb/libcfb.la ../Xext/libXext.la \
|
|
||||||
@FREETYPE_LIBS@
|
@FREETYPE_LIBS@
|
||||||
|
|
||||||
miinitext-wrapper.c:
|
miinitext-wrapper.c:
|
||||||
|
@ -37,6 +36,7 @@ Xprt_SOURCES = \
|
||||||
spooler.h \
|
spooler.h \
|
||||||
Util.c \
|
Util.c \
|
||||||
miinitext-wrapper.c \
|
miinitext-wrapper.c \
|
||||||
dpmsstubs-wrapper.c
|
dpmsstubs-wrapper.c \
|
||||||
|
$(top_srcdir)/fb/fbcmap.c
|
||||||
|
|
||||||
EXTRA_DIST = ValTree.c
|
EXTRA_DIST = ValTree.c
|
||||||
|
|
|
@ -57,10 +57,7 @@ copyright holders.
|
||||||
#include "pixmapstr.h"
|
#include "pixmapstr.h"
|
||||||
#include "region.h"
|
#include "region.h"
|
||||||
|
|
||||||
#include "cfb.h"
|
#include "fb.h"
|
||||||
#if 1
|
|
||||||
#include "cfb32.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void
|
void
|
||||||
PclPutImage(DrawablePtr pDrawable,
|
PclPutImage(DrawablePtr pDrawable,
|
||||||
|
@ -129,11 +126,7 @@ PclPutImage(DrawablePtr pDrawable,
|
||||||
gcv[0] = i;
|
gcv[0] = i;
|
||||||
DoChangeGC( pGC, GCPlaneMask, gcv, 0 );
|
DoChangeGC( pGC, GCPlaneMask, gcv, 0 );
|
||||||
ValidateGC( pDrawable, pGC );
|
ValidateGC( pDrawable, pGC );
|
||||||
if (pPixmap->drawable.depth <= 8 )
|
fbPutImage( (DrawablePtr)pPixmap, pGC, 1, x, y, w, h,
|
||||||
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,
|
|
||||||
leftPad, XYBitmap, pImage );
|
leftPad, XYBitmap, pImage );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -170,13 +163,13 @@ PclMonoPixmapFragment(FILE *outFile,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create a storage area large enough to hold the entire pixmap,
|
* 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;
|
h = y2 - y1;
|
||||||
w = BitmapBytePad( x2 - x1 );
|
w = BitmapBytePad( x2 - x1 );
|
||||||
|
|
||||||
bits = (char *)xalloc( h * w );
|
bits = (char *)xalloc( h * w );
|
||||||
mfbGetImage( (DrawablePtr)pix, x1, y1, x2 - x1, h,
|
fbGetImage( (DrawablePtr)pix, x1, y1, x2 - x1, h,
|
||||||
XYPixmap, ~0, bits );
|
XYPixmap, ~0, bits );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -226,18 +219,13 @@ PclColorPixmapFragment(FILE *outFile,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create a storage area large enough to hold the entire pixmap,
|
* 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;
|
h = y2 - y1;
|
||||||
w = PixmapBytePad( x2 - x1, pix->drawable.depth );
|
w = PixmapBytePad( x2 - x1, pix->drawable.depth );
|
||||||
|
|
||||||
bits = (char *)xalloc( h * w );
|
bits = (char *)xalloc( h * w );
|
||||||
if (pix->drawable.depth <= 8)
|
fbGetImage( (DrawablePtr)pix, x1, y1, x2 - x1, h, ZPixmap, ~0, bits );
|
||||||
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 );
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Move the cursor to the appropriate place on the page. We have
|
* Move the cursor to the appropriate place on the page. We have
|
||||||
|
@ -306,20 +294,10 @@ PclCopyArea(DrawablePtr pSrc,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we're copying from a pixmap to a pixmap, we just use the
|
* 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( pDst->type == DRAWABLE_PIXMAP )
|
||||||
{
|
fbCopyArea( pSrc, pDst, pGC, srcx, srcy, width, height, dstx, dsty );
|
||||||
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 );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
PclGetDrawablePrivateStuff( pSrc, &srcGC, &valid, &srcFile );
|
PclGetDrawablePrivateStuff( pSrc, &srcGC, &valid, &srcFile );
|
||||||
|
@ -328,7 +306,7 @@ PclCopyArea(DrawablePtr pSrc,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we're copying to a window, we have to do some actual
|
* 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.
|
* by determining the region that will be drawn.
|
||||||
*/
|
*/
|
||||||
box.x1 = srcx;
|
box.x1 = srcx;
|
||||||
|
@ -427,28 +405,16 @@ PclCopyPlane(DrawablePtr pSrc,
|
||||||
if( pSrc->type == DRAWABLE_WINDOW )
|
if( pSrc->type == DRAWABLE_WINDOW )
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/*
|
/* Copying from a pixmap to a pixmap is already implemented by fb. */
|
||||||
* Copying from a pixmap to a pixmap is already implemented by
|
|
||||||
* mfb/cfb.
|
|
||||||
*/
|
|
||||||
if( pSrc->type == DRAWABLE_PIXMAP &&
|
if( pSrc->type == DRAWABLE_PIXMAP &&
|
||||||
pDst->type == DRAWABLE_PIXMAP )
|
pDst->type == DRAWABLE_PIXMAP )
|
||||||
{
|
fbCopyPlane( pSrc, pDst, pGC, srcx, srcy, width, height,
|
||||||
if( pDst->depth == 1 )
|
dstx, dsty, plane );
|
||||||
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 );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We can use the mfb/cfbCopyPlane function to do the work of grabbing
|
* We can use fbCopyPlane to do the work of grabbing the plane and
|
||||||
* the plane and converting it to the desired visual. Once that's
|
* converting it to the desired visual. Once that's done, we already
|
||||||
* done, we already know how to do a CopyArea.
|
* know how to do a CopyArea.
|
||||||
*/
|
*/
|
||||||
scratchPix = (*pDst->pScreen->CreatePixmap)( pDst->pScreen, width,
|
scratchPix = (*pDst->pScreen->CreatePixmap)( pDst->pScreen, width,
|
||||||
height, pDst->depth );
|
height, pDst->depth );
|
||||||
|
@ -456,24 +422,9 @@ PclCopyPlane(DrawablePtr pSrc,
|
||||||
scratchGC = GetScratchGC( pDst->depth, pDst->pScreen );
|
scratchGC = GetScratchGC( pDst->depth, pDst->pScreen );
|
||||||
CopyGC( pGC, scratchGC, ~0L );
|
CopyGC( pGC, scratchGC, ~0L );
|
||||||
|
|
||||||
if( pDst->depth == 1 )
|
fbValidateGC( scratchGC, ~0L, (DrawablePtr)scratchPix );
|
||||||
{
|
fbCopyPlane( pSrc, (DrawablePtr)scratchPix, scratchGC,
|
||||||
mfbValidateGC( scratchGC, ~0L, (DrawablePtr)scratchPix );
|
srcx, srcy, width, height, 0, 0, plane );
|
||||||
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 );
|
|
||||||
}
|
|
||||||
|
|
||||||
reg = PclCopyArea( (DrawablePtr)scratchPix, pDst, pGC, 0, 0, width,
|
reg = PclCopyArea( (DrawablePtr)scratchPix, pDst, pGC, 0, 0, width,
|
||||||
height, dstx, dsty );
|
height, dstx, dsty );
|
||||||
|
|
|
@ -64,7 +64,7 @@ copyright holders.
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
|
||||||
#include "Pcl.h"
|
#include "Pcl.h"
|
||||||
#include "cfb.h"
|
#include "fb.h"
|
||||||
|
|
||||||
static void lookup(unsigned char *src,
|
static void lookup(unsigned char *src,
|
||||||
unsigned char *dst,
|
unsigned char *dst,
|
||||||
|
@ -80,10 +80,10 @@ static void trilinear(unsigned char *p,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This seems to be (and is) a duplication of effort; one would think
|
* 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
|
* only change made in this function is that the black and white pixels
|
||||||
* are allocated with three separate variables for red, green and blue
|
* 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
|
* single variable leads to the one value being corrected by
|
||||||
* ResolveColor three times, which leads to incorrect colors.
|
* ResolveColor three times, which leads to incorrect colors.
|
||||||
*/
|
*/
|
||||||
|
@ -137,7 +137,7 @@ PclCreateColormap(ColormapPtr pColor)
|
||||||
/*
|
/*
|
||||||
* Use existing code to initialize the values in the colormap
|
* 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
|
* Set up the mapping between the color map and the context
|
||||||
|
|
|
@ -56,9 +56,7 @@ copyright holders.
|
||||||
#include "pixmapstr.h"
|
#include "pixmapstr.h"
|
||||||
#include "colormapst.h"
|
#include "colormapst.h"
|
||||||
#include "windowstr.h"
|
#include "windowstr.h"
|
||||||
#include "cfb.h"
|
#include "fb.h"
|
||||||
#include "cfb32.h"
|
|
||||||
#include "migc.h"
|
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
|
||||||
|
@ -106,22 +104,8 @@ static GCFuncs PclGCFuncs =
|
||||||
Bool
|
Bool
|
||||||
PclCreateGC(GCPtr pGC)
|
PclCreateGC(GCPtr pGC)
|
||||||
{
|
{
|
||||||
if( pGC->depth == 1 )
|
if (fbCreateGC(pGC) == FALSE)
|
||||||
{
|
return FALSE;
|
||||||
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;
|
|
||||||
|
|
||||||
pGC->clientClip = NULL;
|
pGC->clientClip = NULL;
|
||||||
pGC->clientClipType = CT_NONE;
|
pGC->clientClipType = CT_NONE;
|
||||||
|
@ -135,7 +119,7 @@ PclCreateGC(GCPtr pGC)
|
||||||
void
|
void
|
||||||
PclDestroyGC(GCPtr pGC)
|
PclDestroyGC(GCPtr pGC)
|
||||||
{
|
{
|
||||||
/* Handle the mfb and cfb, which share a GC private struct */
|
/* fb doesn't specialize DestroyGC */
|
||||||
miDestroyGC( pGC );
|
miDestroyGC( pGC );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -655,34 +639,12 @@ PclUpdateDrawableGC(
|
||||||
h = pGC->tile.pixmap->drawable.height;
|
h = pGC->tile.pixmap->drawable.height;
|
||||||
w = pGC->tile.pixmap->drawable.width;
|
w = pGC->tile.pixmap->drawable.width;
|
||||||
|
|
||||||
if( pGC->tile.pixmap->drawable.depth == 1 )
|
sz = h * PixmapBytePad(w, pGC->tile.pixmap->drawable.depth);
|
||||||
{
|
bits = (char *)xalloc(sz);
|
||||||
sz = h * BitmapBytePad( w );
|
fbGetImage(&(pGC->tile.pixmap->drawable), 0, 0, w, h, XYPixmap, ~0,
|
||||||
|
bits);
|
||||||
bits = (char *)xalloc( sz );
|
PclSendPattern( bits, sz, 1, h, w, 100, *outFile );
|
||||||
mfbGetImage(&(pGC->tile.pixmap->drawable), 0, 0, w, h, XYPixmap, ~0, bits);
|
xfree( 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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( changeMask & ( GCTileStipXOrigin | GCTileStipYOrigin ) )
|
if( changeMask & ( GCTileStipXOrigin | GCTileStipYOrigin ) )
|
||||||
|
@ -717,7 +679,7 @@ PclUpdateDrawableGC(
|
||||||
sz = h * BitmapBytePad( w );
|
sz = h * BitmapBytePad( w );
|
||||||
|
|
||||||
bits = (char *)xalloc( sz );
|
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 );
|
w2 = ( w / 8 ) + ( ( w%8 ) ? 1 : 0 );
|
||||||
/*
|
/*
|
||||||
|
@ -756,36 +718,11 @@ PclUpdateDrawableGC(
|
||||||
scratchGC = GetScratchGC( pGC->depth, pGC->pScreen );
|
scratchGC = GetScratchGC( pGC->depth, pGC->pScreen );
|
||||||
CopyGC( pGC, scratchGC, ~0L );
|
CopyGC( pGC, scratchGC, ~0L );
|
||||||
|
|
||||||
if( pGC->depth == 1 )
|
fbValidateGC(scratchGC, ~0L, (DrawablePtr)scratchPix);
|
||||||
{
|
fbCopyPlane(&(pGC->stipple->drawable), (DrawablePtr)scratchPix,
|
||||||
mfbValidateGC( scratchGC, ~0L,
|
scratchGC, 0, 0, w, h, 0, 0, 1);
|
||||||
(DrawablePtr)scratchPix );
|
fbGetImage(&(scratchPix->drawable), 0, 0, w, h, XYPixmap, ~0,
|
||||||
mfbCopyPlane( &(pGC->stipple->drawable),
|
bits);
|
||||||
(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
|
|
||||||
}
|
|
||||||
PclSendPattern( bits, sz, pGC->depth, h, w, 101, *outFile );
|
PclSendPattern( bits, sz, pGC->depth, h, w, 101, *outFile );
|
||||||
FreeScratchGC( scratchGC );
|
FreeScratchGC( scratchGC );
|
||||||
(*pGC->pScreen->DestroyPixmap)( scratchPix );
|
(*pGC->pScreen->DestroyPixmap)( scratchPix );
|
||||||
|
@ -994,18 +931,7 @@ PclValidateGC(
|
||||||
*/
|
*/
|
||||||
if( pDrawable->type == DRAWABLE_PIXMAP )
|
if( pDrawable->type == DRAWABLE_PIXMAP )
|
||||||
{
|
{
|
||||||
if( pDrawable->depth == 1 )
|
fbValidateGC(pGC, ~0, pDrawable);
|
||||||
{
|
|
||||||
mfbValidateGC( pGC, ~0, pDrawable );
|
|
||||||
}
|
|
||||||
else if( pDrawable->depth <= 32 )
|
|
||||||
{
|
|
||||||
#if PSZ == 8
|
|
||||||
cfbValidateGC( pGC, ~0, pDrawable );
|
|
||||||
#else
|
|
||||||
cfb32ValidateGC( pGC, ~0, pDrawable );
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ copyright holders.
|
||||||
|
|
||||||
#include "Pcl.h"
|
#include "Pcl.h"
|
||||||
|
|
||||||
#include "cfb.h"
|
#include "fb.h"
|
||||||
#include <X11/Xos.h> /* for unlink() */
|
#include <X11/Xos.h> /* for unlink() */
|
||||||
|
|
||||||
#include "attributes.h"
|
#include "attributes.h"
|
||||||
|
@ -200,18 +200,16 @@ InitializePclDriver(
|
||||||
maxRes = MAX( xRes, yRes );
|
maxRes = MAX( xRes, yRes );
|
||||||
|
|
||||||
#ifdef XP_PCL_COLOR
|
#ifdef XP_PCL_COLOR
|
||||||
cfbScreenInit( pScreen, NULL, maxDim, maxDim, maxRes, maxRes,
|
fbScreenInit( pScreen, NULL, maxDim, maxDim, maxRes, maxRes,
|
||||||
maxRes );
|
maxRes, 8 ); /* XXX what's the depth here? */
|
||||||
/*
|
/* Clean up the fields that we stomp (code taken from fbCloseScreen) */
|
||||||
* Clean up the fields that we stomp (code taken from cfbCloseScreen)
|
|
||||||
*/
|
|
||||||
for( i = 0; (int) i < pScreen->numDepths; i++ )
|
for( i = 0; (int) i < pScreen->numDepths; i++ )
|
||||||
xfree( pScreen->allowedDepths[i].vids );
|
xfree( pScreen->allowedDepths[i].vids );
|
||||||
xfree( pScreen->allowedDepths );
|
xfree( pScreen->allowedDepths );
|
||||||
xfree( pScreen->visuals );
|
xfree( pScreen->visuals );
|
||||||
#else
|
#else
|
||||||
mfbScreenInit( pScreen, NULL, maxDim, maxDim, maxRes, maxRes,
|
fbScreenInit( pScreen, NULL, maxDim, maxDim, maxRes, maxRes,
|
||||||
maxRes );
|
maxRes, 1 );
|
||||||
#endif /* XP_PCL_COLOR */
|
#endif /* XP_PCL_COLOR */
|
||||||
|
|
||||||
miInitializeBackingStore ( pScreen );
|
miInitializeBackingStore ( pScreen );
|
||||||
|
@ -241,8 +239,8 @@ InitializePclDriver(
|
||||||
pScreen->PaintWindowBorder = PclPaintWindow;
|
pScreen->PaintWindowBorder = PclPaintWindow;
|
||||||
pScreen->CopyWindow = PclCopyWindow; /* XXX Hard routine to write! */
|
pScreen->CopyWindow = PclCopyWindow; /* XXX Hard routine to write! */
|
||||||
|
|
||||||
pScreen->CreatePixmap = PclCreatePixmap;
|
pScreen->CreatePixmap = fbCreatePixmap;
|
||||||
pScreen->DestroyPixmap = PclDestroyPixmap;
|
pScreen->DestroyPixmap = fbDestroyPixmap;
|
||||||
pScreen->RealizeFont = PclRealizeFont;
|
pScreen->RealizeFont = PclRealizeFont;
|
||||||
pScreen->UnrealizeFont = PclUnrealizeFont;
|
pScreen->UnrealizeFont = PclUnrealizeFont;
|
||||||
pScreen->CreateGC = PclCreateGC;
|
pScreen->CreateGC = PclCreateGC;
|
||||||
|
@ -257,7 +255,7 @@ InitializePclDriver(
|
||||||
pScreen->ResolveColor = PclResolveColor;
|
pScreen->ResolveColor = PclResolveColor;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pScreen->BitmapToRegion = mfbPixmapToRegion;
|
pScreen->BitmapToRegion = fbPixmapToRegion;
|
||||||
|
|
||||||
pScreen->ConstrainCursor = PclConstrainCursor;
|
pScreen->ConstrainCursor = PclConstrainCursor;
|
||||||
pScreen->CursorLimits = PclCursorLimits;
|
pScreen->CursorLimits = PclCursorLimits;
|
||||||
|
|
|
@ -89,7 +89,7 @@ in this Software without prior written authorization from The Open Group.
|
||||||
#include "mi.h"
|
#include "mi.h"
|
||||||
#include "micmap.h"
|
#include "micmap.h"
|
||||||
#include "AttrValid.h"
|
#include "AttrValid.h"
|
||||||
#include "mfb.h"
|
#include "fb.h"
|
||||||
|
|
||||||
#include "windowstr.h"
|
#include "windowstr.h"
|
||||||
#include "DiPrint.h"
|
#include "DiPrint.h"
|
||||||
|
@ -194,7 +194,7 @@ InitializePsDriver(ndx, pScreen, argc, argv)
|
||||||
pScreen->StoreColors = PsStoreColors;
|
pScreen->StoreColors = PsStoreColors;
|
||||||
pScreen->ResolveColor = PsResolveColor;
|
pScreen->ResolveColor = PsResolveColor;
|
||||||
/* Will BitmapToRegion make any difference at all? */
|
/* Will BitmapToRegion make any difference at all? */
|
||||||
pScreen->BitmapToRegion = mfbPixmapToRegion;
|
pScreen->BitmapToRegion = fbPixmapToRegion;
|
||||||
|
|
||||||
visuals = (VisualPtr) xalloc(16*sizeof(VisualRec));
|
visuals = (VisualPtr) xalloc(16*sizeof(VisualRec));
|
||||||
depths = (DepthPtr) xalloc(16*sizeof(DepthRec));
|
depths = (DepthPtr) xalloc(16*sizeof(DepthRec));
|
||||||
|
|
|
@ -74,7 +74,7 @@ copyright holders.
|
||||||
#include "windowstr.h"
|
#include "windowstr.h"
|
||||||
#include "propertyst.h"
|
#include "propertyst.h"
|
||||||
#include "servermd.h" /* needed for IMAGE_BUFSIZE */
|
#include "servermd.h" /* needed for IMAGE_BUFSIZE */
|
||||||
#include "mfb.h"
|
#include "fb.h"
|
||||||
#include "mi.h"
|
#include "mi.h"
|
||||||
|
|
||||||
#include <X11/extensions/Print.h>
|
#include <X11/extensions/Print.h>
|
||||||
|
@ -222,21 +222,14 @@ InitializeRasterDriver(
|
||||||
/*
|
/*
|
||||||
* Have to allocate maxDim X maxDim to allow for landscape mode.
|
* Have to allocate maxDim X maxDim to allow for landscape mode.
|
||||||
*/
|
*/
|
||||||
mfbScreenInit(pScreen, pPriv->pBits, maxDim, maxDim, maxRes,
|
fbScreenInit(pScreen, pPriv->pBits, maxDim, maxDim, maxRes,
|
||||||
maxRes, maxDim);
|
maxRes, maxDim, 1);
|
||||||
miInitializeBackingStore(pScreen);
|
miInitializeBackingStore(pScreen);
|
||||||
pScreen->blackPixel = 1;
|
pScreen->blackPixel = 1;
|
||||||
pScreen->whitePixel = 0;
|
pScreen->whitePixel = 0;
|
||||||
if(mfbCreateDefColormap(pScreen) == FALSE)
|
if(fbCreateDefColormap(pScreen) == FALSE)
|
||||||
; /* XXX what do I do if it fails? */
|
; /* 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;
|
pScreen->SaveScreen = (SaveScreenProcPtr)_XpBoolNoop;
|
||||||
pPriv->ChangeWindowAttributes = pScreen->ChangeWindowAttributes;
|
pPriv->ChangeWindowAttributes = pScreen->ChangeWindowAttributes;
|
||||||
pScreen->ChangeWindowAttributes = RasterChangeWindowAttributes;
|
pScreen->ChangeWindowAttributes = RasterChangeWindowAttributes;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user