diff options
Diffstat (limited to 'mfb/mfbgc.c')
-rw-r--r-- | mfb/mfbgc.c | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/mfb/mfbgc.c b/mfb/mfbgc.c index 8ab76ad37..314af0b4a 100644 --- a/mfb/mfbgc.c +++ b/mfb/mfbgc.c @@ -1,3 +1,4 @@ +/* $XFree86: xc/programs/Xserver/mfb/mfbgc.c,v 1.8 2003/02/18 21:30:01 tsi Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -735,10 +736,10 @@ mfbCreateGC(pGC) pPriv = (mfbPrivGC *)(pGC->devPrivates[mfbGCPrivateIndex].ptr); pPriv->rop = mfbReduceRop(pGC->alu, pGC->fgPixel); - pPriv->fExpose = TRUE; - pPriv->pRotatedPixmap = NullPixmap; - pPriv->freeCompClip = FALSE; - pPriv->FillArea = mfbSolidWhiteArea; + pGC->fExpose = TRUE; + pGC->pRotatedPixmap = NullPixmap; + pGC->freeCompClip = FALSE; + pPriv->FillArea = mfbSolidInvertArea; return TRUE; } @@ -909,7 +910,7 @@ mfbValidateGC(pGC, changes, pDrawable) !(pGC->tile.pixmap->drawable.width & (pGC->tile.pixmap->drawable.width - 1))) { mfbCopyRotatePixmap(pGC->tile.pixmap, - &devPriv->pRotatedPixmap, xrot, yrot); + &pGC->pRotatedPixmap, xrot, yrot); new_pix = TRUE; } break; @@ -919,15 +920,15 @@ mfbValidateGC(pGC, changes, pDrawable) !(pGC->stipple->drawable.width & (pGC->stipple->drawable.width - 1))) { mfbCopyRotatePixmap(pGC->stipple, - &devPriv->pRotatedPixmap, xrot, yrot); + &pGC->pRotatedPixmap, xrot, yrot); new_pix = TRUE; } } /* destroy any previously rotated tile or stipple */ - if (!new_pix && devPriv->pRotatedPixmap) + if (!new_pix && pGC->pRotatedPixmap) { - (*pDrawable->pScreen->DestroyPixmap)(devPriv->pRotatedPixmap); - devPriv->pRotatedPixmap = (PixmapPtr)NULL; + (*pDrawable->pScreen->DestroyPixmap)(pGC->pRotatedPixmap); + pGC->pRotatedPixmap = (PixmapPtr)NULL; } } @@ -981,7 +982,7 @@ mfbValidateGC(pGC, changes, pDrawable) { GCOps *newops; - if (newops = matchCommon (pGC)) + if ((newops = matchCommon (pGC))) { if (pGC->ops->devPrivate.val) miDestroyGCOps (pGC->ops); @@ -1151,11 +1152,11 @@ mfbValidateGC(pGC, changes, pDrawable) /* beyond this point, opaqueStippled ==> fg != bg */ else if (((pGC->fillStyle == FillTiled) || (pGC->fillStyle == FillOpaqueStippled)) && - !devPriv->pRotatedPixmap) + !pGC->pRotatedPixmap) { pGC->ops->FillSpans = mfbUnnaturalTileFS; } - else if ((pGC->fillStyle == FillStippled) && !devPriv->pRotatedPixmap) + else if ((pGC->fillStyle == FillStippled) && !pGC->pRotatedPixmap) { pGC->ops->FillSpans = mfbUnnaturalStippleFS; } @@ -1190,7 +1191,7 @@ mfbValidateGC(pGC, changes, pDrawable) */ if ((((pGC->fillStyle == FillTiled) || (pGC->fillStyle == FillStippled)) && - !devPriv->pRotatedPixmap) || + !pGC->pRotatedPixmap) || ((pGC->fillStyle == FillOpaqueStippled) && ((pGC->fgPixel & 1) != (pGC->bgPixel & 1))) ) @@ -1217,7 +1218,7 @@ mfbValidateGC(pGC, changes, pDrawable) devPriv->FillArea = mfbSolidInvertArea; break; case RROP_NOP: - devPriv->FillArea = (void (*)())NoopDDA; + devPriv->FillArea = (mfbFillAreaProcPtr)NoopDDA; break; } } @@ -1235,7 +1236,7 @@ mfbValidateGC(pGC, changes, pDrawable) devPriv->FillArea = mfbStippleInvertArea; break; case RROP_NOP: - devPriv->FillArea = (void (*)())NoopDDA; + devPriv->FillArea = (mfbFillAreaProcPtr)NoopDDA; break; } } @@ -1288,11 +1289,11 @@ mfbValidateGC(pGC, changes, pDrawable) /* beyond this point, opaqueStippled ==> fg != bg */ else if (((pGC->fillStyle == FillTiled) || (pGC->fillStyle == FillOpaqueStippled)) && - !devPriv->pRotatedPixmap) + !pGC->pRotatedPixmap) { pGC->ops->FillSpans = mfbUnnaturalTileFS; } - else if ((pGC->fillStyle == FillStippled) && !devPriv->pRotatedPixmap) + else if ((pGC->fillStyle == FillStippled) && !pGC->pRotatedPixmap) { pGC->ops->FillSpans = mfbUnnaturalStippleFS; } @@ -1321,7 +1322,7 @@ mfbValidateGC(pGC, changes, pDrawable) */ if ((((pGC->fillStyle == FillTiled) || (pGC->fillStyle == FillStippled)) && - !devPriv->pRotatedPixmap) || + !pGC->pRotatedPixmap) || ((pGC->fillStyle == FillOpaqueStippled) && ((pGC->fgPixel & 1) != (pGC->bgPixel & 1))) ) @@ -1348,7 +1349,7 @@ mfbValidateGC(pGC, changes, pDrawable) devPriv->FillArea = mfbSolidInvertArea; break; case RROP_NOP: - devPriv->FillArea = (void (*)())NoopDDA; + devPriv->FillArea = (mfbFillAreaProcPtr)NoopDDA; break; } } @@ -1366,7 +1367,7 @@ mfbValidateGC(pGC, changes, pDrawable) devPriv->FillArea = mfbStippleInvertArea; break; case RROP_NOP: - devPriv->FillArea = (void (*)())NoopDDA; + devPriv->FillArea = (mfbFillAreaProcPtr)NoopDDA; break; } } @@ -1414,7 +1415,7 @@ mfbReduceRop(alu, src) register int alu; register Pixel src; { - int rop; + int rop = 0; if ((src & 1) == 0) /* src is black */ { switch(alu) |