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 /cfb | |
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 'cfb')
-rw-r--r-- | cfb/cfb.h | 3 | ||||
-rw-r--r-- | cfb/cfbbitblt.c | 3 | ||||
-rw-r--r-- | cfb/cfbpixmap.c | 5 |
3 files changed, 7 insertions, 4 deletions
@@ -739,7 +739,8 @@ extern PixmapPtr cfbCreatePixmap( ScreenPtr /*pScreen*/, int /*width*/, int /*height*/, - int /*depth*/ + int /*depth*/, + unsigned /*usage_hint*/ ); extern Bool cfbDestroyPixmap( diff --git a/cfb/cfbbitblt.c b/cfb/cfbbitblt.c index faf49b92d..d86f9df11 100644 --- a/cfb/cfbbitblt.c +++ b/cfb/cfbbitblt.c @@ -1407,7 +1407,8 @@ RegionPtr cfbCopyPlane(pSrcDrawable, pDstDrawable, ScreenPtr pScreen = pSrcDrawable->pScreen; GCPtr pGC1; - pBitmap = (*pScreen->CreatePixmap) (pScreen, width, height, 1); + pBitmap = (*pScreen->CreatePixmap) (pScreen, width, height, 1, + CREATE_PIXMAP_USAGE_SCRATCH); if (!pBitmap) return NULL; pGC1 = GetScratchGC (1, pScreen); diff --git a/cfb/cfbpixmap.c b/cfb/cfbpixmap.c index 6fdf3eae6..36ed5724d 100644 --- a/cfb/cfbpixmap.c +++ b/cfb/cfbpixmap.c @@ -65,11 +65,12 @@ SOFTWARE. #include "cfbmskbits.h" PixmapPtr -cfbCreatePixmap (pScreen, width, height, depth) +cfbCreatePixmap (pScreen, width, height, depth, usage_hint) ScreenPtr pScreen; int width; int height; int depth; + unsigned usage_hint; { PixmapPtr pPixmap; size_t datasize; @@ -122,7 +123,7 @@ cfbCopyPixmap(pSrc) size = pSrc->drawable.height * pSrc->devKind; pScreen = pSrc->drawable.pScreen; pDst = (*pScreen->CreatePixmap) (pScreen, pSrc->drawable.width, - pSrc->drawable.height, pSrc->drawable.depth); + pSrc->drawable.height, pSrc->drawable.depth, 0); if (!pDst) return NullPixmap; memmove((char *)pDst->devPrivate.ptr, (char *)pSrc->devPrivate.ptr, size); |