summaryrefslogtreecommitdiff
path: root/exa
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-04-23 12:04:17 +1000
committerDave Airlie <airlied@redhat.com>2009-04-23 12:04:17 +1000
commit02ae85c4c93bbd0013c063ce0014b365a8ba061f (patch)
treea3c539db09bffdceb7e332af4e2535d65bb73fe9 /exa
parent9d684ba0bcab53841a17ebd521507b6df8bc4b45 (diff)
exa: add CreatePixmap2 hook for driver pixmaps.
This adds a revised pixmap hook for driver pixmaps, which is required to support tiling on various chips. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'exa')
-rw-r--r--exa/exa.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/exa/exa.c b/exa/exa.c
index 10abf06c9..2de348a8d 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -289,7 +289,7 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
return NullPixmap;
swap(pExaScr, pScreen, CreatePixmap);
- if (!pExaScr->info->CreatePixmap) {
+ if (!pExaScr->info->CreatePixmap && !pExaScr->info->CreatePixmap2) {
pPixmap = pScreen->CreatePixmap (pScreen, w, h, depth, usage_hint);
} else {
driver_alloc = 1;
@@ -324,7 +324,10 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
*/
pPixmap->devPrivate.ptr = NULL;
- pExaPixmap->driverPriv = pExaScr->info->CreatePixmap(pScreen, datasize, 0);
+ if (pExaScr->info->CreatePixmap2)
+ pExaPixmap->driverPriv = pExaScr->info->CreatePixmap2(pScreen, w, h, depth, usage_hint, bpp);
+ else
+ pExaPixmap->driverPriv = pExaScr->info->CreatePixmap(pScreen, datasize, 0);
if (!pExaPixmap->driverPriv) {
swap(pExaScr, pScreen, DestroyPixmap);
pScreen->DestroyPixmap (pPixmap);
@@ -1261,7 +1264,7 @@ exaDriverInit (ScreenPtr pScreen,
wrap(pExaScr, pScreen, DestroyPixmap, exaDestroyPixmap);
wrap(pExaScr, pScreen, ModifyPixmapHeader, exaModifyPixmapHeader);
- if (!pExaScr->info->CreatePixmap) {
+ if (!(pExaScr->info->flags & EXA_HANDLES_PIXMAPS)) {
LogMessage(X_INFO, "EXA(%d): Offscreen pixmap area of %lu bytes\n",
pScreen->myNum,
pExaScr->info->memorySize - pExaScr->info->offScreenBase);
@@ -1274,7 +1277,7 @@ exaDriverInit (ScreenPtr pScreen,
else
LogMessage(X_INFO, "EXA(%d): No offscreen pixmaps\n", pScreen->myNum);
- if (!pExaScr->info->CreatePixmap) {
+ if (!(pExaScr->info->flags & EXA_HANDLES_PIXMAPS)) {
DBG_PIXMAP(("============== %ld < %ld\n", pExaScr->info->offScreenBase,
pExaScr->info->memorySize));
if (pExaScr->info->offScreenBase < pExaScr->info->memorySize) {