diff options
Diffstat (limited to 'xorg-server/mi/mibitblt.c')
-rw-r--r-- | xorg-server/mi/mibitblt.c | 60 |
1 files changed, 27 insertions, 33 deletions
diff --git a/xorg-server/mi/mibitblt.c b/xorg-server/mi/mibitblt.c index 14d68e2e1..3e82a5592 100644 --- a/xorg-server/mi/mibitblt.c +++ b/xorg-server/mi/mibitblt.c @@ -73,15 +73,16 @@ extern int ffs(int); * set them in the destination with SetSpans * We let SetSpans worry about clipping to the destination. */ -_X_EXPORT RegionPtr -miCopyArea(pSrcDrawable, pDstDrawable, - pGC, xIn, yIn, widthSrc, heightSrc, xOut, yOut) - DrawablePtr pSrcDrawable; - DrawablePtr pDstDrawable; - GCPtr pGC; - int xIn, yIn; - int widthSrc, heightSrc; - int xOut, yOut; +RegionPtr +miCopyArea(DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + int xIn, + int yIn, + int widthSrc, + int heightSrc, + int xOut, + int yOut) { DDXPointPtr ppt, pptFirst; unsigned int *pwidthFirst, *pwidth, *pbits; @@ -316,11 +317,10 @@ miGetPlane( sy += pDraw->y; widthInBytes = BitmapBytePad(w); if(!result) - result = (MiBits *)xalloc(h * widthInBytes); + result = xcalloc(h, widthInBytes); if (!result) return (MiBits *)NULL; bitsPerPixel = pDraw->bitsPerPixel; - bzero((char *)result, h * widthInBytes); pOut = (OUT_TYPE *) result; if(bitsPerPixel == 1) { @@ -548,16 +548,17 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc, * build a source clip * Use the bitmap we've built up as a Stipple for the destination */ -_X_EXPORT RegionPtr -miCopyPlane(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 +miCopyPlane( DrawablePtr pSrcDrawable, + DrawablePtr pDstDrawable, + GCPtr pGC, + int srcx, + int srcy, + int width, + int height, + int dstx, + int dsty, + unsigned long bitPlane) { MiBits *ptile; BoxRec box; @@ -643,12 +644,8 @@ miCopyPlane(pSrcDrawable, pDstDrawable, * get the single plane specified in planemask */ _X_EXPORT void -miGetImage(pDraw, sx, sy, w, h, format, planeMask, pDst) - DrawablePtr pDraw; - int sx, sy, w, h; - unsigned int format; - unsigned long planeMask; - char * pDst; +miGetImage( DrawablePtr pDraw, int sx, int sy, int w, int h, + unsigned int format, unsigned long planeMask, char *pDst) { unsigned char depth; int i, linelength, width, srcx, srcy; @@ -745,12 +742,9 @@ miGetImage(pDraw, sx, sy, w, h, format, planeMask, pDst) * This part is simple, just call SetSpans */ _X_EXPORT void -miPutImage(pDraw, pGC, depth, x, y, w, h, leftPad, format, pImage) - DrawablePtr pDraw; - GCPtr pGC; - int depth, x, y, w, h, leftPad; - int format; - char *pImage; +miPutImage( DrawablePtr pDraw, GCPtr pGC, int depth, + int x, int y, int w, int h, + int leftPad, int format, char *pImage) { DDXPointPtr pptFirst, ppt; int *pwidthFirst, *pwidth; |