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 /hw/xfree86/xf4bpp | |
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 'hw/xfree86/xf4bpp')
-rw-r--r-- | hw/xfree86/xf4bpp/mfbimggblt.c | 4 | ||||
-rw-r--r-- | hw/xfree86/xf4bpp/ppcCpArea.c | 30 | ||||
-rw-r--r-- | hw/xfree86/xf4bpp/ppcFillRct.c | 4 | ||||
-rw-r--r-- | hw/xfree86/xf4bpp/ppcIO.c | 2 | ||||
-rw-r--r-- | hw/xfree86/xf4bpp/ppcImg.c | 7 | ||||
-rw-r--r-- | hw/xfree86/xf4bpp/ppcPixFS.c | 22 | ||||
-rw-r--r-- | hw/xfree86/xf4bpp/ppcPixmap.c | 5 | ||||
-rw-r--r-- | hw/xfree86/xf4bpp/ppcWinFS.c | 22 | ||||
-rw-r--r-- | hw/xfree86/xf4bpp/ppcWindow.c | 6 | ||||
-rw-r--r-- | hw/xfree86/xf4bpp/xf4bpp.h | 3 |
10 files changed, 54 insertions, 51 deletions
diff --git a/hw/xfree86/xf4bpp/mfbimggblt.c b/hw/xfree86/xf4bpp/mfbimggblt.c index 711a16ee5..4f9561161 100644 --- a/hw/xfree86/xf4bpp/mfbimggblt.c +++ b/hw/xfree86/xf4bpp/mfbimggblt.c @@ -356,7 +356,7 @@ doImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase,infop) int getWidth; /* bits to get from glyph */ #endif - if(!(ppos = (TEXTPOS *)ALLOCATE_LOCAL(nglyph * sizeof(TEXTPOS)))) + if(!(ppos = (TEXTPOS *)xalloc(nglyph * sizeof(TEXTPOS)))) return; pdstBase = pdstBase + (widthDst * y) + (x >> PWSH); @@ -495,7 +495,7 @@ doImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase,infop) } } /* for each glyph */ } /* while nbox-- */ - DEALLOCATE_LOCAL(ppos); + xfree(ppos); break; } default: diff --git a/hw/xfree86/xf4bpp/ppcCpArea.c b/hw/xfree86/xf4bpp/ppcCpArea.c index 891ba4b89..9bdaf89e3 100644 --- a/hw/xfree86/xf4bpp/ppcCpArea.c +++ b/hw/xfree86/xf4bpp/ppcCpArea.c @@ -110,13 +110,13 @@ vga16DoBitblt 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; @@ -146,16 +146,16 @@ vga16DoBitblt 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; } @@ -207,13 +207,13 @@ vga16DoBitblt } if (pboxNew2) { - DEALLOCATE_LOCAL(pptNew2); - DEALLOCATE_LOCAL(pboxNew2); + xfree(pptNew2); + xfree(pboxNew2); } if (pboxNew1) { - DEALLOCATE_LOCAL(pptNew1); - DEALLOCATE_LOCAL(pboxNew1); + xfree(pptNew1); + xfree(pboxNew1); } } @@ -430,7 +430,7 @@ int dstx, dsty; 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); @@ -448,7 +448,7 @@ int dstx, dsty; vga16DoBitblt(pSrcDrawable, pDstDrawable, pGC->alu, &rgnDst, pptSrc, pGC->planemask ); - DEALLOCATE_LOCAL(pptSrc); + xfree(pptSrc); } prgnExposed = NULL; diff --git a/hw/xfree86/xf4bpp/ppcFillRct.c b/hw/xfree86/xf4bpp/ppcFillRct.c index 4be732fb5..3422c8092 100644 --- a/hw/xfree86/xf4bpp/ppcFillRct.c +++ b/hw/xfree86/xf4bpp/ppcFillRct.c @@ -106,7 +106,7 @@ xf4bppPolyFillRect(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; } @@ -211,5 +211,5 @@ xf4bppPolyFillRect(pDrawable, pGC, nrectFill, prectInit) xf4bppFillArea((WindowPtr)pDrawable, pboxClipped-pboxClippedBase, pboxClippedBase, pGC); if (pboxClippedBase != stackRects) - DEALLOCATE_LOCAL(pboxClippedBase); + xfree(pboxClippedBase); } diff --git a/hw/xfree86/xf4bpp/ppcIO.c b/hw/xfree86/xf4bpp/ppcIO.c index 313fcb0f8..83952d12d 100644 --- a/hw/xfree86/xf4bpp/ppcIO.c +++ b/hw/xfree86/xf4bpp/ppcIO.c @@ -146,7 +146,7 @@ v16CreateScreenResources /* create a pixmap with no data, then redirect it to point to * the screen */ - pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, pScreen->rootDepth); + pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, pScreen->rootDepth, 0); if (!pPixmap) return FALSE; diff --git a/hw/xfree86/xf4bpp/ppcImg.c b/hw/xfree86/xf4bpp/ppcImg.c index 3691587ae..33c6b89c5 100644 --- a/hw/xfree86/xf4bpp/ppcImg.c +++ b/hw/xfree86/xf4bpp/ppcImg.c @@ -79,13 +79,14 @@ xf4bppGetImage( pDraw, sx, sy, w, h, format, planeMask, pdstLine ) != (unsigned)( 1 << pDraw->depth ) - 1 ) { pGC = GetScratchGC( depth, pDraw->pScreen ) ; pPixmap = (PixmapPtr) - (* pDraw->pScreen->CreatePixmap)( pDraw->pScreen, w, h, depth ) ; + (* pDraw->pScreen->CreatePixmap)( pDraw->pScreen, w, h, depth, + CREATE_PIXMAP_USAGE_SCRATCH) ; gcv[0] = GXcopy ; gcv[1] = planeMask ; DoChangeGC( pGC, GCPlaneMask | GCFunction, gcv, 0 ) ; ValidateGC( (DrawablePtr)pPixmap, pGC ) ; - pbits = (char *)ALLOCATE_LOCAL(w); + pbits = (char *)xalloc(w); for ( i = 0 ; i < h ; i++ ) { pt.x = sx ; @@ -101,7 +102,7 @@ xf4bppGetImage( pDraw, sx, sy, w, h, format, planeMask, pdstLine ) pDst += linelength ; } - DEALLOCATE_LOCAL(pbits) ; + xfree(pbits) ; (* pGC->pScreen->DestroyPixmap)( pPixmap ) ; FreeScratchGC( pGC ) ; return ; diff --git a/hw/xfree86/xf4bpp/ppcPixFS.c b/hw/xfree86/xf4bpp/ppcPixFS.c index 91b753255..9fd29efce 100644 --- a/hw/xfree86/xf4bpp/ppcPixFS.c +++ b/hw/xfree86/xf4bpp/ppcPixFS.c @@ -128,13 +128,13 @@ xf4bppSolidPixmapFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted ) return ; n = nInit * miFindMaxBand(pGC->pCompositeClip) ; - if ( !( pwidthFree = (int *) ALLOCATE_LOCAL( n * sizeof( int ) ) ) ) + if ( !( pwidthFree = (int *) xalloc( n * sizeof( int ) ) ) ) return ; pwidth = pwidthFree ; if ( !( pptFree = (DDXPointRec *) - ALLOCATE_LOCAL( n * sizeof( DDXPointRec ) ) ) ) { - DEALLOCATE_LOCAL( pwidth ) ; + xalloc( n * sizeof( DDXPointRec ) ) ) ) { + xfree( pwidth ) ; return ; } ppt = pptFree ; @@ -160,8 +160,8 @@ xf4bppSolidPixmapFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted ) *addrl = ( *addrl & npm ) | ( pm & DoRop( alu, fg, *addrl ) ) ; #endif /* PURDUE */ } - DEALLOCATE_LOCAL( pptFree ) ; - DEALLOCATE_LOCAL( pwidthFree ) ; + xfree( pptFree ) ; + xfree( pwidthFree ) ; return ; } @@ -316,8 +316,8 @@ int fSorted ; ppt++ ; pwidth++ ; } - DEALLOCATE_LOCAL( pptFree ) ; - DEALLOCATE_LOCAL( pwidthFree ) ; + xfree( pptFree ) ; + xfree( pwidthFree ) ; return ; } @@ -416,8 +416,8 @@ int fSorted ; #endif /* PURDUE */ } } - DEALLOCATE_LOCAL( pptFree ) ; - DEALLOCATE_LOCAL( pwidthFree ) ; + xfree( pptFree ) ; + xfree( pwidthFree ) ; return ; } @@ -496,7 +496,7 @@ int fSorted ; #endif /* PURDUE */ } } - DEALLOCATE_LOCAL( pptFree ) ; - DEALLOCATE_LOCAL( pwidthFree ) ; + xfree( pptFree ) ; + xfree( pwidthFree ) ; return ; } diff --git a/hw/xfree86/xf4bpp/ppcPixmap.c b/hw/xfree86/xf4bpp/ppcPixmap.c index 2079e2ee6..d9a0ccae4 100644 --- a/hw/xfree86/xf4bpp/ppcPixmap.c +++ b/hw/xfree86/xf4bpp/ppcPixmap.c @@ -82,16 +82,17 @@ SOFTWARE. #include "scrnintstr.h" PixmapPtr -xf4bppCreatePixmap( pScreen, width, height, depth ) +xf4bppCreatePixmap( pScreen, width, height, depth, usage_hint ) ScreenPtr pScreen ; int width ; int height ; int depth ; + unsigned usage_hint ; { register PixmapPtr pPixmap = (PixmapPtr)NULL; size_t size ; - TRACE(("xf4bppCreatePixmap(pScreen=0x%x, width=%d, height=%d, depth=%d)\n", pScreen, width, height, depth)) ; + TRACE(("xf4bppCreatePixmap(pScreen=0x%x, width=%d, height=%d, depth=%d, usage_hint=%d)\n", pScreen, width, height, depth, usage_hint)) ; if ( depth > 8 ) return (PixmapPtr) NULL ; diff --git a/hw/xfree86/xf4bpp/ppcWinFS.c b/hw/xfree86/xf4bpp/ppcWinFS.c index 982bf424c..1522afd9e 100644 --- a/hw/xfree86/xf4bpp/ppcWinFS.c +++ b/hw/xfree86/xf4bpp/ppcWinFS.c @@ -100,13 +100,13 @@ xf4bppSolidWindowFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted ) return ; n = nInit * miFindMaxBand( pGC->pCompositeClip ) ; - if ( !( pwidthFree = (int *) ALLOCATE_LOCAL( n * sizeof( int ) ) ) ) + if ( !( pwidthFree = (int *) xalloc( n * sizeof( int ) ) ) ) return ; pwidth = pwidthFree ; if ( !( pptFree = (DDXPointRec *) - ALLOCATE_LOCAL( n * sizeof( DDXPointRec ) ) ) ) { - DEALLOCATE_LOCAL( pwidth ) ; + xalloc( n * sizeof( DDXPointRec ) ) ) ) { + xfree( pwidth ) ; return ; } ppt = pptFree ; @@ -122,8 +122,8 @@ xf4bppSolidWindowFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted ) xf4bppFillSolid( (WindowPtr)pDrawable, fg, alu, pm, ppt->x, ppt->y, *pwidth, 1 ) ; - DEALLOCATE_LOCAL( pptFree ) ; - DEALLOCATE_LOCAL( pwidthFree ) ; + xfree( pptFree ) ; + xfree( pwidthFree ) ; return ; } @@ -180,8 +180,8 @@ int fSorted ; xf4bppFillStipple( (WindowPtr)pDrawable, pTile, fg, alu, pm, ppt->x, ppt->y, *pwidth, 1, xSrc, ySrc ) ; - DEALLOCATE_LOCAL( pptFree ) ; - DEALLOCATE_LOCAL( pwidthFree ) ; + xfree( pptFree ) ; + xfree( pwidthFree ) ; return ; } @@ -232,8 +232,8 @@ int fSorted ; xf4bppOpaqueStipple( (WindowPtr)pDrawable, pGC->stipple, fg, bg, alu, pm, ppt->x, ppt->y, *pwidth, 1, xSrc, ySrc ) ; - DEALLOCATE_LOCAL( pptFree ) ; - DEALLOCATE_LOCAL( pwidthFree ) ; + xfree( pptFree ) ; + xfree( pwidthFree ) ; return ; } @@ -274,7 +274,7 @@ int fSorted ; xf4bppTileRect( (WindowPtr)pDrawable, pGC->tile.pixmap, alu, pm, ppt->x, ppt->y, *pwidth, 1, xSrc, ySrc ) ; - DEALLOCATE_LOCAL( pptFree ) ; - DEALLOCATE_LOCAL( pwidthFree ) ; + xfree( pptFree ) ; + xfree( pwidthFree ) ; return ; } diff --git a/hw/xfree86/xf4bpp/ppcWindow.c b/hw/xfree86/xf4bpp/ppcWindow.c index 8261af183..6165e04b6 100644 --- a/hw/xfree86/xf4bpp/ppcWindow.c +++ b/hw/xfree86/xf4bpp/ppcWindow.c @@ -123,7 +123,7 @@ xf4bppCopyWindow(pWin, ptOldOrg, prgnSrc) /* walk source bottom to top */ /* keep ordering in each band, reverse order of bands */ if ( !( pboxNew = - (BoxPtr) ALLOCATE_LOCAL( sizeof( BoxRec ) * nbox ) ) ) + (BoxPtr) xalloc( sizeof( BoxRec ) * nbox ) ) ) return ; pboxBase = pboxNext = pbox+nbox - 1 ; while ( pboxBase >= pbox ) { @@ -158,7 +158,7 @@ xf4bppCopyWindow(pWin, ptOldOrg, prgnSrc) else if ( dx < 0 ) { /* walk source right to left */ /* reverse order of rects in each band */ - if ( !( pboxNew = (BoxPtr)ALLOCATE_LOCAL(sizeof(BoxRec) * nbox) ) ) + if ( !( pboxNew = (BoxPtr)xalloc(sizeof(BoxRec) * nbox) ) ) return ; pboxBase = pboxNext = pbox ; while (pboxBase < pbox+nbox) @@ -190,7 +190,7 @@ xf4bppCopyWindow(pWin, ptOldOrg, prgnSrc) /* free up stuff */ if ( pboxNew ) - DEALLOCATE_LOCAL( pboxNew ) ; + xfree( pboxNew ) ; REGION_DESTROY(pWin->drawable.pScreen, prgnDst); } diff --git a/hw/xfree86/xf4bpp/xf4bpp.h b/hw/xfree86/xf4bpp/xf4bpp.h index e7e3721f7..cf0822444 100644 --- a/hw/xfree86/xf4bpp/xf4bpp.h +++ b/hw/xfree86/xf4bpp/xf4bpp.h @@ -183,7 +183,8 @@ PixmapPtr xf4bppCreatePixmap( ScreenPtr, int, int, - int + int, + unsigned ); PixmapPtr xf4bppCopyPixmap( PixmapPtr |