ret = cfb8BitBlt (pSrcDrawable, pDstDrawable,
ret = cfb8CopyPlaneReduce (pSrcDrawable, pDstDrawable,
RegionPtr amiga8GXCopyPlane(pSrcDrawable, pDstDrawable,			    pGC, srcx, srcy, width, height, dstx, dsty, 			    bitPlane)    DrawablePtr 	pSrcDrawable;    DrawablePtr		pDstDrawable;    GCPtr		pGC;    int 		srcx, srcy;    int 		width, height;    int 		dstx, dsty;    unsigned long	bitPlane;{    RegionPtr		ret;    int			(*doBitBlt)();__dolog("amigaGXCopyPlane: s(%d) -> d(%d), plane = %d\n",	pSrcDrawable->bitsPerPixel, pDstDrawable->bitsPerPixel, bitPlane);    if (pDstDrawable->type != DRAWABLE_WINDOW)      return cfb8CopyPlane(pSrcDrawable, pDstDrawable,			  pGC, srcx, srcy, width, height,			  dstx, dsty, bitPlane);    if (pSrcDrawable->bitsPerPixel == 1 && pDstDrawable->bitsPerPixel == 8)    {    	if (bitPlane == 1)	{	    copyPlaneFG = pGC->fgPixel;	    copyPlaneBG = pGC->bgPixel;    	    ret = cfb8BitBlt (pSrcDrawable, pDstDrawable,	    	    pGC, srcx, srcy, width, height, dstx, dsty, amigaGXCopyPlane1to8, bitPlane);	}	else	    ret = miHandleExposures (pSrcDrawable, pDstDrawable,	    	pGC, srcx, srcy, width, height, dstx, dsty, bitPlane);    }    else if (pSrcDrawable->bitsPerPixel == 8 && pDstDrawable->bitsPerPixel == 1)    {	extern	int InverseAlu[16];	int oldalu;	oldalu = pGC->alu;    	if ((pGC->fgPixel & 1) == 0 && (pGC->bgPixel&1) == 1)	    pGC->alu = InverseAlu[pGC->alu];    	else if ((pGC->fgPixel & 1) == (pGC->bgPixel & 1))	    pGC->alu = mfbReduceRop(pGC->alu, pGC->fgPixel);	ret = cfb8BitBlt (pSrcDrawable, pDstDrawable,		    pGC, srcx, srcy, width, height, dstx, dsty, cfb8CopyPlane8to1, bitPlane);	pGC->alu = oldalu;    }    else    {	PixmapPtr	pBitmap;	ScreenPtr	pScreen = pSrcDrawable->pScreen;	GCPtr		pGC1;	unsigned long	fg, bg;	pBitmap = (*pScreen->CreatePixmap) (pScreen, width, height, 1);	if (!pBitmap)	    return NULL;	pGC1 = GetScratchGC (1, pScreen);	if (!pGC1)	{	    (*pScreen->DestroyPixmap) (pBitmap);	    return NULL;	}	/*	 * don't need to set pGC->fgPixel,bgPixel as copyPlane8to1	 * ignores pixel values, expecting the rop to "do the	 * right thing", which GXcopy will.	 */	ValidateGC ((DrawablePtr) pBitmap, pGC1);	/* no exposures here, scratch GC's don't get graphics expose */	(void) cfb8BitBlt (pSrcDrawable, (DrawablePtr) pBitmap,			  pGC1, srcx, srcy, width, height, 0, 0, 			  cfb8CopyPlane8to1, bitPlane);	copyPlaneFG = pGC->fgPixel;	copyPlaneBG = pGC->bgPixel;	(void) cfb8BitBlt ((DrawablePtr) pBitmap, pDstDrawable, pGC,			  0, 0, width, height, dstx, dsty, 			  amigaGXCopyPlane1to8, 1);	FreeScratchGC (pGC1);	(*pScreen->DestroyPixmap) (pBitmap);	/* compute resultant exposures */	ret = miHandleExposures (pSrcDrawable, pDstDrawable, pGC,				 srcx, srcy, width, height,				 dstx, dsty, bitPlane);    }    return ret;}