summaryrefslogtreecommitdiff
path: root/hw/xgl
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2007-10-31 14:15:35 -0700
committerAaron Plattner <aplattner@nvidia.com>2007-11-04 16:11:28 -0800
commitf2e310132fbe1520c1b5f3da4faa2d2d47835e72 (patch)
treeb2c053ee4a4bdc54267caf59543c9adb0057fc5a /hw/xgl
parent3f1b6765aadf665ede8253464da19a5878f16e56 (diff)
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.
Diffstat (limited to 'hw/xgl')
-rw-r--r--hw/xgl/xgl.h3
-rw-r--r--hw/xgl/xglglyph.c3
-rw-r--r--hw/xgl/xglpict.c2
-rw-r--r--hw/xgl/xglpixmap.c3
-rw-r--r--hw/xgl/xglscreen.c2
-rw-r--r--hw/xgl/xglshm.c3
-rw-r--r--hw/xgl/xgltrap.c3
-rw-r--r--hw/xgl/xglxv.c2
8 files changed, 13 insertions, 8 deletions
diff --git a/hw/xgl/xgl.h b/hw/xgl/xgl.h
index 7bca1d53e..80fa69577 100644
--- a/hw/xgl/xgl.h
+++ b/hw/xgl/xgl.h
@@ -870,7 +870,8 @@ PixmapPtr
xglCreatePixmap (ScreenPtr pScreen,
int width,
int height,
- int depth);
+ int depth,
+ unsigned usage_hint);
void
xglFiniPixmap (PixmapPtr pPixmap);
diff --git a/hw/xgl/xglglyph.c b/hw/xgl/xglglyph.c
index 7a601889c..c1a484ac0 100644
--- a/hw/xgl/xglglyph.c
+++ b/hw/xgl/xglglyph.c
@@ -1075,7 +1075,8 @@ xglGlyphs (CARD8 op,
pPixmap = (*pScreen->CreatePixmap) (pScreen,
rect.width, rect.height,
- maskFormat->depth);
+ maskFormat->depth,
+ CREATE_PIXMAP_USAGE_SCRATCH);
if (!pPixmap)
return;
diff --git a/hw/xgl/xglpict.c b/hw/xgl/xglpict.c
index 932d31a33..fee2431b7 100644
--- a/hw/xgl/xglpict.c
+++ b/hw/xgl/xglpict.c
@@ -494,7 +494,7 @@ xglSyncPicture (ScreenPtr pScreen,
return FALSE;
pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height,
- pFormat->depth);
+ pFormat->depth, 0);
if (!pPixmap)
return FALSE;
diff --git a/hw/xgl/xglpixmap.c b/hw/xgl/xglpixmap.c
index 368c3eaeb..8c54d64fc 100644
--- a/hw/xgl/xglpixmap.c
+++ b/hw/xgl/xglpixmap.c
@@ -222,7 +222,8 @@ PixmapPtr
xglCreatePixmap (ScreenPtr pScreen,
int width,
int height,
- int depth)
+ int depth,
+ unsigned usage_hint)
{
xglPixmapPtr pPixmapPriv;
PixmapPtr pPixmap;
diff --git a/hw/xgl/xglscreen.c b/hw/xgl/xglscreen.c
index 9b7297b91..cd3b59a34 100644
--- a/hw/xgl/xglscreen.c
+++ b/hw/xgl/xglscreen.c
@@ -447,7 +447,7 @@ xglCreateSolidAlphaPicture (ScreenPtr pScreen)
if (!pGC)
return;
- pPixmap = (*pScreen->CreatePixmap) (pScreen, 1, 1, pFormat->depth);
+ pPixmap = (*pScreen->CreatePixmap) (pScreen, 1, 1, pFormat->depth, 0);
if (!pPixmap)
return;
diff --git a/hw/xgl/xglshm.c b/hw/xgl/xglshm.c
index 52a8aabb8..567daa954 100644
--- a/hw/xgl/xglshm.c
+++ b/hw/xgl/xglshm.c
@@ -64,7 +64,8 @@ xglShmPutImage (DrawablePtr pDrawable,
}
else
{
- pPixmap = (*pScreen->CreatePixmap) (pScreen, sw, sh, depth);
+ pPixmap = (*pScreen->CreatePixmap) (pScreen, sw, sh, depth,
+ CREATE_PIXMAP_USAGE_SCRATCH);
if (pPixmap)
{
GCPtr pScratchGC;
diff --git a/hw/xgl/xgltrap.c b/hw/xgl/xgltrap.c
index 26e2bc451..6e7a5082c 100644
--- a/hw/xgl/xgltrap.c
+++ b/hw/xgl/xgltrap.c
@@ -194,7 +194,8 @@ xglTrapezoids (CARD8 op,
pPixmap = (*pScreen->CreatePixmap) (pScreen,
rect.width, rect.height,
- maskFormat->depth);
+ maskFormat->depth,
+ CREATE_PIXMAP_USAGE_SCRATCH);
if (!pPixmap)
return;
diff --git a/hw/xgl/xglxv.c b/hw/xgl/xglxv.c
index aaa66c738..8138a0cbb 100644
--- a/hw/xgl/xglxv.c
+++ b/hw/xgl/xglxv.c
@@ -290,7 +290,7 @@ xglXvPutImage (ClientPtr client,
if (!pPortPriv->pPixmap)
{
- pPortPriv->pPixmap = (*pScreen->CreatePixmap) (pScreen, 0, 0, depth);
+ pPortPriv->pPixmap = (*pScreen->CreatePixmap) (pScreen, 0, 0, depth, 0);
if (!pPortPriv->pPixmap)
return BadAlloc;
}