Save pixmap allocation hints into the PixmapRec.

This commit is contained in:
Aaron Plattner 2007-11-15 12:12:02 -08:00
parent 6bc50de021
commit f797c96845
12 changed files with 17 additions and 4 deletions

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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,

View File

@ -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,

View File

@ -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

View File

@ -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;

View File

@ -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 ;
}

View File

@ -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);

View File

@ -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,

View File

@ -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);

View File

@ -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 */

View File

@ -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;
}