summaryrefslogtreecommitdiff
path: root/fb
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2011-01-20 18:37:45 -0500
committerAdam Jackson <ajax@redhat.com>2011-03-08 13:16:50 -0500
commit1564c82417d201de5b9a5ec5e7aa4ef14c45fbad (patch)
tree151801f1716c899db4ad57bb2b6ffc60592229c7 /fb
parentd8caa782009abf4dc17b945e325e83fda299a534 (diff)
dix: Remove usage_hint from pixmaps, store it in ->drawable.class
The class field was unused for pixmaps, and we don't have enough classes to justify a whole uint32 anyway. Reviewed-by: Soren Sandmann <ssp@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'fb')
-rw-r--r--fb/fb.h4
-rw-r--r--fb/fb24_32.c2
-rw-r--r--fb/fbpixmap.c10
3 files changed, 7 insertions, 9 deletions
diff --git a/fb/fb.h b/fb/fb.h
index 021a940d0..d90521907 100644
--- a/fb/fb.h
+++ b/fb/fb.h
@@ -1625,11 +1625,11 @@ fbPictureInit (ScreenPtr pScreen,
extern _X_EXPORT PixmapPtr
fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp,
- unsigned usage_hint);
+ unsigned class);
extern _X_EXPORT PixmapPtr
fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth,
- unsigned usage_hint);
+ unsigned class);
extern _X_EXPORT Bool
fbDestroyPixmap (PixmapPtr pPixmap);
diff --git a/fb/fb24_32.c b/fb/fb24_32.c
index 2e600edc0..e24f394bc 100644
--- a/fb/fb24_32.c
+++ b/fb/fb24_32.c
@@ -546,7 +546,7 @@ fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel)
pNewTile = pScreen->CreatePixmap(pScreen, pOldTile->drawable.width,
pOldTile->drawable.height,
pOldTile->drawable.depth,
- pOldTile->usage_hint);
+ pOldTile->drawable.class);
if (!pNewTile)
return 0;
fbGetDrawable (&pOldTile->drawable,
diff --git a/fb/fbpixmap.c b/fb/fbpixmap.c
index 41b12cea7..232de82a9 100644
--- a/fb/fbpixmap.c
+++ b/fb/fbpixmap.c
@@ -30,7 +30,7 @@
PixmapPtr
fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp,
- unsigned usage_hint)
+ unsigned class)
{
PixmapPtr pPixmap;
size_t datasize;
@@ -54,7 +54,7 @@ fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp,
if (!pPixmap)
return NullPixmap;
pPixmap->drawable.type = DRAWABLE_PIXMAP;
- pPixmap->drawable.class = 0;
+ pPixmap->drawable.class = class;
pPixmap->drawable.pScreen = pScreen;
pPixmap->drawable.depth = depth;
pPixmap->drawable.bitsPerPixel = bpp;
@@ -78,14 +78,12 @@ fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp,
pPixmap->screen_y = 0;
#endif
- pPixmap->usage_hint = usage_hint;
-
return pPixmap;
}
PixmapPtr
fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth,
- unsigned usage_hint)
+ unsigned class)
{
int bpp;
bpp = BitsPerPixel (depth);
@@ -93,7 +91,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, usage_hint);
+ return fbCreatePixmapBpp (pScreen, width, height, depth, bpp, class);
}
Bool