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. --- render/glyph.c | 3 ++- render/mirect.c | 4 ++-- render/mitrap.c | 2 +- render/render.c | 6 ++++-- 4 files changed, 9 insertions(+), 6 deletions(-) (limited to 'render') diff --git a/render/glyph.c b/render/glyph.c index f3e3917b1..e1dc0bc99 100644 --- a/render/glyph.c +++ b/render/glyph.c @@ -969,7 +969,8 @@ miGlyphs (CARD8 op, width = extents.x2 - extents.x1; height = extents.y2 - extents.y1; pMaskPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, - maskFormat->depth); + maskFormat->depth, + CREATE_PIXMAP_USAGE_SCRATCH); if (!pMaskPixmap) return; component_alpha = NeedsComponent(maskFormat->format); diff --git a/render/mirect.c b/render/mirect.c index 87767a76c..464df51c1 100644 --- a/render/mirect.c +++ b/render/mirect.c @@ -135,8 +135,8 @@ miCompositeRects (CARD8 op, if (!rgbaFormat) goto bail1; - pPixmap = (*pScreen->CreatePixmap) (pScreen, 1, 1, - rgbaFormat->depth); + pPixmap = (*pScreen->CreatePixmap) (pScreen, 1, 1, rgbaFormat->depth, + CREATE_PIXMAP_USAGE_SCRATCH); if (!pPixmap) goto bail2; diff --git a/render/mitrap.c b/render/mitrap.c index c6188061c..8bdc8a8d0 100644 --- a/render/mitrap.c +++ b/render/mitrap.c @@ -61,7 +61,7 @@ miCreateAlphaPicture (ScreenPtr pScreen, } pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, - pPictFormat->depth); + pPictFormat->depth, 0); if (!pPixmap) return 0; pGC = GetScratchGC (pPixmap->drawable.depth, pScreen); diff --git a/render/render.c b/render/render.c index 1a1cd7a0e..b0707539f 100644 --- a/render/render.c +++ b/render/render.c @@ -1202,7 +1202,8 @@ ProcRenderAddGlyphs (ClientPtr client) } pDstPix = (pScreen->CreatePixmap) (pScreen, - width, height, depth); + width, height, depth, + CREATE_PIMXAP_USAGE_GLYPH_PICTURE); GlyphPicture (glyph)[screen] = pDst = CreatePicture (0, &pDstPix->drawable, @@ -1636,7 +1637,8 @@ ProcRenderCreateCursor (ClientPtr client) xfree (mskbits); return (BadImplementation); } - pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, 32); + pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, 32, + CREATE_PIXMAP_USAGE_SCRATCH); if (!pPixmap) { xfree (argbbits); -- cgit v1.2.3