From 3ef6d51202a5c4f8ad23d17abf0ee9957129e88c Mon Sep 17 00:00:00 2001 From: Aaron Plattner Date: Wed, 22 Feb 2017 13:30:48 +0100 Subject: Add CreatePixmap allocation hints. Backported from X.org: commit f2e310132fbe1520c1b5f3da4faa2d2d47835e72 Author: Aaron Plattner Date: Wed Oct 31 14:15:35 2007 -0700 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. Backported-to-NX-by: Mike Gabriel --- nx-X11/programs/Xserver/render/mirect.c | 3 ++- nx-X11/programs/Xserver/render/mitrap.c | 2 +- nx-X11/programs/Xserver/render/render.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'nx-X11/programs/Xserver/render') diff --git a/nx-X11/programs/Xserver/render/mirect.c b/nx-X11/programs/Xserver/render/mirect.c index 3ce7a7f4c..888492140 100644 --- a/nx-X11/programs/Xserver/render/mirect.c +++ b/nx-X11/programs/Xserver/render/mirect.c @@ -137,7 +137,8 @@ miCompositeRects (CARD8 op, goto bail1; pPixmap = (*pScreen->CreatePixmap) (pScreen, 1, 1, - rgbaFormat->depth); + rgbaFormat->depth, + CREATE_PIXMAP_USAGE_SCRATCH); if (!pPixmap) goto bail2; diff --git a/nx-X11/programs/Xserver/render/mitrap.c b/nx-X11/programs/Xserver/render/mitrap.c index 96f1159a4..d3d052800 100644 --- a/nx-X11/programs/Xserver/render/mitrap.c +++ b/nx-X11/programs/Xserver/render/mitrap.c @@ -62,7 +62,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/nx-X11/programs/Xserver/render/render.c b/nx-X11/programs/Xserver/render/render.c index 43cb430aa..24a8675f6 100644 --- a/nx-X11/programs/Xserver/render/render.c +++ b/nx-X11/programs/Xserver/render/render.c @@ -1570,7 +1570,8 @@ ProcRenderCreateCursor (ClientPtr client) free (mskbits); return (BadImplementation); } - pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, 32); + pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, 32, + CREATE_PIXMAP_USAGE_SCRATCH); if (!pPixmap) { free (argbbits); -- cgit v1.2.3