diff options
Diffstat (limited to 'mi')
-rw-r--r-- | mi/mibitblt.c | 4 | ||||
-rw-r--r-- | mi/migc.c | 70 | ||||
-rw-r--r-- | mi/migc.h | 16 |
3 files changed, 1 insertions, 89 deletions
diff --git a/mi/mibitblt.c b/mi/mibitblt.c index 2dfff1451..d701e0e9e 100644 --- a/mi/mibitblt.c +++ b/mi/mibitblt.c @@ -443,7 +443,7 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc, prgnSrcClip = RegionCreate(NULL, 0); RegionCopy(prgnSrcClip, prgnSrc); RegionTranslate(prgnSrcClip, srcx, 0); - (*pGCT->funcs->ChangeClip)(pGCT, CT_REGION, prgnSrcClip, 0); + ChangeClip(pGCT, CT_REGION, prgnSrcClip, 0); ValidateGC((DrawablePtr)pPixmap, pGCT); /* Since we know pDraw is always a pixmap, we never need to think @@ -527,8 +527,6 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc, GCTileStipXOrigin | GCTileStipYOrigin, gcv); ValidateGC(pDraw, pGC); - /* put what we hope is a smaller clip region back in the scratch gc */ - (*pGCT->funcs->ChangeClip)(pGCT, CT_NONE, NULL, 0); FreeScratchGC(pGCT); (*pDraw->pScreen->DestroyPixmap)(pPixmap); @@ -53,76 +53,6 @@ miDestroyGC(GCPtr pGC) RegionDestroy(pGC->pCompositeClip); } -void -miDestroyClip(GCPtr pGC) -{ - if (pGC->clientClipType == CT_NONE) - return; - else if (pGC->clientClipType == CT_PIXMAP) - { - (*pGC->pScreen->DestroyPixmap) ((PixmapPtr) (pGC->clientClip)); - } - else - { - /* - * we know we'll never have a list of rectangles, since ChangeClip - * immediately turns them into a region - */ - RegionDestroy(pGC->clientClip); - } - pGC->clientClip = NULL; - pGC->clientClipType = CT_NONE; -} - -void -miChangeClip( GCPtr pGC, int type, pointer pvalue, int nrects) -{ - (*pGC->funcs->DestroyClip) (pGC); - if (type == CT_PIXMAP) - { - /* convert the pixmap to a region */ - pGC->clientClip = (pointer) BitmapToRegion(pGC->pScreen, - (PixmapPtr) pvalue); - (*pGC->pScreen->DestroyPixmap) (pvalue); - } - else if (type == CT_REGION) - { - /* stuff the region in the GC */ - pGC->clientClip = pvalue; - } - else if (type != CT_NONE) - { - pGC->clientClip = (pointer) RegionFromRects(nrects, - (xRectangle *) pvalue, - type); - free(pvalue); - } - pGC->clientClipType = (type != CT_NONE && pGC->clientClip) ? CT_REGION : CT_NONE; - pGC->stateChanges |= GCClipMask; -} - -void -miCopyClip(GCPtr pgcDst, GCPtr pgcSrc) -{ - RegionPtr prgnNew; - - switch (pgcSrc->clientClipType) - { - case CT_PIXMAP: - ((PixmapPtr) pgcSrc->clientClip)->refcnt++; - /* Fall through !! */ - case CT_NONE: - (*pgcDst->funcs->ChangeClip) (pgcDst, (int) pgcSrc->clientClipType, - pgcSrc->clientClip, 0); - break; - case CT_REGION: - prgnNew = RegionCreate(NULL, 1); - RegionCopy(prgnNew, (RegionPtr) (pgcSrc->clientClip)); - (*pgcDst->funcs->ChangeClip) (pgcDst, CT_REGION, (pointer) prgnNew, 0); - break; - } -} - /* ARGSUSED */ void miCopyGC(GCPtr pGCSrc, unsigned long changes, GCPtr pGCDst) @@ -36,22 +36,6 @@ extern _X_EXPORT void miDestroyGC( GCPtr /*pGC*/ ); -extern _X_EXPORT void miDestroyClip( - GCPtr /*pGC*/ -); - -extern _X_EXPORT void miChangeClip( - GCPtr /*pGC*/, - int /*type*/, - pointer /*pvalue*/, - int /*nrects*/ -); - -extern _X_EXPORT void miCopyClip( - GCPtr /*pgcDst*/, - GCPtr /*pgcSrc*/ -); - extern _X_EXPORT void miCopyGC( GCPtr /*pGCSrc*/, unsigned long /*changes*/, |