Unverified Commit 2d700b14 authored by Mihai Moldovan's avatar Mihai Moldovan

Merge branch 'sunweaver-pr/createpixmap-alloc-hints-abi-change' into 3.6.x

parents cc24d8ba 8b5bb2cd
Index: Mesa/include/GL/xmesa_xf86.h
===================================================================
--- Mesa.orig/include/GL/xmesa_xf86.h
+++ Mesa/include/GL/xmesa_xf86.h
@@ -130,7 +130,7 @@ do { \
/* CreatePixmap returns a PixmapPtr; so, it cannot be inside braces */
#define XMesaCreatePixmap(__d,__b,__w,__h,__depth) \
- (*__d->CreatePixmap)(__d, __w, __h, __depth)
+ (*__d->CreatePixmap)(__d, __w, __h, __depth, 0)
#define XMesaFreePixmap(__d,__b) \
(*__d->DestroyPixmap)(__b)
4001_CreatePixmap-AllocationHints.patch
......@@ -505,7 +505,8 @@ miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data)
putGC = GetScratchGC(depth, dst->pScreen);
if (!putGC)
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)
{
FreeScratchGC(putGC);
......@@ -1051,7 +1052,7 @@ fbShmCreatePixmap (pScreen, width, height, depth, addr)
{
register PixmapPtr pPixmap;
pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, pScreen->rootDepth);
pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, pScreen->rootDepth, 0);
if (!pPixmap)
return NullPixmap;
......
......@@ -539,8 +539,8 @@ compNewPixmap (WindowPtr pWin, int x, int y, int w, int h)
PixmapPtr pPixmap;
/* usage_hint unsupported by our old server infrastructure. */
pPixmap = (*pScreen->CreatePixmap) (pScreen, w, h, pWin->drawable.depth /*,
CREATE_PIXMAP_USAGE_BACKING_PIXMAP */);
pPixmap = (*pScreen->CreatePixmap) (pScreen, w, h, pWin->drawable.depth,
CREATE_PIXMAP_USAGE_BACKING_PIXMAP);
if (!pPixmap)
return 0;
......
......@@ -188,7 +188,7 @@ miDbeAllocBackBufferName(pWin, bufId, swapAction)
if (!(pDbeWindowPrivPriv->pFrontBuffer =
(*pScreen->CreatePixmap)(pScreen, pDbeWindowPriv->width,
pDbeWindowPriv->height,
pWin->drawable.depth)))
pWin->drawable.depth, 0)))
{
return(BadAlloc);
}
......@@ -197,7 +197,7 @@ miDbeAllocBackBufferName(pWin, bufId, swapAction)
if (!(pDbeWindowPrivPriv->pBackBuffer =
(*pScreen->CreatePixmap)(pScreen, pDbeWindowPriv->width,
pDbeWindowPriv->height,
pWin->drawable.depth)))
pWin->drawable.depth, 0)))
{
(*pScreen->DestroyPixmap)(pDbeWindowPrivPriv->pFrontBuffer);
return(BadAlloc);
......@@ -668,10 +668,10 @@ miDbePositionWindow(pWin, x, y)
/* Create DBE buffer pixmaps equal to size of resized window. */
pFrontBuffer = (*pScreen->CreatePixmap)(pScreen, width, height,
pWin->drawable.depth);
pWin->drawable.depth, 0);
pBackBuffer = (*pScreen->CreatePixmap)(pScreen, width, height,
pWin->drawable.depth);
pWin->drawable.depth, 0);
if (!pFrontBuffer || !pBackBuffer)
{
......
......@@ -1508,7 +1508,7 @@ ProcCreatePixmap(register ClientPtr client)
CreatePmap:
pMap = (PixmapPtr)(*pDraw->pScreen->CreatePixmap)
(pDraw->pScreen, stuff->width,
stuff->height, stuff->depth);
stuff->height, stuff->depth, 0);
if (pMap)
{
pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
......
......@@ -694,7 +694,7 @@ CreateDefaultTile (GCPtr pGC)
(*pGC->pScreen->QueryBestSize)(TileShape, &w, &h, pGC->pScreen);
pTile = (PixmapPtr)
(*pGC->pScreen->CreatePixmap)(pGC->pScreen,
w, h, pGC->depth);
w, h, pGC->depth, 0);
pgcScratch = GetScratchGC(pGC->depth, pGC->pScreen);
if (!pTile || !pgcScratch)
{
......@@ -1047,7 +1047,7 @@ CreateDefaultStipple(int screenNum)
h = 16;
(* pScreen->QueryBestSize)(StippleShape, &w, &h, pScreen);
if (!(pScreen->PixmapPerDepth[0] =
(*pScreen->CreatePixmap)(pScreen, w, h, 1)))
(*pScreen->CreatePixmap)(pScreen, w, h, 1, 0)))
return FALSE;
/* fill stipple with 1 */
tmpval[0] = GXcopy; tmpval[1] = 1; tmpval[2] = FillSolid;
......
......@@ -99,7 +99,8 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, uns
bzero(pbits, nby);
ppix = (PixmapPtr)(*pScreen->CreatePixmap)(pScreen, cm->width,
cm->height, 1);
cm->height, 1,
CREATE_PIXMAP_USAGE_SCRATCH);
pGC = GetScratchGC(1, pScreen);
if (!ppix || !pGC)
{
......
......@@ -59,7 +59,7 @@ GetScratchPixmapHeader(ScreenPtr pScreen, int width, int height, int depth,
pScreen->pScratchPixmap = NULL;
else
/* 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 ((*pScreen->ModifyPixmapHeader)(pPixmap, width, height, depth,
......
......@@ -295,7 +295,7 @@ MakeRootTile(WindowPtr pWin)
register int i, j;
pWin->background.pixmap = (*pScreen->CreatePixmap)(pScreen, 4, 4,
pScreen->rootDepth);
pScreen->rootDepth, 0);
pWin->backgroundState = BackgroundPixmap;
pGC = GetScratchGC(pScreen->rootDepth, pScreen);
......
......@@ -1596,10 +1596,11 @@ fbPictureInit (ScreenPtr pScreen,
*/
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
fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth);
fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth, unsigned usage_hint);
Bool
fbDestroyPixmap (PixmapPtr pPixmap);
......
......@@ -537,7 +537,7 @@ fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel)
pOldTile->drawable.width,
pOldTile->drawable.height,
pOldTile->drawable.depth,
bitsPerPixel);
bitsPerPixel, 0);
if (!pNewTile)
return 0;
fbGetDrawable (&pOldTile->drawable,
......
......@@ -140,7 +140,7 @@ fbOverlayCreateScreenResources(ScreenPtr pScreen)
pbits = pScrPriv->layer[i].u.init.pbits;
width = pScrPriv->layer[i].u.init.width;
depth = pScrPriv->layer[i].u.init.depth;
pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, depth);
pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, depth, 0);
if (!pPixmap)
return FALSE;
if (!(*pScreen->ModifyPixmapHeader)(pPixmap, pScreen->width,
......
......@@ -31,7 +31,8 @@
#include "fb.h"
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 pPixmap;
size_t datasize;
......@@ -81,12 +82,14 @@ fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp)
pPixmap->screen_x = 0;
pPixmap->screen_y = 0;
#endif
pPixmap->usage_hint = usage_hint;
return pPixmap;
}
PixmapPtr
fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth)
fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth,
unsigned usage_hint)
{
int bpp;
bpp = BitsPerPixel (depth);
......@@ -94,7 +97,7 @@ fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth)
if (bpp == 32 && depth <= 24)
bpp = fbGetScreenPrivate(pScreen)->pix32bpp;
#endif
return fbCreatePixmapBpp (pScreen, width, height, depth, bpp);
return fbCreatePixmapBpp (pScreen, width, height, depth, bpp, usage_hint);
}
Bool
......
......@@ -2702,7 +2702,7 @@ void nxagentCreateDrawableBitmap(DrawablePtr pDrawable)
* would fail.
*/
pBitmap = nxagentCreatePixmap(pDrawable -> pScreen, pDrawable -> width, pDrawable -> height, pDrawable -> depth);
pBitmap = nxagentCreatePixmap(pDrawable -> pScreen, pDrawable -> width, pDrawable -> height, pDrawable -> depth, 0);
if (pBitmap == NULL)
{
......
......@@ -245,7 +245,9 @@ miGlyphs (CARD8 op,
return;
width = extents.x2 - extents.x1;
height = extents.y2 - extents.y1;
pMaskPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, maskFormat->depth);
pMaskPixmap = (*pScreen->CreatePixmap) (pScreen, width, height,
maskFormat->depth,
CREATE_PIXMAP_USAGE_SCRATCH);
if (!pMaskPixmap)
return;
......
......@@ -114,7 +114,8 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, uns
/* zeroing the (pad) bits seems to help some ddx cursor handling */
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);
if (!ppix || !pGC)
{
......
......@@ -1266,7 +1266,8 @@ ProcRenderCreateCursor (ClientPtr client)
free (mskbits);
return (BadImplementation);
}
pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, 32);
pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, 32,
CREATE_PIXMAP_USAGE_SCRATCH);
if (!pPixmap)
{
free (argbbits);
......
......@@ -173,7 +173,8 @@ miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data)
nxagentShmTrap = 1;
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)
{
nxagentShmTrap = 1;
......@@ -387,7 +388,7 @@ fbShmCreatePixmap (pScreen, width, height, depth, addr)
nxagentShmPixmapTrap = 1;
pPixmap = (*pScreen->CreatePixmap)(pScreen, width, height, depth);
pPixmap = (*pScreen->CreatePixmap)(pScreen, width, height, depth, 0);
if (!pPixmap)
{
......@@ -397,7 +398,7 @@ fbShmCreatePixmap (pScreen, width, height, depth, addr)
}
#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
if (!(*pScreen->ModifyPixmapHeader)(pPixmap, width, height, depth,
......
......@@ -162,7 +162,7 @@ MakeRootTile(WindowPtr pWin)
register int i, j;
pWin->background.pixmap = (*pScreen->CreatePixmap)(pScreen, 4, 4,
pScreen->rootDepth);
pScreen->rootDepth, 0);
pWin->backgroundState = BackgroundPixmap;
pGC = GetScratchGC(pScreen->rootDepth, pScreen);
......
......@@ -96,8 +96,8 @@ struct nxagentPixmapPair
PixmapPtr pMap;
};
PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width,
int height, int depth)
PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width, int height,
int depth, unsigned usage_hint)
{
nxagentPrivPixmapPtr pPixmapPriv, pVirtualPriv;
......@@ -106,7 +106,8 @@ PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width,
#ifdef DEBUG
fprintf(stderr, "nxagentCreatePixmap: Creating pixmap with width [%d] "
"height [%d] depth [%d].\n", width, height, depth);
"height [%d] depth [%d] and allocation hint [%d].\n",
width, height, depth, usage_hint);
#endif
/*
......@@ -120,7 +121,8 @@ PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width,
{
#ifdef WARNING
fprintf(stderr, "nxagentCreatePixmap: WARNING! Failed to create pixmap with "
"width [%d] height [%d] depth [%d].\n", width, height, depth);
"width [%d] height [%d] depth [%d] and allocation hint [%d].\n",
width, height, depth, usage_hint);
#endif
return NullPixmap;
......@@ -144,6 +146,7 @@ PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width,
pPixmap -> devKind = 0;
pPixmap -> refcnt = 1;
pPixmap -> devPrivate.ptr = NULL;
pPixmap -> usage_hint = usage_hint;
/*
* Initialize the privates of the real picture.
......@@ -242,13 +245,14 @@ PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width,
* Create the pixmap in the virtual framebuffer.
*/
pVirtual = fbCreatePixmap(pScreen, width, height, depth);
pVirtual = fbCreatePixmap(pScreen, width, height, depth, usage_hint);
if (pVirtual == NULL)
{
#ifdef PANIC
fprintf(stderr, "nxagentCreatePixmap: PANIC! Failed to create virtual pixmap with "
"width [%d] height [%d] depth [%d].\n", width, height, depth);
"width [%d] height [%d] depth [%d] and allocation hint [%d].\n",
width, height, depth, usage_hint);
#endif
nxagentDestroyPixmap(pPixmap);
......@@ -257,8 +261,9 @@ PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width,
}
#ifdef TEST
fprintf(stderr,"nxagentCreatePixmap: Allocated memory for the Virtual %sPixmap %p of real Pixmap %p (%dx%d)\n",
nxagentShmPixmapTrap ? "Shm " : "", (void *) pVirtual, (void *) pPixmap, width, height);
fprintf(stderr,"nxagentCreatePixmap: Allocated memory for the Virtual %sPixmap %p of real Pixmap %p (%dx%d),",
"allocation hint [%d].\n",
nxagentShmPixmapTrap ? "Shm " : "", (void *) pVirtual, (void *) pPixmap, width, height, usage_hint);
#endif
pPixmapPriv -> pVirtualPixmap = pVirtual;
......@@ -330,10 +335,11 @@ PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width,
"bits per pixel.\n", (void *) pVirtual);
fprintf(stderr, "nxagentCreatePixmap: WARNING! Real pixmap created with width [%d] "
"height [%d] depth [%d] bits per pixel [%d].\n", pPixmap -> drawable.width,
"height [%d] depth [%d] bits per pixel [%d] and allocation hint [%d].\n",
pPixmap -> drawable.width,
pPixmap -> drawable.height = height, pPixmap -> drawable.depth,
pPixmap -> drawable.bitsPerPixel);
pPixmap -> drawable.bitsPerPixel,
usage_hint);
#endif
if (!nxagentRenderTrap)
......@@ -352,8 +358,8 @@ PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width,
#ifdef TEST
fprintf(stderr, "nxagentCreatePixmap: Created pixmap at [%p] virtual at [%p] with width [%d] "
"height [%d] depth [%d].\n", (void *) pPixmap, (void *) pVirtual,
width, height, depth);
"height [%d] depth [%d] and allocation hint [%d].\n",
(void *) pPixmap, (void *) pVirtual, width, height, depth, usage_hint);
#endif
return pPixmap;
......
......@@ -117,7 +117,7 @@ extern int nxagentPixmapPrivateIndex;
PixmapPtr nxagentPixmapPtr(Pixmap pixmap);
PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width,
int height, int depth);
int height, int depth, unsigned usage_hint);
Bool nxagentDestroyPixmap(PixmapPtr pPixmap);
......
......@@ -2855,7 +2855,7 @@ int nxagentShadowCreateMainWindow(ScreenPtr pScreen, WindowPtr pWin, int width,
DeleteWindow(nxagentShadowWindowPtr, accessWindowID);
}
nxagentShadowPixmapPtr = nxagentCreatePixmap(pScreen, nxagentShadowWidth, nxagentShadowHeight, nxagentShadowDepth);
nxagentShadowPixmapPtr = nxagentCreatePixmap(pScreen, nxagentShadowWidth, nxagentShadowHeight, nxagentShadowDepth, 0);
if (nxagentShadowPixmapPtr)
{
......
......@@ -82,6 +82,7 @@ typedef struct _Pixmap {
short screen_x;
short screen_y;
#endif
unsigned usage_hint; /* see CREATE_PIXMAP_USAGE_* */
} PixmapRec;
#endif /* PIXMAPSTRUCT_H */
......@@ -196,11 +196,19 @@ typedef void (* ClipNotifyProcPtr)(
int /*dx*/,
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)(
ScreenPtr /*pScreen*/,
int /*width*/,
int /*height*/,
int /*depth*/);
int /*depth*/,
unsigned /*usage_hint*/);
typedef Bool (* DestroyPixmapProcPtr)(
PixmapPtr /*pPixmap*/);
......
......@@ -1184,7 +1184,8 @@ miPolyArc(pDraw, pGC, narcs, parcs)
/* allocate a 1 bit deep pixmap of the appropriate size, and
* validate it */
pDrawTo = (DrawablePtr)(*pDraw->pScreen->CreatePixmap)
(pDraw->pScreen, pixmapWidth, pixmapHeight, 1);
(pDraw->pScreen, pixmapWidth, pixmapHeight, 1,
CREATE_PIXMAP_USAGE_SCRATCH);
if (!pDrawTo)
{
FreeScratchGC(pGCTo);
......
......@@ -420,7 +420,8 @@ miOpqStipDrawable(pDraw, pGC, prgnSrc, pbits, srcx, w, h, dstx, dsty)
RegionPtr prgnSrcClip;
pPixmap = (*pDraw->pScreen->CreatePixmap)
(pDraw->pScreen, w + srcx, h, 1);
(pDraw->pScreen, w + srcx, h, 1,
CREATE_PIXMAP_USAGE_SCRATCH);
if (!pPixmap)
return;
......@@ -671,7 +672,8 @@ miGetImage(pDraw, sx, sy, w, h, format, planeMask, pDst)
if (!pGC)
return;
pPixmap = (*pDraw->pScreen->CreatePixmap)
(pDraw->pScreen, w, 1, depth);
(pDraw->pScreen, w, 1, depth,
CREATE_PIXMAP_USAGE_SCRATCH);
if (!pPixmap)
{
FreeScratchGC(pGC);
......
......@@ -493,7 +493,8 @@ miBSGetImage (pDrawable, sx, sy, w, h, format, planemask, pdstLine)
XID subWindowMode = IncludeInferiors;
int x, y;
pPixmap = (*pScreen->CreatePixmap) (pScreen, w, h, depth);
pPixmap = (*pScreen->CreatePixmap) (pScreen, w, h, depth,
CREATE_PIXMAP_USAGE_SCRATCH);
if (!pPixmap)
goto punt;
pGC = GetScratchGC (depth, pScreen);
......@@ -2737,7 +2738,7 @@ miResizeBackingStore(
pNewPixmap = (PixmapPtr)(*pScreen->CreatePixmap)
(pScreen,
nw, nh,
pWin->drawable.depth);
pWin->drawable.depth, 0);
if (!pNewPixmap)
{
#ifdef BSEAGER
......@@ -3737,7 +3738,7 @@ miCreateBSPixmap (pWin, pExtents)
(pScreen,
extents->x2 - extents->x1,
extents->y2 - extents->y1,
pWin->drawable.depth);
pWin->drawable.depth, 0);
}
if (!pBackingStore->pBackingPixmap)
{
......
......@@ -266,7 +266,8 @@ miDCRealize (
pPriv->sourceBits = 0;
pPriv->maskBits = 0;
pPixmap = (*pScreen->CreatePixmap) (pScreen, pCursor->bits->width,
pCursor->bits->height, 32);
pCursor->bits->height, 32,
CREATE_PIXMAP_USAGE_SCRATCH);
if (!pPixmap)
{
free ((void *) pPriv);
......@@ -298,13 +299,13 @@ miDCRealize (
}
pPriv->pPicture = 0;
#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)
{
free ((void *) pPriv);
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)
{
(*pScreen->DestroyPixmap) (pPriv->sourceBits);
......@@ -525,7 +526,7 @@ miDCSaveUnderCursor (pScreen, x, y, w, h)
if (pSave)
(*pScreen->DestroyPixmap) (pSave);
pScreenPriv->pSave = pSave =
(*pScreen->CreatePixmap) (pScreen, w, h, pScreen->rootDepth);
(*pScreen->CreatePixmap) (pScreen, w, h, pScreen->rootDepth, 0);
if (!pSave)
return FALSE;
}
......@@ -735,7 +736,7 @@ miDCMoveCursor (pScreen, pCursor, x, y, w, h, dx, dy, source, mask)
}
#endif
pScreenPriv->pTemp = pTemp = (*pScreen->CreatePixmap)
(pScreen, w, h, pScreenPriv->pSave->drawable.depth);
(pScreen, w, h, pScreenPriv->pSave->drawable.depth, 0);
if (!pTemp)
return FALSE;
}
......
......@@ -125,7 +125,8 @@ miPolyGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase)
FONTMAXBOUNDS(pfont,descent);
pPixmap = (*pDrawable->pScreen->CreatePixmap)(pDrawable->pScreen,
width, height, 1);
width, height, 1,
CREATE_PIXMAP_USAGE_SCRATCH);
if (!pPixmap)
return;
......
......@@ -160,7 +160,7 @@ miCreateScreenResources(pScreen)
/* 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;
......
......@@ -137,7 +137,8 @@ miCompositeRects (CARD8 op,
goto bail1;
pPixmap = (*pScreen->CreatePixmap) (pScreen, 1, 1,
rgbaFormat->depth);
rgbaFormat->depth,
CREATE_PIXMAP_USAGE_SCRATCH);
if (!pPixmap)
goto bail2;
......
......@@ -62,7 +62,7 @@ miCreateAlphaPicture (ScreenPtr pScreen,
}
pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height,
pPictFormat->depth);
pPictFormat->depth, 0);
if (!pPixmap)
return 0;
pGC = GetScratchGC (pPixmap->drawable.depth, pScreen);
......
......@@ -1570,7 +1570,8 @@ ProcRenderCreateCursor (ClientPtr client)
free (mskbits);
return (BadImplementation);
}
pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, 32);
pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, 32,
CREATE_PIXMAP_USAGE_SCRATCH);
if (!pPixmap)
{
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