summaryrefslogtreecommitdiff
path: root/afb
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 /afb
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 'afb')
-rw-r--r--afb/afb.h3
-rw-r--r--afb/afbimage.c3
-rw-r--r--afb/afbpixmap.c9
3 files changed, 10 insertions, 5 deletions
diff --git a/afb/afb.h b/afb/afb.h
index 943c2c68a..769e4502f 100644
--- a/afb/afb.h
+++ b/afb/afb.h
@@ -483,7 +483,8 @@ extern PixmapPtr afbCreatePixmap(
ScreenPtr /*pScreen*/,
int /*width*/,
int /*height*/,
- int /*depth*/
+ int /*depth*/,
+ unsigned /*usage_hint*/
);
extern Bool afbDestroyPixmap(
diff --git a/afb/afbimage.c b/afb/afbimage.c
index 81f49730a..890429fe6 100644
--- a/afb/afbimage.c
+++ b/afb/afbimage.c
@@ -72,7 +72,8 @@ afbPutImage(pDraw, pGC, depth, x, y, width, height, leftPad, format, pImage)
int depthDst;
/* Create a tmp pixmap */
- pPixmap = (pScreen->CreatePixmap)(pScreen, width, height, depth);
+ pPixmap = (pScreen->CreatePixmap)(pScreen, width, height, depth,
+ CREATE_PIXMAP_USAGE_SCRATCH);
if (!pPixmap)
return;
diff --git a/afb/afbpixmap.c b/afb/afbpixmap.c
index 77ba53513..b0ac80105 100644
--- a/afb/afbpixmap.c
+++ b/afb/afbpixmap.c
@@ -70,11 +70,12 @@ SOFTWARE.
#include "mfb.h"
PixmapPtr
-afbCreatePixmap(pScreen, width, height, depth)
+afbCreatePixmap(pScreen, width, height, depth, usage_hint)
ScreenPtr pScreen;
int width;
int height;
int depth;
+ unsigned usage_hint;
{
PixmapPtr pPixmap;
size_t datasize;
@@ -127,8 +128,10 @@ afbCopyPixmap(PixmapPtr pSrc)
size = pSrc->drawable.height * pSrc->devKind * pSrc->drawable.depth;
pScreen = pSrc->drawable.pScreen;
- pDst = (*pScreen->CreatePixmap)(pScreen, pSrc->drawable.width,
- pSrc->drawable.height, pSrc->drawable.depth);
+ pDst = (*pScreen->CreatePixmap)(pScreen,
+ pSrc->drawable.width,
+ pSrc->drawable.height,
+ pSrc->drawable.depth, 0);
if (!pDst)
return(NullPixmap);
memmove((char *)pDst->devPrivate.ptr, (char *)pSrc->devPrivate.ptr, size);