summaryrefslogtreecommitdiff
path: root/mi
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2007-10-31 14:15:35 -0700
committerAaron Plattner <aplattner@nvidia.com>2007-11-04 16:11:28 -0800
commitf2e310132fbe1520c1b5f3da4faa2d2d47835e72 (patch)
treeb2c053ee4a4bdc54267caf59543c9adb0057fc5a /mi
parent3f1b6765aadf665ede8253464da19a5878f16e56 (diff)
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.
Diffstat (limited to 'mi')
-rw-r--r--mi/miarc.c3
-rw-r--r--mi/mibank.c2
-rw-r--r--mi/mibitblt.c6
-rw-r--r--mi/midispcur.c11
-rw-r--r--mi/miglblt.c3
-rw-r--r--mi/miscrinit.c2
6 files changed, 16 insertions, 11 deletions
diff --git a/mi/miarc.c b/mi/miarc.c
index 3b77ce74a..70888155e 100644
--- a/mi/miarc.c
+++ b/mi/miarc.c
@@ -1155,7 +1155,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);
diff --git a/mi/mibank.c b/mi/mibank.c
index 3492f1e0e..d693f2668 100644
--- a/mi/mibank.c
+++ b/mi/mibank.c
@@ -1605,7 +1605,7 @@ miBankCreateScreenResources(
/* Get shadow pixmap; width & height of 0 means no pixmap data */
pScreenPriv->pBankPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0,
- pScreenPriv->pScreenPixmap->drawable.depth);
+ pScreenPriv->pScreenPixmap->drawable.depth, 0);
if (!pScreenPriv->pBankPixmap)
retval = FALSE;
}
diff --git a/mi/mibitblt.c b/mi/mibitblt.c
index e61855a93..1ddccdda1 100644
--- a/mi/mibitblt.c
+++ b/mi/mibitblt.c
@@ -416,7 +416,8 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc,
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;
@@ -667,7 +668,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);
diff --git a/mi/midispcur.c b/mi/midispcur.c
index 802fc6c27..7b203f71f 100644
--- a/mi/midispcur.c
+++ b/mi/midispcur.c
@@ -270,7 +270,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)
{
xfree ((pointer) pPriv);
@@ -302,13 +303,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)
{
xfree ((pointer) 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);
@@ -527,7 +528,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;
}
@@ -737,7 +738,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;
}
diff --git a/mi/miglblt.c b/mi/miglblt.c
index 4db3eb62f..c9ae02db7 100644
--- a/mi/miglblt.c
+++ b/mi/miglblt.c
@@ -120,7 +120,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;
diff --git a/mi/miscrinit.c b/mi/miscrinit.c
index d88eb7118..7a9014aa8 100644
--- a/mi/miscrinit.c
+++ b/mi/miscrinit.c
@@ -158,7 +158,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;