Commit aa50b35a authored by Aaron Plattner's avatar Aaron Plattner Committed by Mike Gabriel

Save pixmap allocation hints into the PixmapRec.

Backported from X.org: commit f797c96845a3fab37cda6839ebecf9ac5401fd6e Author: Aaron Plattner <aplattner@nvidia.com> Date: Thu Nov 15 12:12:02 2007 -0800 Save pixmap allocation hints into the PixmapRec. Backported-to-NX-by: 's avatarMike Gabriel <mike.gabriel@das-netzwerkteam.de>
parent 3ef6d512
...@@ -537,7 +537,7 @@ fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel) ...@@ -537,7 +537,7 @@ fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel)
pOldTile->drawable.width, pOldTile->drawable.width,
pOldTile->drawable.height, pOldTile->drawable.height,
pOldTile->drawable.depth, pOldTile->drawable.depth,
bitsPerPixel); bitsPerPixel, 0);
if (!pNewTile) if (!pNewTile)
return 0; return 0;
fbGetDrawable (&pOldTile->drawable, fbGetDrawable (&pOldTile->drawable,
......
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
#include "fb.h" #include "fb.h"
PixmapPtr 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; PixmapPtr pPixmap;
size_t datasize; size_t datasize;
...@@ -81,6 +82,7 @@ fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp) ...@@ -81,6 +82,7 @@ fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp)
pPixmap->screen_x = 0; pPixmap->screen_x = 0;
pPixmap->screen_y = 0; pPixmap->screen_y = 0;
#endif #endif
pPixmap->usage_hint = usage_hint;
return pPixmap; return pPixmap;
} }
...@@ -95,7 +97,7 @@ fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth, ...@@ -95,7 +97,7 @@ fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth,
if (bpp == 32 && depth <= 24) if (bpp == 32 && depth <= 24)
bpp = fbGetScreenPrivate(pScreen)->pix32bpp; bpp = fbGetScreenPrivate(pScreen)->pix32bpp;
#endif #endif
return fbCreatePixmapBpp (pScreen, width, height, depth, bpp); return fbCreatePixmapBpp (pScreen, width, height, depth, bpp, usage_hint);
} }
Bool Bool
......
...@@ -144,6 +144,7 @@ PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width, ...@@ -144,6 +144,7 @@ PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width,
pPixmap -> devKind = 0; pPixmap -> devKind = 0;
pPixmap -> refcnt = 1; pPixmap -> refcnt = 1;
pPixmap -> devPrivate.ptr = NULL; pPixmap -> devPrivate.ptr = NULL;
pPixmap -> usage_hint = usage_hint;
/* /*
* Initialize the privates of the real picture. * Initialize the privates of the real picture.
......
...@@ -82,6 +82,7 @@ typedef struct _Pixmap { ...@@ -82,6 +82,7 @@ typedef struct _Pixmap {
short screen_x; short screen_x;
short screen_y; short screen_y;
#endif #endif
unsigned usage_hint; /* see CREATE_PIXMAP_USAGE_* */
} PixmapRec; } PixmapRec;
#endif /* PIXMAPSTRUCT_H */ #endif /* PIXMAPSTRUCT_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment