Commit 3ef6d512 authored by Aaron Plattner's avatar Aaron Plattner Committed by Mike Gabriel

Add CreatePixmap allocation hints.

Backported from X.org: commit f2e310132fbe1520c1b5f3da4faa2d2d47835e72 Author: Aaron Plattner <aplattner@nvidia.com> Date: Wed Oct 31 14:15:35 2007 -0700 Add CreatePixmap allocation hints. These hints allow an acceleration architecture to optimize allocation of certain types of pixmaps, such as pixmaps that will serve as backing pixmaps for redirected windows. Backported-to-NX-by: 's avatarMike Gabriel <mike.gabriel@das-netzwerkteam.de>
parent cc24d8ba
...@@ -505,7 +505,8 @@ miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) ...@@ -505,7 +505,8 @@ miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data)
putGC = GetScratchGC(depth, dst->pScreen); putGC = GetScratchGC(depth, dst->pScreen);
if (!putGC) if (!putGC)
return; return;
pmap = (*dst->pScreen->CreatePixmap)(dst->pScreen, sw, sh, depth); pmap = (*dst->pScreen->CreatePixmap)(dst->pScreen, sw, sh, depth,
CREATE_PIXMAP_USAGE_SCRATCH);
if (!pmap) if (!pmap)
{ {
FreeScratchGC(putGC); FreeScratchGC(putGC);
...@@ -1051,7 +1052,7 @@ fbShmCreatePixmap (pScreen, width, height, depth, addr) ...@@ -1051,7 +1052,7 @@ fbShmCreatePixmap (pScreen, width, height, depth, addr)
{ {
register PixmapPtr pPixmap; register PixmapPtr pPixmap;
pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, pScreen->rootDepth); pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, pScreen->rootDepth, 0);
if (!pPixmap) if (!pPixmap)
return NullPixmap; return NullPixmap;
......
...@@ -539,8 +539,8 @@ compNewPixmap (WindowPtr pWin, int x, int y, int w, int h) ...@@ -539,8 +539,8 @@ compNewPixmap (WindowPtr pWin, int x, int y, int w, int h)
PixmapPtr pPixmap; PixmapPtr pPixmap;
/* usage_hint unsupported by our old server infrastructure. */ /* usage_hint unsupported by our old server infrastructure. */
pPixmap = (*pScreen->CreatePixmap) (pScreen, w, h, pWin->drawable.depth /*, pPixmap = (*pScreen->CreatePixmap) (pScreen, w, h, pWin->drawable.depth,
CREATE_PIXMAP_USAGE_BACKING_PIXMAP */); CREATE_PIXMAP_USAGE_BACKING_PIXMAP);
if (!pPixmap) if (!pPixmap)
return 0; return 0;
......
...@@ -188,7 +188,7 @@ miDbeAllocBackBufferName(pWin, bufId, swapAction) ...@@ -188,7 +188,7 @@ miDbeAllocBackBufferName(pWin, bufId, swapAction)
if (!(pDbeWindowPrivPriv->pFrontBuffer = if (!(pDbeWindowPrivPriv->pFrontBuffer =
(*pScreen->CreatePixmap)(pScreen, pDbeWindowPriv->width, (*pScreen->CreatePixmap)(pScreen, pDbeWindowPriv->width,
pDbeWindowPriv->height, pDbeWindowPriv->height,
pWin->drawable.depth))) pWin->drawable.depth, 0)))
{ {
return(BadAlloc); return(BadAlloc);
} }
...@@ -197,7 +197,7 @@ miDbeAllocBackBufferName(pWin, bufId, swapAction) ...@@ -197,7 +197,7 @@ miDbeAllocBackBufferName(pWin, bufId, swapAction)
if (!(pDbeWindowPrivPriv->pBackBuffer = if (!(pDbeWindowPrivPriv->pBackBuffer =
(*pScreen->CreatePixmap)(pScreen, pDbeWindowPriv->width, (*pScreen->CreatePixmap)(pScreen, pDbeWindowPriv->width,
pDbeWindowPriv->height, pDbeWindowPriv->height,
pWin->drawable.depth))) pWin->drawable.depth, 0)))
{ {
(*pScreen->DestroyPixmap)(pDbeWindowPrivPriv->pFrontBuffer); (*pScreen->DestroyPixmap)(pDbeWindowPrivPriv->pFrontBuffer);
return(BadAlloc); return(BadAlloc);
...@@ -668,10 +668,10 @@ miDbePositionWindow(pWin, x, y) ...@@ -668,10 +668,10 @@ miDbePositionWindow(pWin, x, y)
/* Create DBE buffer pixmaps equal to size of resized window. */ /* Create DBE buffer pixmaps equal to size of resized window. */
pFrontBuffer = (*pScreen->CreatePixmap)(pScreen, width, height, pFrontBuffer = (*pScreen->CreatePixmap)(pScreen, width, height,
pWin->drawable.depth); pWin->drawable.depth, 0);
pBackBuffer = (*pScreen->CreatePixmap)(pScreen, width, height, pBackBuffer = (*pScreen->CreatePixmap)(pScreen, width, height,
pWin->drawable.depth); pWin->drawable.depth, 0);
if (!pFrontBuffer || !pBackBuffer) if (!pFrontBuffer || !pBackBuffer)
{ {
......
...@@ -1508,7 +1508,7 @@ ProcCreatePixmap(register ClientPtr client) ...@@ -1508,7 +1508,7 @@ ProcCreatePixmap(register ClientPtr client)
CreatePmap: CreatePmap:
pMap = (PixmapPtr)(*pDraw->pScreen->CreatePixmap) pMap = (PixmapPtr)(*pDraw->pScreen->CreatePixmap)
(pDraw->pScreen, stuff->width, (pDraw->pScreen, stuff->width,
stuff->height, stuff->depth); stuff->height, stuff->depth, 0);
if (pMap) if (pMap)
{ {
pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER; pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
......
...@@ -694,7 +694,7 @@ CreateDefaultTile (GCPtr pGC) ...@@ -694,7 +694,7 @@ CreateDefaultTile (GCPtr pGC)
(*pGC->pScreen->QueryBestSize)(TileShape, &w, &h, pGC->pScreen); (*pGC->pScreen->QueryBestSize)(TileShape, &w, &h, pGC->pScreen);
pTile = (PixmapPtr) pTile = (PixmapPtr)
(*pGC->pScreen->CreatePixmap)(pGC->pScreen, (*pGC->pScreen->CreatePixmap)(pGC->pScreen,
w, h, pGC->depth); w, h, pGC->depth, 0);
pgcScratch = GetScratchGC(pGC->depth, pGC->pScreen); pgcScratch = GetScratchGC(pGC->depth, pGC->pScreen);
if (!pTile || !pgcScratch) if (!pTile || !pgcScratch)
{ {
...@@ -1047,7 +1047,7 @@ CreateDefaultStipple(int screenNum) ...@@ -1047,7 +1047,7 @@ CreateDefaultStipple(int screenNum)
h = 16; h = 16;
(* pScreen->QueryBestSize)(StippleShape, &w, &h, pScreen); (* pScreen->QueryBestSize)(StippleShape, &w, &h, pScreen);
if (!(pScreen->PixmapPerDepth[0] = if (!(pScreen->PixmapPerDepth[0] =
(*pScreen->CreatePixmap)(pScreen, w, h, 1))) (*pScreen->CreatePixmap)(pScreen, w, h, 1, 0)))
return FALSE; return FALSE;
/* fill stipple with 1 */ /* fill stipple with 1 */
tmpval[0] = GXcopy; tmpval[1] = 1; tmpval[2] = FillSolid; tmpval[0] = GXcopy; tmpval[1] = 1; tmpval[2] = FillSolid;
......
...@@ -99,7 +99,8 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, uns ...@@ -99,7 +99,8 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, uns
bzero(pbits, nby); bzero(pbits, nby);
ppix = (PixmapPtr)(*pScreen->CreatePixmap)(pScreen, cm->width, ppix = (PixmapPtr)(*pScreen->CreatePixmap)(pScreen, cm->width,
cm->height, 1); cm->height, 1,
CREATE_PIXMAP_USAGE_SCRATCH);
pGC = GetScratchGC(1, pScreen); pGC = GetScratchGC(1, pScreen);
if (!ppix || !pGC) if (!ppix || !pGC)
{ {
......
...@@ -59,7 +59,7 @@ GetScratchPixmapHeader(ScreenPtr pScreen, int width, int height, int depth, ...@@ -59,7 +59,7 @@ GetScratchPixmapHeader(ScreenPtr pScreen, int width, int height, int depth,
pScreen->pScratchPixmap = NULL; pScreen->pScratchPixmap = NULL;
else else
/* width and height of 0 means don't allocate any pixmap data */ /* width and height of 0 means don't allocate any pixmap data */
pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, depth); pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, depth, 0);
if (pPixmap) { if (pPixmap) {
if ((*pScreen->ModifyPixmapHeader)(pPixmap, width, height, depth, if ((*pScreen->ModifyPixmapHeader)(pPixmap, width, height, depth,
......
...@@ -295,7 +295,7 @@ MakeRootTile(WindowPtr pWin) ...@@ -295,7 +295,7 @@ MakeRootTile(WindowPtr pWin)
register int i, j; register int i, j;
pWin->background.pixmap = (*pScreen->CreatePixmap)(pScreen, 4, 4, pWin->background.pixmap = (*pScreen->CreatePixmap)(pScreen, 4, 4,
pScreen->rootDepth); pScreen->rootDepth, 0);
pWin->backgroundState = BackgroundPixmap; pWin->backgroundState = BackgroundPixmap;
pGC = GetScratchGC(pScreen->rootDepth, pScreen); pGC = GetScratchGC(pScreen->rootDepth, pScreen);
......
...@@ -1596,10 +1596,11 @@ fbPictureInit (ScreenPtr pScreen, ...@@ -1596,10 +1596,11 @@ fbPictureInit (ScreenPtr pScreen,
*/ */
PixmapPtr PixmapPtr
fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp); fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp,
unsigned usage_hint);
PixmapPtr PixmapPtr
fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth); fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth, unsigned usage_hint);
Bool Bool
fbDestroyPixmap (PixmapPtr pPixmap); fbDestroyPixmap (PixmapPtr pPixmap);
......
...@@ -140,7 +140,7 @@ fbOverlayCreateScreenResources(ScreenPtr pScreen) ...@@ -140,7 +140,7 @@ fbOverlayCreateScreenResources(ScreenPtr pScreen)
pbits = pScrPriv->layer[i].u.init.pbits; pbits = pScrPriv->layer[i].u.init.pbits;
width = pScrPriv->layer[i].u.init.width; width = pScrPriv->layer[i].u.init.width;
depth = pScrPriv->layer[i].u.init.depth; depth = pScrPriv->layer[i].u.init.depth;
pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, depth); pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, depth, 0);
if (!pPixmap) if (!pPixmap)
return FALSE; return FALSE;
if (!(*pScreen->ModifyPixmapHeader)(pPixmap, pScreen->width, if (!(*pScreen->ModifyPixmapHeader)(pPixmap, pScreen->width,
......
...@@ -86,7 +86,8 @@ fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp) ...@@ -86,7 +86,8 @@ fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp)
} }
PixmapPtr PixmapPtr
fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth) fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth,
unsigned usage_hint)
{ {
int bpp; int bpp;
bpp = BitsPerPixel (depth); bpp = BitsPerPixel (depth);
......
...@@ -114,7 +114,8 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, uns ...@@ -114,7 +114,8 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, uns
/* zeroing the (pad) bits seems to help some ddx cursor handling */ /* zeroing the (pad) bits seems to help some ddx cursor handling */
bzero(pbits, nby); bzero(pbits, nby);
ppix = fbCreatePixmap(pScreen, cm->width, cm->height, 1); ppix = fbCreatePixmap(pScreen, cm->width, cm->height, 1,
CREATE_PIXMAP_USAGE_SCRATCH);
pGC = GetScratchGC(1, pScreen); pGC = GetScratchGC(1, pScreen);
if (!ppix || !pGC) if (!ppix || !pGC)
{ {
......
...@@ -1266,7 +1266,8 @@ ProcRenderCreateCursor (ClientPtr client) ...@@ -1266,7 +1266,8 @@ ProcRenderCreateCursor (ClientPtr client)
free (mskbits); free (mskbits);
return (BadImplementation); return (BadImplementation);
} }
pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, 32); pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, 32,
CREATE_PIXMAP_USAGE_SCRATCH);
if (!pPixmap) if (!pPixmap)
{ {
free (argbbits); free (argbbits);
......
...@@ -173,7 +173,8 @@ miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) ...@@ -173,7 +173,8 @@ miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data)
nxagentShmTrap = 1; nxagentShmTrap = 1;
return; return;
} }
pmap = (*dst->pScreen->CreatePixmap)(dst->pScreen, sw, sh, depth); pmap = (*dst->pScreen->CreatePixmap)(dst->pScreen, sw, sh, depth,
CREATE_PIXMAP_USAGE_SCRATCH);
if (!pmap) if (!pmap)
{ {
nxagentShmTrap = 1; nxagentShmTrap = 1;
...@@ -387,7 +388,7 @@ fbShmCreatePixmap (pScreen, width, height, depth, addr) ...@@ -387,7 +388,7 @@ fbShmCreatePixmap (pScreen, width, height, depth, addr)
nxagentShmPixmapTrap = 1; nxagentShmPixmapTrap = 1;
pPixmap = (*pScreen->CreatePixmap)(pScreen, width, height, depth); pPixmap = (*pScreen->CreatePixmap)(pScreen, width, height, depth, 0);
if (!pPixmap) if (!pPixmap)
{ {
...@@ -397,7 +398,7 @@ fbShmCreatePixmap (pScreen, width, height, depth, addr) ...@@ -397,7 +398,7 @@ fbShmCreatePixmap (pScreen, width, height, depth, addr)
} }
#ifdef TEST #ifdef TEST
fprintf(stderr,"fbShmCreatePixmap: Width [%d] Height [%d] Depth [%d]\n", width, height, depth); fprintf(stderr,"fbShmCreatePixmap: Width [%d] Height [%d] Depth [%d] Hint[%d]\n", width, height, depth, 0);
#endif #endif
if (!(*pScreen->ModifyPixmapHeader)(pPixmap, width, height, depth, if (!(*pScreen->ModifyPixmapHeader)(pPixmap, width, height, depth,
......
...@@ -162,7 +162,7 @@ MakeRootTile(WindowPtr pWin) ...@@ -162,7 +162,7 @@ MakeRootTile(WindowPtr pWin)
register int i, j; register int i, j;
pWin->background.pixmap = (*pScreen->CreatePixmap)(pScreen, 4, 4, pWin->background.pixmap = (*pScreen->CreatePixmap)(pScreen, 4, 4,
pScreen->rootDepth); pScreen->rootDepth, 0);
pWin->backgroundState = BackgroundPixmap; pWin->backgroundState = BackgroundPixmap;
pGC = GetScratchGC(pScreen->rootDepth, pScreen); pGC = GetScratchGC(pScreen->rootDepth, pScreen);
......
...@@ -242,7 +242,7 @@ PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width, ...@@ -242,7 +242,7 @@ PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width,
* Create the pixmap in the virtual framebuffer. * Create the pixmap in the virtual framebuffer.
*/ */
pVirtual = fbCreatePixmap(pScreen, width, height, depth); pVirtual = fbCreatePixmap(pScreen, width, height, depth, 0);
if (pVirtual == NULL) if (pVirtual == NULL)
{ {
......
...@@ -196,11 +196,19 @@ typedef void (* ClipNotifyProcPtr)( ...@@ -196,11 +196,19 @@ typedef void (* ClipNotifyProcPtr)(
int /*dx*/, int /*dx*/,
int /*dy*/); int /*dy*/);
/* pixmap will exist only for the duration of the current rendering operation */
#define CREATE_PIXMAP_USAGE_SCRATCH 1
/* pixmap will be the backing pixmap for a redirected window */
#define CREATE_PIXMAP_USAGE_BACKING_PIXMAP 2
/* pixmap will contain a glyph */
#define CREATE_PIXMAP_USAGE_GLYPH_PICTURE 3
typedef PixmapPtr (* CreatePixmapProcPtr)( typedef PixmapPtr (* CreatePixmapProcPtr)(
ScreenPtr /*pScreen*/, ScreenPtr /*pScreen*/,
int /*width*/, int /*width*/,
int /*height*/, int /*height*/,
int /*depth*/); int /*depth*/,
unsigned /*usage_hint*/);
typedef Bool (* DestroyPixmapProcPtr)( typedef Bool (* DestroyPixmapProcPtr)(
PixmapPtr /*pPixmap*/); PixmapPtr /*pPixmap*/);
......
...@@ -1184,7 +1184,8 @@ miPolyArc(pDraw, pGC, narcs, parcs) ...@@ -1184,7 +1184,8 @@ miPolyArc(pDraw, pGC, narcs, parcs)
/* allocate a 1 bit deep pixmap of the appropriate size, and /* allocate a 1 bit deep pixmap of the appropriate size, and
* validate it */ * validate it */
pDrawTo = (DrawablePtr)(*pDraw->pScreen->CreatePixmap) pDrawTo = (DrawablePtr)(*pDraw->pScreen->CreatePixmap)
(pDraw->pScreen, pixmapWidth, pixmapHeight, 1); (pDraw->pScreen, pixmapWidth, pixmapHeight, 1,
CREATE_PIXMAP_USAGE_SCRATCH);
if (!pDrawTo) if (!pDrawTo)
{ {
FreeScratchGC(pGCTo); FreeScratchGC(pGCTo);
......
...@@ -420,7 +420,8 @@ miOpqStipDrawable(pDraw, pGC, prgnSrc, pbits, srcx, w, h, dstx, dsty) ...@@ -420,7 +420,8 @@ miOpqStipDrawable(pDraw, pGC, prgnSrc, pbits, srcx, w, h, dstx, dsty)
RegionPtr prgnSrcClip; RegionPtr prgnSrcClip;
pPixmap = (*pDraw->pScreen->CreatePixmap) pPixmap = (*pDraw->pScreen->CreatePixmap)
(pDraw->pScreen, w + srcx, h, 1); (pDraw->pScreen, w + srcx, h, 1,
CREATE_PIXMAP_USAGE_SCRATCH);
if (!pPixmap) if (!pPixmap)
return; return;
...@@ -671,7 +672,8 @@ miGetImage(pDraw, sx, sy, w, h, format, planeMask, pDst) ...@@ -671,7 +672,8 @@ miGetImage(pDraw, sx, sy, w, h, format, planeMask, pDst)
if (!pGC) if (!pGC)
return; return;
pPixmap = (*pDraw->pScreen->CreatePixmap) pPixmap = (*pDraw->pScreen->CreatePixmap)
(pDraw->pScreen, w, 1, depth); (pDraw->pScreen, w, 1, depth,
CREATE_PIXMAP_USAGE_SCRATCH);
if (!pPixmap) if (!pPixmap)
{ {
FreeScratchGC(pGC); FreeScratchGC(pGC);
......
...@@ -493,7 +493,8 @@ miBSGetImage (pDrawable, sx, sy, w, h, format, planemask, pdstLine) ...@@ -493,7 +493,8 @@ miBSGetImage (pDrawable, sx, sy, w, h, format, planemask, pdstLine)
XID subWindowMode = IncludeInferiors; XID subWindowMode = IncludeInferiors;
int x, y; int x, y;
pPixmap = (*pScreen->CreatePixmap) (pScreen, w, h, depth); pPixmap = (*pScreen->CreatePixmap) (pScreen, w, h, depth,
CREATE_PIXMAP_USAGE_SCRATCH);
if (!pPixmap) if (!pPixmap)
goto punt; goto punt;
pGC = GetScratchGC (depth, pScreen); pGC = GetScratchGC (depth, pScreen);
...@@ -2737,7 +2738,7 @@ miResizeBackingStore( ...@@ -2737,7 +2738,7 @@ miResizeBackingStore(
pNewPixmap = (PixmapPtr)(*pScreen->CreatePixmap) pNewPixmap = (PixmapPtr)(*pScreen->CreatePixmap)
(pScreen, (pScreen,
nw, nh, nw, nh,
pWin->drawable.depth); pWin->drawable.depth, 0);
if (!pNewPixmap) if (!pNewPixmap)
{ {
#ifdef BSEAGER #ifdef BSEAGER
...@@ -3737,7 +3738,7 @@ miCreateBSPixmap (pWin, pExtents) ...@@ -3737,7 +3738,7 @@ miCreateBSPixmap (pWin, pExtents)
(pScreen, (pScreen,
extents->x2 - extents->x1, extents->x2 - extents->x1,
extents->y2 - extents->y1, extents->y2 - extents->y1,
pWin->drawable.depth); pWin->drawable.depth, 0);
} }
if (!pBackingStore->pBackingPixmap) if (!pBackingStore->pBackingPixmap)
{ {
......
...@@ -266,7 +266,8 @@ miDCRealize ( ...@@ -266,7 +266,8 @@ miDCRealize (
pPriv->sourceBits = 0; pPriv->sourceBits = 0;
pPriv->maskBits = 0; pPriv->maskBits = 0;
pPixmap = (*pScreen->CreatePixmap) (pScreen, pCursor->bits->width, pPixmap = (*pScreen->CreatePixmap) (pScreen, pCursor->bits->width,
pCursor->bits->height, 32); pCursor->bits->height, 32,
CREATE_PIXMAP_USAGE_SCRATCH);
if (!pPixmap) if (!pPixmap)
{ {
free ((void *) pPriv); free ((void *) pPriv);
...@@ -298,13 +299,13 @@ miDCRealize ( ...@@ -298,13 +299,13 @@ miDCRealize (
} }
pPriv->pPicture = 0; pPriv->pPicture = 0;
#endif #endif
pPriv->sourceBits = (*pScreen->CreatePixmap) (pScreen, pCursor->bits->width, pCursor->bits->height, 1); pPriv->sourceBits = (*pScreen->CreatePixmap) (pScreen, pCursor->bits->width, pCursor->bits->height, 1, 0);
if (!pPriv->sourceBits) if (!pPriv->sourceBits)
{ {
free ((void *) pPriv); free ((void *) pPriv);
return (miDCCursorPtr)NULL; return (miDCCursorPtr)NULL;
} }
pPriv->maskBits = (*pScreen->CreatePixmap) (pScreen, pCursor->bits->width, pCursor->bits->height, 1); pPriv->maskBits = (*pScreen->CreatePixmap) (pScreen, pCursor->bits->width, pCursor->bits->height, 1, 0);
if (!pPriv->maskBits) if (!pPriv->maskBits)
{ {
(*pScreen->DestroyPixmap) (pPriv->sourceBits); (*pScreen->DestroyPixmap) (pPriv->sourceBits);
...@@ -525,7 +526,7 @@ miDCSaveUnderCursor (pScreen, x, y, w, h) ...@@ -525,7 +526,7 @@ miDCSaveUnderCursor (pScreen, x, y, w, h)
if (pSave) if (pSave)
(*pScreen->DestroyPixmap) (pSave); (*pScreen->DestroyPixmap) (pSave);
pScreenPriv->pSave = pSave = pScreenPriv->pSave = pSave =
(*pScreen->CreatePixmap) (pScreen, w, h, pScreen->rootDepth); (*pScreen->CreatePixmap) (pScreen, w, h, pScreen->rootDepth, 0);
if (!pSave) if (!pSave)
return FALSE; return FALSE;
} }
...@@ -735,7 +736,7 @@ miDCMoveCursor (pScreen, pCursor, x, y, w, h, dx, dy, source, mask) ...@@ -735,7 +736,7 @@ miDCMoveCursor (pScreen, pCursor, x, y, w, h, dx, dy, source, mask)
} }
#endif #endif
pScreenPriv->pTemp = pTemp = (*pScreen->CreatePixmap) pScreenPriv->pTemp = pTemp = (*pScreen->CreatePixmap)
(pScreen, w, h, pScreenPriv->pSave->drawable.depth); (pScreen, w, h, pScreenPriv->pSave->drawable.depth, 0);
if (!pTemp) if (!pTemp)
return FALSE; return FALSE;
} }
......
...@@ -125,7 +125,8 @@ miPolyGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase) ...@@ -125,7 +125,8 @@ miPolyGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
FONTMAXBOUNDS(pfont,descent); FONTMAXBOUNDS(pfont,descent);
pPixmap = (*pDrawable->pScreen->CreatePixmap)(pDrawable->pScreen, pPixmap = (*pDrawable->pScreen->CreatePixmap)(pDrawable->pScreen,
width, height, 1); width, height, 1,
CREATE_PIXMAP_USAGE_SCRATCH);
if (!pPixmap) if (!pPixmap)
return; return;
......
...@@ -160,7 +160,7 @@ miCreateScreenResources(pScreen) ...@@ -160,7 +160,7 @@ miCreateScreenResources(pScreen)
/* create a pixmap with no data, then redirect it to point to /* create a pixmap with no data, then redirect it to point to
* the screen * the screen
*/ */
pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, pScreen->rootDepth); pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, pScreen->rootDepth, 0);
if (!pPixmap) if (!pPixmap)
return FALSE; return FALSE;
......
...@@ -137,7 +137,8 @@ miCompositeRects (CARD8 op, ...@@ -137,7 +137,8 @@ miCompositeRects (CARD8 op,
goto bail1; goto bail1;
pPixmap = (*pScreen->CreatePixmap) (pScreen, 1, 1, pPixmap = (*pScreen->CreatePixmap) (pScreen, 1, 1,
rgbaFormat->depth); rgbaFormat->depth,
CREATE_PIXMAP_USAGE_SCRATCH);
if (!pPixmap) if (!pPixmap)
goto bail2; goto bail2;
......
...@@ -62,7 +62,7 @@ miCreateAlphaPicture (ScreenPtr pScreen, ...@@ -62,7 +62,7 @@ miCreateAlphaPicture (ScreenPtr pScreen,
} }
pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height,
pPictFormat->depth); pPictFormat->depth, 0);
if (!pPixmap) if (!pPixmap)
return 0; return 0;
pGC = GetScratchGC (pPixmap->drawable.depth, pScreen); pGC = GetScratchGC (pPixmap->drawable.depth, pScreen);
......
...@@ -1570,7 +1570,8 @@ ProcRenderCreateCursor (ClientPtr client) ...@@ -1570,7 +1570,8 @@ ProcRenderCreateCursor (ClientPtr client)
free (mskbits); free (mskbits);
return (BadImplementation); return (BadImplementation);
} }
pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, 32); pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, 32,
CREATE_PIXMAP_USAGE_SCRATCH);
if (!pPixmap) if (!pPixmap)
{ {
free (argbbits); free (argbbits);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment