From f2e310132fbe1520c1b5f3da4faa2d2d47835e72 Mon Sep 17 00:00:00 2001 From: Aaron Plattner Date: Wed, 31 Oct 2007 14:15:35 -0700 Subject: 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. --- hw/xgl/xgl.h | 3 ++- hw/xgl/xglglyph.c | 3 ++- hw/xgl/xglpict.c | 2 +- hw/xgl/xglpixmap.c | 3 ++- hw/xgl/xglscreen.c | 2 +- hw/xgl/xglshm.c | 3 ++- hw/xgl/xgltrap.c | 3 ++- hw/xgl/xglxv.c | 2 +- 8 files changed, 13 insertions(+), 8 deletions(-) (limited to 'hw/xgl') diff --git a/hw/xgl/xgl.h b/hw/xgl/xgl.h index 7bca1d53e..80fa69577 100644 --- a/hw/xgl/xgl.h +++ b/hw/xgl/xgl.h @@ -870,7 +870,8 @@ PixmapPtr xglCreatePixmap (ScreenPtr pScreen, int width, int height, - int depth); + int depth, + unsigned usage_hint); void xglFiniPixmap (PixmapPtr pPixmap); diff --git a/hw/xgl/xglglyph.c b/hw/xgl/xglglyph.c index 7a601889c..c1a484ac0 100644 --- a/hw/xgl/xglglyph.c +++ b/hw/xgl/xglglyph.c @@ -1075,7 +1075,8 @@ xglGlyphs (CARD8 op, pPixmap = (*pScreen->CreatePixmap) (pScreen, rect.width, rect.height, - maskFormat->depth); + maskFormat->depth, + CREATE_PIXMAP_USAGE_SCRATCH); if (!pPixmap) return; diff --git a/hw/xgl/xglpict.c b/hw/xgl/xglpict.c index 932d31a33..fee2431b7 100644 --- a/hw/xgl/xglpict.c +++ b/hw/xgl/xglpict.c @@ -494,7 +494,7 @@ xglSyncPicture (ScreenPtr pScreen, return FALSE; pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, - pFormat->depth); + pFormat->depth, 0); if (!pPixmap) return FALSE; diff --git a/hw/xgl/xglpixmap.c b/hw/xgl/xglpixmap.c index 368c3eaeb..8c54d64fc 100644 --- a/hw/xgl/xglpixmap.c +++ b/hw/xgl/xglpixmap.c @@ -222,7 +222,8 @@ PixmapPtr xglCreatePixmap (ScreenPtr pScreen, int width, int height, - int depth) + int depth, + unsigned usage_hint) { xglPixmapPtr pPixmapPriv; PixmapPtr pPixmap; diff --git a/hw/xgl/xglscreen.c b/hw/xgl/xglscreen.c index 9b7297b91..cd3b59a34 100644 --- a/hw/xgl/xglscreen.c +++ b/hw/xgl/xglscreen.c @@ -447,7 +447,7 @@ xglCreateSolidAlphaPicture (ScreenPtr pScreen) if (!pGC) return; - pPixmap = (*pScreen->CreatePixmap) (pScreen, 1, 1, pFormat->depth); + pPixmap = (*pScreen->CreatePixmap) (pScreen, 1, 1, pFormat->depth, 0); if (!pPixmap) return; diff --git a/hw/xgl/xglshm.c b/hw/xgl/xglshm.c index 52a8aabb8..567daa954 100644 --- a/hw/xgl/xglshm.c +++ b/hw/xgl/xglshm.c @@ -64,7 +64,8 @@ xglShmPutImage (DrawablePtr pDrawable, } else { - pPixmap = (*pScreen->CreatePixmap) (pScreen, sw, sh, depth); + pPixmap = (*pScreen->CreatePixmap) (pScreen, sw, sh, depth, + CREATE_PIXMAP_USAGE_SCRATCH); if (pPixmap) { GCPtr pScratchGC; diff --git a/hw/xgl/xgltrap.c b/hw/xgl/xgltrap.c index 26e2bc451..6e7a5082c 100644 --- a/hw/xgl/xgltrap.c +++ b/hw/xgl/xgltrap.c @@ -194,7 +194,8 @@ xglTrapezoids (CARD8 op, pPixmap = (*pScreen->CreatePixmap) (pScreen, rect.width, rect.height, - maskFormat->depth); + maskFormat->depth, + CREATE_PIXMAP_USAGE_SCRATCH); if (!pPixmap) return; diff --git a/hw/xgl/xglxv.c b/hw/xgl/xglxv.c index aaa66c738..8138a0cbb 100644 --- a/hw/xgl/xglxv.c +++ b/hw/xgl/xglxv.c @@ -290,7 +290,7 @@ xglXvPutImage (ClientPtr client, if (!pPortPriv->pPixmap) { - pPortPriv->pPixmap = (*pScreen->CreatePixmap) (pScreen, 0, 0, depth); + pPortPriv->pPixmap = (*pScreen->CreatePixmap) (pScreen, 0, 0, depth, 0); if (!pPortPriv->pPixmap) return BadAlloc; } -- cgit v1.2.3