diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2007-11-05 19:08:36 -0500 |
---|---|---|
committer | Eamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil> | 2007-11-05 19:08:36 -0500 |
commit | a52c9b2a59f27266557ff9d5d2c08492e04135a6 (patch) | |
tree | 705f11c54e8a31a07dde9ab6835032e2849e132b /cfb | |
parent | c7e18beb3c87eb1ada9b21c4ffacd11c1939c087 (diff) | |
parent | 58332894c061ae96d6a457f65266660f5f65e88b (diff) |
Merge branch 'master' into XACE-SELINUX
Conflicts:
dix/dispatch.c
dix/property.c
hw/xfree86/common/xf86VidMode.c
include/xkbsrv.h
render/glyph.c
xkb/xkbActions.c
Diffstat (limited to 'cfb')
-rw-r--r-- | cfb/cfb.h | 3 | ||||
-rw-r--r-- | cfb/cfbbitblt.c | 11 | ||||
-rw-r--r-- | cfb/cfbblt.c | 26 | ||||
-rw-r--r-- | cfb/cfbfillrct.c | 4 | ||||
-rw-r--r-- | cfb/cfbfillsp.c | 60 | ||||
-rw-r--r-- | cfb/cfbglblt8.c | 4 | ||||
-rw-r--r-- | cfb/cfbpixmap.c | 13 | ||||
-rw-r--r-- | cfb/cfbsolid.c | 12 | ||||
-rw-r--r-- | cfb/cfbtile32.c | 12 | ||||
-rw-r--r-- | cfb/cfbwindow.c | 4 |
10 files changed, 76 insertions, 73 deletions
@@ -738,7 +738,8 @@ extern PixmapPtr cfbCreatePixmap( ScreenPtr /*pScreen*/, int /*width*/, int /*height*/, - int /*depth*/ + int /*depth*/, + unsigned /*usage_hint*/ ); extern Bool cfbDestroyPixmap( diff --git a/cfb/cfbbitblt.c b/cfb/cfbbitblt.c index faf49b92d..00bf41367 100644 --- a/cfb/cfbbitblt.c +++ b/cfb/cfbbitblt.c @@ -296,7 +296,7 @@ cfbBitBlt ( numRects = REGION_NUM_RECTS(&rgnDst); if (numRects && width && height) { - if(!(pptSrc = (DDXPointPtr)ALLOCATE_LOCAL(numRects * + if(!(pptSrc = (DDXPointPtr)xalloc(numRects * sizeof(DDXPointRec)))) { REGION_UNINIT(pGC->pScreen, &rgnDst); @@ -313,7 +313,7 @@ cfbBitBlt ( } (*doBitBlt) (pSrcDrawable, pDstDrawable, pGC->alu, &rgnDst, pptSrc, pGC->planemask); - DEALLOCATE_LOCAL(pptSrc); + xfree(pptSrc); } prgnExposed = NULL; @@ -559,7 +559,7 @@ cfbCopyPlaneReduce ( numRects = REGION_NUM_RECTS(&rgnDst); if (numRects && width && height) { - if(!(pptSrc = (DDXPointPtr)ALLOCATE_LOCAL(numRects * + if(!(pptSrc = (DDXPointPtr)xalloc(numRects * sizeof(DDXPointRec)))) { REGION_UNINIT(pGC->pScreen, &rgnDst); @@ -576,7 +576,7 @@ cfbCopyPlaneReduce ( } (*doCopyPlane) (pSrcDrawable, pDstDrawable, pGC->alu, &rgnDst, pptSrc, pGC->planemask, bitPlane); - DEALLOCATE_LOCAL(pptSrc); + xfree(pptSrc); } prgnExposed = NULL; @@ -1407,7 +1407,8 @@ RegionPtr cfbCopyPlane(pSrcDrawable, pDstDrawable, ScreenPtr pScreen = pSrcDrawable->pScreen; GCPtr pGC1; - pBitmap = (*pScreen->CreatePixmap) (pScreen, width, height, 1); + pBitmap = (*pScreen->CreatePixmap) (pScreen, width, height, 1, + CREATE_PIXMAP_USAGE_SCRATCH); if (!pBitmap) return NULL; pGC1 = GetScratchGC (1, pScreen); diff --git a/cfb/cfbblt.c b/cfb/cfbblt.c index 1e577f526..ff34589ff 100644 --- a/cfb/cfbblt.c +++ b/cfb/cfbblt.c @@ -207,13 +207,13 @@ MROP_NAME(cfbDoBitblt)( if (nbox > 1) { /* keep ordering in each band, reverse order of bands */ - pboxNew1 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec) * nbox); + pboxNew1 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox); if(!pboxNew1) return; - pptNew1 = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * nbox); + pptNew1 = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * nbox); if(!pptNew1) { - DEALLOCATE_LOCAL(pboxNew1); + xfree(pboxNew1); return; } pboxBase = pboxNext = pbox+nbox-1; @@ -251,16 +251,16 @@ MROP_NAME(cfbDoBitblt)( if (nbox > 1) { /* reverse order of rects in each band */ - pboxNew2 = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec) * nbox); - pptNew2 = (DDXPointPtr)ALLOCATE_LOCAL(sizeof(DDXPointRec) * nbox); + pboxNew2 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox); + pptNew2 = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * nbox); if(!pboxNew2 || !pptNew2) { - if (pptNew2) DEALLOCATE_LOCAL(pptNew2); - if (pboxNew2) DEALLOCATE_LOCAL(pboxNew2); + if (pptNew2) xfree(pptNew2); + if (pboxNew2) xfree(pboxNew2); if (pboxNew1) { - DEALLOCATE_LOCAL(pptNew1); - DEALLOCATE_LOCAL(pboxNew1); + xfree(pptNew1); + xfree(pboxNew1); } return; } @@ -922,12 +922,12 @@ bits1 = *--psrc; --pdst; \ } if (pboxNew2) { - DEALLOCATE_LOCAL(pptNew2); - DEALLOCATE_LOCAL(pboxNew2); + xfree(pptNew2); + xfree(pboxNew2); } if (pboxNew1) { - DEALLOCATE_LOCAL(pptNew1); - DEALLOCATE_LOCAL(pboxNew1); + xfree(pptNew1); + xfree(pboxNew1); } } diff --git a/cfb/cfbfillrct.c b/cfb/cfbfillrct.c index 4c78c24b3..fc2d31bdc 100644 --- a/cfb/cfbfillrct.c +++ b/cfb/cfbfillrct.c @@ -196,7 +196,7 @@ cfbPolyFillRect(pDrawable, pGC, nrectFill, prectInit) numRects = REGION_NUM_RECTS(prgnClip) * nrectFill; if (numRects > NUM_STACK_RECTS) { - pboxClippedBase = (BoxPtr)ALLOCATE_LOCAL(numRects * sizeof(BoxRec)); + pboxClippedBase = (BoxPtr)xalloc(numRects * sizeof(BoxRec)); if (!pboxClippedBase) return; } @@ -301,5 +301,5 @@ cfbPolyFillRect(pDrawable, pGC, nrectFill, prectInit) (*BoxFill) (pDrawable, pGC, pboxClipped-pboxClippedBase, pboxClippedBase); if (pboxClippedBase != stackRects) - DEALLOCATE_LOCAL(pboxClippedBase); + xfree(pboxClippedBase); } diff --git a/cfb/cfbfillsp.c b/cfb/cfbfillsp.c index ddd4f1421..36710b612 100644 --- a/cfb/cfbfillsp.c +++ b/cfb/cfbfillsp.c @@ -186,12 +186,12 @@ int fSorted; n = nInit * miFindMaxBand( cfbGetCompositeClip(pGC) ); if ( n == 0 ) return; - pwidth = (int *)ALLOCATE_LOCAL(n * sizeof(int)); - ppt = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); + pwidth = (int *)xalloc(n * sizeof(int)); + ppt = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec)); if(!ppt || !pwidth) { - if (ppt) DEALLOCATE_LOCAL(ppt); - if (pwidth) DEALLOCATE_LOCAL(pwidth); + if (ppt) xfree(ppt); + if (pwidth) xfree(pwidth); return; } n = miClipSpans( cfbGetCompositeClip(pGC), @@ -203,8 +203,8 @@ int fSorted; (*fill) (pDrawable, n, ppt, pwidth, pGC->tile.pixmap, xrot, yrot, pGC->alu, pGC->planemask); - DEALLOCATE_LOCAL(ppt); - DEALLOCATE_LOCAL(pwidth); + xfree(ppt); + xfree(pwidth); } #if PSZ == 8 @@ -251,12 +251,12 @@ int fSorted; n = nInit * miFindMaxBand( cfbGetCompositeClip(pGC) ); if ( n == 0 ) return; - pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); - pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); + pwidthFree = (int *)xalloc(n * sizeof(int)); + pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec)); if(!pptFree || !pwidthFree) { - if (pptFree) DEALLOCATE_LOCAL(pptFree); - if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); + if (pptFree) xfree(pptFree); + if (pwidthFree) xfree(pwidthFree); return; } @@ -392,8 +392,8 @@ int fSorted; } } } - DEALLOCATE_LOCAL(pptFree); - DEALLOCATE_LOCAL(pwidthFree); + xfree(pptFree); + xfree(pwidthFree); } #else /* PSZ != 8 */ @@ -434,12 +434,12 @@ int fSorted; n = nInit * miFindMaxBand( cfbGetCompositeClip(pGC) ); if ( n == 0 ) return; - pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); - pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); + pwidthFree = (int *)xalloc(n * sizeof(int)); + pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec)); if(!pptFree || !pwidthFree) { - if (pptFree) DEALLOCATE_LOCAL(pptFree); - if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); + if (pptFree) xfree(pptFree); + if (pwidthFree) xfree(pwidthFree); return; } pwidth = pwidthFree; @@ -599,8 +599,8 @@ int fSorted; ppt++; pwidth++; } - DEALLOCATE_LOCAL(pptFree); - DEALLOCATE_LOCAL(pwidthFree); + xfree(pptFree); + xfree(pwidthFree); } #endif /* PSZ == 8 */ @@ -648,12 +648,12 @@ cfb8Stipple32FS (pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) n = nInit * miFindMaxBand(pGC->pCompositeClip); if ( n == 0 ) return; - pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); - pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); + pwidthFree = (int *)xalloc(n * sizeof(int)); + pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec)); if(!pptFree || !pwidthFree) { - if (pptFree) DEALLOCATE_LOCAL(pptFree); - if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); + if (pptFree) xfree(pptFree); + if (pwidthFree) xfree(pwidthFree); return; } pwidth = pwidthFree; @@ -816,8 +816,8 @@ cfb8Stipple32FS (pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) } } } - DEALLOCATE_LOCAL(pptFree); - DEALLOCATE_LOCAL(pwidthFree); + xfree(pptFree); + xfree(pwidthFree); } void @@ -862,12 +862,12 @@ cfb8OpaqueStipple32FS (pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) n = nInit * miFindMaxBand(pGC->pCompositeClip); if ( n == 0 ) return; - pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); - pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); + pwidthFree = (int *)xalloc(n * sizeof(int)); + pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec)); if(!pptFree || !pwidthFree) { - if (pptFree) DEALLOCATE_LOCAL(pptFree); - if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); + if (pptFree) xfree(pptFree); + if (pwidthFree) xfree(pwidthFree); return; } pwidth = pwidthFree; @@ -997,8 +997,8 @@ cfb8OpaqueStipple32FS (pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) } } } - DEALLOCATE_LOCAL(pptFree); - DEALLOCATE_LOCAL(pwidthFree); + xfree(pptFree); + xfree(pwidthFree); } #endif /* PSZ == 8 */ diff --git a/cfb/cfbglblt8.c b/cfb/cfbglblt8.c index c4cba0e15..4d964b35d 100644 --- a/cfb/cfbglblt8.c +++ b/cfb/cfbglblt8.c @@ -355,7 +355,7 @@ cfbPolyGlyphBlt8Clipped( } if (!numRects) return; - clips = (CARD32 *)ALLOCATE_LOCAL ((maxAscent + maxDescent) * + clips = (CARD32 *)xalloc ((maxAscent + maxDescent) * sizeof (CARD32)); while (nglyph--) { @@ -471,7 +471,7 @@ cfbPolyGlyphBlt8Clipped( } } } - DEALLOCATE_LOCAL (clips); + xfree (clips); } #endif /* FOUR_BIT_CODE */ diff --git a/cfb/cfbpixmap.c b/cfb/cfbpixmap.c index 247331c6d..776094c09 100644 --- a/cfb/cfbpixmap.c +++ b/cfb/cfbpixmap.c @@ -65,11 +65,12 @@ SOFTWARE. #include "cfbmskbits.h" PixmapPtr -cfbCreatePixmap (pScreen, width, height, depth) +cfbCreatePixmap (pScreen, width, height, depth, usage_hint) ScreenPtr pScreen; int width; int height; int depth; + unsigned usage_hint; { PixmapPtr pPixmap; size_t datasize; @@ -123,7 +124,7 @@ cfbCopyPixmap(pSrc) size = pSrc->drawable.height * pSrc->devKind; pScreen = pSrc->drawable.pScreen; pDst = (*pScreen->CreatePixmap) (pScreen, pSrc->drawable.width, - pSrc->drawable.height, pSrc->drawable.depth); + pSrc->drawable.height, pSrc->drawable.depth, 0); if (!pDst) return NullPixmap; memmove((char *)pDst->devPrivate.ptr, (char *)pSrc->devPrivate.ptr, size); @@ -270,7 +271,7 @@ cfbXRotatePixmap(pPix, rw) int size, tsize; tsize = PixmapBytePad(pPix->drawable.width - rot, pPix->drawable.depth); - pwTmp = (CfbBits *) ALLOCATE_LOCAL(pPix->drawable.height * tsize); + pwTmp = (CfbBits *) xalloc(pPix->drawable.height * tsize); if (!pwTmp) return; /* divide pw (the pixmap) in two vertically at (w - rot) and swap */ @@ -288,7 +289,7 @@ cfbXRotatePixmap(pPix, rw) 0, 0, rot, 0, (int)pPix->drawable.width - rot, (int)pPix->drawable.height, tsize, size); - DEALLOCATE_LOCAL(pwTmp); + xfree(pwTmp); #endif } } @@ -328,13 +329,13 @@ cfbYRotatePixmap(pPix, rh) nbyDown = rot * pPix->devKind; nbyUp = (pPix->devKind * pPix->drawable.height) - nbyDown; - if(!(ptmp = (char *)ALLOCATE_LOCAL(nbyUp))) + if(!(ptmp = (char *)xalloc(nbyUp))) return; memmove(ptmp, pbase, nbyUp); /* save the low rows */ memmove(pbase, pbase+nbyUp, nbyDown); /* slide the top rows down */ memmove(pbase+nbyDown, ptmp, nbyUp); /* move lower rows up to row rot */ - DEALLOCATE_LOCAL(ptmp); + xfree(ptmp); } void diff --git a/cfb/cfbsolid.c b/cfb/cfbsolid.c index f0da05ef0..6b8238dd9 100644 --- a/cfb/cfbsolid.c +++ b/cfb/cfbsolid.c @@ -811,12 +811,12 @@ RROP_NAME(cfbSolidSpans) (pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) devPriv = cfbGetGCPrivate(pGC); RROP_FETCH_GCPRIV(devPriv) n = nInit * miFindMaxBand(pGC->pCompositeClip); - pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); - pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); + pwidthFree = (int *)xalloc(n * sizeof(int)); + pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec)); if(!pptFree || !pwidthFree) { - if (pptFree) DEALLOCATE_LOCAL(pptFree); - if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); + if (pptFree) xfree(pptFree); + if (pwidthFree) xfree(pwidthFree); return; } pwidth = pwidthFree; @@ -1359,7 +1359,7 @@ RROP_NAME(cfbSolidSpans) (pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) } #endif } - DEALLOCATE_LOCAL(pptFree); - DEALLOCATE_LOCAL(pwidthFree); + xfree(pptFree); + xfree(pwidthFree); RROP_UNDECLARE } diff --git a/cfb/cfbtile32.c b/cfb/cfbtile32.c index 90439adc3..be016a70a 100644 --- a/cfb/cfbtile32.c +++ b/cfb/cfbtile32.c @@ -367,12 +367,12 @@ MROP_NAME(cfbTile32FS)(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) #endif n = nInit * miFindMaxBand( cfbGetCompositeClip(pGC) ); - pwidthFree = (int *)ALLOCATE_LOCAL(n * sizeof(int)); - pptFree = (DDXPointRec *)ALLOCATE_LOCAL(n * sizeof(DDXPointRec)); + pwidthFree = (int *)xalloc(n * sizeof(int)); + pptFree = (DDXPointRec *)xalloc(n * sizeof(DDXPointRec)); if(!pptFree || !pwidthFree) { - if (pptFree) DEALLOCATE_LOCAL(pptFree); - if (pwidthFree) DEALLOCATE_LOCAL(pwidthFree); + if (pptFree) xfree(pptFree); + if (pwidthFree) xfree(pwidthFree); return; } pwidth = pwidthFree; @@ -512,6 +512,6 @@ MROP_NAME(cfbTile32FS)(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) } } } - DEALLOCATE_LOCAL(pptFree); - DEALLOCATE_LOCAL(pwidthFree); + xfree(pptFree); + xfree(pwidthFree); } diff --git a/cfb/cfbwindow.c b/cfb/cfbwindow.c index 2b582d42f..50728764e 100644 --- a/cfb/cfbwindow.c +++ b/cfb/cfbwindow.c @@ -133,7 +133,7 @@ cfbCopyWindow(pWin, ptOldOrg, prgnSrc) pbox = REGION_RECTS(&rgnDst); nbox = REGION_NUM_RECTS(&rgnDst); - if(!nbox || !(pptSrc = (DDXPointPtr )ALLOCATE_LOCAL(nbox * sizeof(DDXPointRec)))) + if(!nbox || !(pptSrc = (DDXPointPtr )xalloc(nbox * sizeof(DDXPointRec)))) { REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); return; @@ -148,7 +148,7 @@ cfbCopyWindow(pWin, ptOldOrg, prgnSrc) cfbDoBitbltCopy((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot, GXcopy, &rgnDst, pptSrc, ~0L); - DEALLOCATE_LOCAL(pptSrc); + xfree(pptSrc); REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); } |