diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2007-10-31 14:15:35 -0700 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2007-11-04 16:11:28 -0800 |
commit | f2e310132fbe1520c1b5f3da4faa2d2d47835e72 (patch) | |
tree | b2c053ee4a4bdc54267caf59543c9adb0057fc5a /afb | |
parent | 3f1b6765aadf665ede8253464da19a5878f16e56 (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.h | 3 | ||||
-rw-r--r-- | afb/afbimage.c | 3 | ||||
-rw-r--r-- | afb/afbpixmap.c | 9 |
3 files changed, 10 insertions, 5 deletions
@@ -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); |