Commit f797c968 authored by Aaron Plattner's avatar Aaron Plattner

Save pixmap allocation hints into the PixmapRec.

parent 6bc50de0
......@@ -105,6 +105,7 @@ afbCreatePixmap(pScreen, width, height, depth, usage_hint)
pPixmap->refcnt = 1;
pPixmap->devPrivate.ptr = datasize ?
(pointer)((char *)pPixmap + pScreen->totalPixmapSize) : NULL;
pPixmap->usage_hint = usage_hint;
return(pPixmap);
}
......
......@@ -99,6 +99,7 @@ cfbCreatePixmap (pScreen, width, height, depth, usage_hint)
pPixmap->refcnt = 1;
pPixmap->devPrivate.ptr = datasize ?
(pointer)((char *)pPixmap + pScreen->totalPixmapSize) : NULL;
pPixmap->usage_hint = usage_hint;
return pPixmap;
}
......
......@@ -1621,7 +1621,8 @@ fbPictureInit (ScreenPtr pScreen,
*/
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
fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth,
......
......@@ -548,7 +548,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,
......
......@@ -29,7 +29,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;
......@@ -76,6 +77,8 @@ fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp)
pPixmap->screen_y = 0;
#endif
pPixmap->usage_hint = usage_hint;
return pPixmap;
}
......@@ -89,7 +92,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
......
......@@ -116,6 +116,7 @@ PixmapPtr dmxCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
pPixmap->drawable.height = height;
pPixmap->devKind = PixmapBytePad(width, bpp);
pPixmap->refcnt = 1;
pPixmap->usage_hint = usage_hint;
pPixPriv = DMX_GET_PIXMAP_PRIV(pPixmap);
pPixPriv->pixmap = (Pixmap)0;
......
......@@ -123,6 +123,7 @@ xf4bppCreatePixmap( pScreen, width, height, depth, usage_hint )
pPixmap->devPrivate.ptr = (pointer) (((CARD8*)pPixmap)
+ pScreen->totalPixmapSize);
bzero( (char *) pPixmap->devPrivate.ptr, size ) ;
pPixmap->usage_hint = usage_hint;
return pPixmap ;
}
......
......@@ -254,6 +254,7 @@ xglCreatePixmap (ScreenPtr pScreen,
pPixmap->devKind = 0;
pPixmap->refcnt = 1;
pPixmap->devPrivate.ptr = 0;
pPixmap->usage_hint = usage_hint;
pPixmapPriv = XGL_GET_PIXMAP_PRIV (pPixmap);
......
......@@ -58,6 +58,7 @@ xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth,
pPixmap->devKind = PixmapBytePad(width, depth);
pPixmap->devPrivates[xnestPixmapPrivateIndex].ptr =
(pointer)((char *)pPixmap + pScreen->totalPixmapSize);
pPixmap->usage_hint = usage_hint;
if (width && height)
xnestPixmapPriv(pPixmap)->pixmap =
XCreatePixmap(xnestDisplay,
......
......@@ -98,6 +98,7 @@ winCreatePixmapNativeGDI (ScreenPtr pScreen,
pPixmap->devKind = 0;
pPixmap->refcnt = 1;
pPixmap->devPrivate.ptr = NULL;
pPixmap->usage_hint = usage_hint;
/* Pixmap privates are allocated by AllocatePixmap */
pPixmapPriv = winGetPixmapPriv (pPixmap);
......
......@@ -90,6 +90,7 @@ typedef struct _Pixmap {
short screen_x;
short screen_y;
#endif
unsigned usage_hint; /* see CREATE_PIXMAP_USAGE_* */
} PixmapRec;
#endif /* PIXMAPSTRUCT_H */
......@@ -104,6 +104,7 @@ mfbCreatePixmap (pScreen, width, height, depth, usage_hint)
pPixmap->refcnt = 1;
pPixmap->devPrivate.ptr = datasize ?
(pointer)((char *)pPixmap + pScreen->totalPixmapSize) : NULL;
pPixmap->usage_hint = usage_hint;
return pPixmap;
}
......
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