mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 05:54:08 +00:00
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.
This commit is contained in:
3
fb/fb.h
3
fb/fb.h
@@ -1624,7 +1624,8 @@ PixmapPtr
|
||||
fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp);
|
||||
|
||||
PixmapPtr
|
||||
fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth);
|
||||
fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth,
|
||||
unsigned usage_hint);
|
||||
|
||||
Bool
|
||||
fbDestroyPixmap (PixmapPtr pPixmap);
|
||||
|
||||
@@ -137,7 +137,7 @@ fbOverlayCreateScreenResources(ScreenPtr pScreen)
|
||||
pbits = pScrPriv->layer[i].u.init.pbits;
|
||||
width = pScrPriv->layer[i].u.init.width;
|
||||
depth = pScrPriv->layer[i].u.init.depth;
|
||||
pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, depth);
|
||||
pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, depth, 0);
|
||||
if (!pPixmap)
|
||||
return FALSE;
|
||||
if (!(*pScreen->ModifyPixmapHeader)(pPixmap, pScreen->width,
|
||||
|
||||
@@ -80,7 +80,8 @@ fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp)
|
||||
}
|
||||
|
||||
PixmapPtr
|
||||
fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth)
|
||||
fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth,
|
||||
unsigned usage_hint)
|
||||
{
|
||||
int bpp;
|
||||
bpp = BitsPerPixel (depth);
|
||||
|
||||
@@ -275,7 +275,7 @@ xxCreateScreenResources(ScreenPtr pScreen)
|
||||
* (BitsPerPixel(depth) >> 3));
|
||||
if (!pBits) return FALSE;
|
||||
|
||||
pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, depth);
|
||||
pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, depth, 0);
|
||||
if (!pPixmap) {
|
||||
xfree(pBits);
|
||||
return FALSE;
|
||||
|
||||
Reference in New Issue
Block a user