aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/mi
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2017-02-22 13:30:48 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-04-10 16:22:28 +0200
commit3ef6d51202a5c4f8ad23d17abf0ee9957129e88c (patch)
tree56e09a5450bd5d89b8f1fc1857f7e50087c3297b /nx-X11/programs/Xserver/mi
parentcc24d8ba254f1e5062c21adfa07f8b58bb2c5eaa (diff)
downloadnx-libs-3ef6d51202a5c4f8ad23d17abf0ee9957129e88c.tar.gz
nx-libs-3ef6d51202a5c4f8ad23d17abf0ee9957129e88c.tar.bz2
nx-libs-3ef6d51202a5c4f8ad23d17abf0ee9957129e88c.zip
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: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Diffstat (limited to 'nx-X11/programs/Xserver/mi')
-rw-r--r--nx-X11/programs/Xserver/mi/miarc.c3
-rw-r--r--nx-X11/programs/Xserver/mi/mibitblt.c6
-rw-r--r--nx-X11/programs/Xserver/mi/mibstore.c7
-rw-r--r--nx-X11/programs/Xserver/mi/midispcur.c11
-rw-r--r--nx-X11/programs/Xserver/mi/miglblt.c3
-rw-r--r--nx-X11/programs/Xserver/mi/miscrinit.c2
6 files changed, 19 insertions, 13 deletions
diff --git a/nx-X11/programs/Xserver/mi/miarc.c b/nx-X11/programs/Xserver/mi/miarc.c
index bd46a243a..5695e24af 100644
--- a/nx-X11/programs/Xserver/mi/miarc.c
+++ b/nx-X11/programs/Xserver/mi/miarc.c
@@ -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);
diff --git a/nx-X11/programs/Xserver/mi/mibitblt.c b/nx-X11/programs/Xserver/mi/mibitblt.c
index 2fdc32500..67d36a742 100644
--- a/nx-X11/programs/Xserver/mi/mibitblt.c
+++ b/nx-X11/programs/Xserver/mi/mibitblt.c
@@ -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);
diff --git a/nx-X11/programs/Xserver/mi/mibstore.c b/nx-X11/programs/Xserver/mi/mibstore.c
index 3c4b74814..3eafac235 100644
--- a/nx-X11/programs/Xserver/mi/mibstore.c
+++ b/nx-X11/programs/Xserver/mi/mibstore.c
@@ -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)
{
diff --git a/nx-X11/programs/Xserver/mi/midispcur.c b/nx-X11/programs/Xserver/mi/midispcur.c
index df15ea311..92d0fb15c 100644
--- a/nx-X11/programs/Xserver/mi/midispcur.c
+++ b/nx-X11/programs/Xserver/mi/midispcur.c
@@ -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;
}
diff --git a/nx-X11/programs/Xserver/mi/miglblt.c b/nx-X11/programs/Xserver/mi/miglblt.c
index 60c28fad4..462534bb6 100644
--- a/nx-X11/programs/Xserver/mi/miglblt.c
+++ b/nx-X11/programs/Xserver/mi/miglblt.c
@@ -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;
diff --git a/nx-X11/programs/Xserver/mi/miscrinit.c b/nx-X11/programs/Xserver/mi/miscrinit.c
index c5b78fa8f..e38284c50 100644
--- a/nx-X11/programs/Xserver/mi/miscrinit.c
+++ b/nx-X11/programs/Xserver/mi/miscrinit.c
@@ -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;