From aa50b35a5054d59d7d1d430435665b0a38866b74 Mon Sep 17 00:00:00 2001 From: Aaron Plattner Date: Wed, 22 Feb 2017 14:14:41 +0100 Subject: Save pixmap allocation hints into the PixmapRec. Backported from X.org: commit f797c96845a3fab37cda6839ebecf9ac5401fd6e Author: Aaron Plattner Date: Thu Nov 15 12:12:02 2007 -0800 Save pixmap allocation hints into the PixmapRec. Backported-to-NX-by: Mike Gabriel --- nx-X11/programs/Xserver/fb/fb24_32.c | 2 +- nx-X11/programs/Xserver/fb/fbpixmap.c | 6 ++++-- nx-X11/programs/Xserver/hw/nxagent/Pixmap.c | 1 + nx-X11/programs/Xserver/include/pixmapstr.h | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) (limited to 'nx-X11/programs/Xserver') diff --git a/nx-X11/programs/Xserver/fb/fb24_32.c b/nx-X11/programs/Xserver/fb/fb24_32.c index 13af3acb2..f80874e2f 100644 --- a/nx-X11/programs/Xserver/fb/fb24_32.c +++ b/nx-X11/programs/Xserver/fb/fb24_32.c @@ -537,7 +537,7 @@ fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel) pOldTile->drawable.width, pOldTile->drawable.height, pOldTile->drawable.depth, - bitsPerPixel); + bitsPerPixel, 0); if (!pNewTile) return 0; fbGetDrawable (&pOldTile->drawable, diff --git a/nx-X11/programs/Xserver/fb/fbpixmap.c b/nx-X11/programs/Xserver/fb/fbpixmap.c index abdbc54a9..5f24433e3 100644 --- a/nx-X11/programs/Xserver/fb/fbpixmap.c +++ b/nx-X11/programs/Xserver/fb/fbpixmap.c @@ -31,7 +31,8 @@ #include "fb.h" PixmapPtr -fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp) +fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp, + unsigned usage_hint) { PixmapPtr pPixmap; size_t datasize; @@ -81,6 +82,7 @@ fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp) pPixmap->screen_x = 0; pPixmap->screen_y = 0; #endif + pPixmap->usage_hint = usage_hint; return pPixmap; } @@ -95,7 +97,7 @@ fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth, if (bpp == 32 && depth <= 24) bpp = fbGetScreenPrivate(pScreen)->pix32bpp; #endif - return fbCreatePixmapBpp (pScreen, width, height, depth, bpp); + return fbCreatePixmapBpp (pScreen, width, height, depth, bpp, usage_hint); } Bool diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c index 87cf136cc..3f2d65de2 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c @@ -144,6 +144,7 @@ PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width, pPixmap -> devKind = 0; pPixmap -> refcnt = 1; pPixmap -> devPrivate.ptr = NULL; + pPixmap -> usage_hint = usage_hint; /* * Initialize the privates of the real picture. diff --git a/nx-X11/programs/Xserver/include/pixmapstr.h b/nx-X11/programs/Xserver/include/pixmapstr.h index 5189c3e09..82b96d456 100644 --- a/nx-X11/programs/Xserver/include/pixmapstr.h +++ b/nx-X11/programs/Xserver/include/pixmapstr.h @@ -82,6 +82,7 @@ typedef struct _Pixmap { short screen_x; short screen_y; #endif + unsigned usage_hint; /* see CREATE_PIXMAP_USAGE_* */ } PixmapRec; #endif /* PIXMAPSTRUCT_H */ -- cgit v1.2.3