summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2007-11-15 12:12:02 -0800
committerAaron Plattner <aplattner@nvidia.com>2007-11-15 12:21:25 -0800
commitf797c96845a3fab37cda6839ebecf9ac5401fd6e (patch)
tree3db85a0412a2817be73a422e869d4b08edf14ff6
parent6bc50de02108f822977fc7545da81fce95ea7ff4 (diff)
Save pixmap allocation hints into the PixmapRec.
-rw-r--r--afb/afbpixmap.c1
-rw-r--r--cfb/cfbpixmap.c1
-rw-r--r--fb/fb.h3
-rw-r--r--fb/fb24_32.c2
-rw-r--r--fb/fbpixmap.c7
-rw-r--r--hw/dmx/dmxpixmap.c1
-rw-r--r--hw/xfree86/xf4bpp/ppcPixmap.c1
-rw-r--r--hw/xgl/xglpixmap.c1
-rw-r--r--hw/xnest/Pixmap.c1
-rw-r--r--hw/xwin/winpixmap.c1
-rw-r--r--include/pixmapstr.h1
-rw-r--r--mfb/mfbpixmap.c1
12 files changed, 17 insertions, 4 deletions
diff --git a/afb/afbpixmap.c b/afb/afbpixmap.c
index d15d86114..c6196182d 100644
--- a/afb/afbpixmap.c
+++ b/afb/afbpixmap.c
@@ -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);
}
diff --git a/cfb/cfbpixmap.c b/cfb/cfbpixmap.c
index a7be7cc1b..f5a9a41ef 100644
--- a/cfb/cfbpixmap.c
+++ b/cfb/cfbpixmap.c
@@ -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;
}
diff --git a/fb/fb.h b/fb/fb.h
index 380e2e118..5c01c56c8 100644
--- a/fb/fb.h
+++ b/fb/fb.h
@@ -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,
diff --git a/fb/fb24_32.c b/fb/fb24_32.c
index 00b739b25..a03726b8d 100644
--- a/fb/fb24_32.c
+++ b/fb/fb24_32.c
@@ -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,
diff --git a/fb/fbpixmap.c b/fb/fbpixmap.c
index cddab3ee3..b9c93ea96 100644
--- a/fb/fbpixmap.c
+++ b/fb/fbpixmap.c
@@ -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
diff --git a/hw/dmx/dmxpixmap.c b/hw/dmx/dmxpixmap.c
index acc08c38a..29162f971 100644
--- a/hw/dmx/dmxpixmap.c
+++ b/hw/dmx/dmxpixmap.c
@@ -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;
diff --git a/hw/xfree86/xf4bpp/ppcPixmap.c b/hw/xfree86/xf4bpp/ppcPixmap.c
index 241217bf4..73524c3fc 100644
--- a/hw/xfree86/xf4bpp/ppcPixmap.c
+++ b/hw/xfree86/xf4bpp/ppcPixmap.c
@@ -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 ;
}
diff --git a/hw/xgl/xglpixmap.c b/hw/xgl/xglpixmap.c
index 8c54d64fc..fe2a7b1c0 100644
--- a/hw/xgl/xglpixmap.c
+++ b/hw/xgl/xglpixmap.c
@@ -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);
diff --git a/hw/xnest/Pixmap.c b/hw/xnest/Pixmap.c
index 1f420015a..922975262 100644
--- a/hw/xnest/Pixmap.c
+++ b/hw/xnest/Pixmap.c
@@ -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,
diff --git a/hw/xwin/winpixmap.c b/hw/xwin/winpixmap.c
index 994eeb89a..07020eee0 100644
--- a/hw/xwin/winpixmap.c
+++ b/hw/xwin/winpixmap.c
@@ -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);
diff --git a/include/pixmapstr.h b/include/pixmapstr.h
index 459488226..dc03cf202 100644
--- a/include/pixmapstr.h
+++ b/include/pixmapstr.h
@@ -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 */
diff --git a/mfb/mfbpixmap.c b/mfb/mfbpixmap.c
index 438e9ab57..377398534 100644
--- a/mfb/mfbpixmap.c
+++ b/mfb/mfbpixmap.c
@@ -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;
}