summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2011-08-08 15:30:26 +0100
committerDave Airlie <airlied@redhat.com>2011-08-08 15:31:31 +0100
commit8dc96248a4b879d0a06d5c71294bf065e34c7b38 (patch)
treeefd4904e30ee2f745d1a5566d66d75c6534734b5
parent9d06bb963e3049eaebaa36f39bd6d312399decf5 (diff)
drv: get to build
-rw-r--r--drv/drv_damage.c2
-rw-r--r--drv/drv_damage.h4
-rw-r--r--drv/drv_gc.c54
-rw-r--r--drv/drv_gc.h6
-rw-r--r--drv/drv_gcstruct.h2
-rw-r--r--drv/drv_picture.c52
-rw-r--r--drv/drv_picturestr.h28
-rw-r--r--drv/drv_pixmap.c14
-rw-r--r--drv/drv_pixmap.h4
-rw-r--r--drv/drv_pixmapstr.h2
-rw-r--r--drv/drv_screenint.h5
-rw-r--r--drv/drv_scrnintstr.h102
-rw-r--r--drv/drv_types.h2
-rw-r--r--drv/drvarc.c12
-rw-r--r--drv/drvzerline.c4
-rw-r--r--drv/exa/drvexa.h93
-rw-r--r--drv/exa/exa.c230
-rw-r--r--drv/exa/exa_accel.c88
-rw-r--r--drv/exa/exa_classic.c60
-rw-r--r--drv/exa/exa_driver.c56
-rw-r--r--drv/exa/exa_glyphs.c42
-rw-r--r--drv/exa/exa_migration_classic.c50
-rw-r--r--drv/exa/exa_migration_mixed.c22
-rw-r--r--drv/exa/exa_mixed.c52
-rw-r--r--drv/exa/exa_offscreen.c35
-rw-r--r--drv/exa/exa_priv.h182
-rw-r--r--drv/exa/exa_render.c48
-rw-r--r--drv/exa/exa_unaccel.c116
-rw-r--r--drv/fb/Makefile.am2
-rw-r--r--drv/fb/drv_fbpict.h (renamed from drv/fb/fbpict.h)0
-rw-r--r--drv/fb/drv_wfbrename.h (renamed from drv/fb/wfbrename.h)0
-rw-r--r--drv/fb/drvfb.h (renamed from drv/fb/fb.h)194
-rw-r--r--drv/fb/drvfboverlay.h (renamed from drv/fb/fboverlay.h)0
-rw-r--r--drv/fb/fb24_32.c28
-rw-r--r--drv/fb/fballpriv.c6
-rw-r--r--drv/fb/fbarc.c4
-rw-r--r--drv/fb/fbbits.c2
-rw-r--r--drv/fb/fbbits.h12
-rw-r--r--drv/fb/fbblt.c2
-rw-r--r--drv/fb/fbbltone.c2
-rw-r--r--drv/fb/fbcopy.c22
-rw-r--r--drv/fb/fbfill.c10
-rw-r--r--drv/fb/fbfillrect.c4
-rw-r--r--drv/fb/fbfillsp.c4
-rw-r--r--drv/fb/fbgc.c20
-rw-r--r--drv/fb/fbgetsp.c4
-rw-r--r--drv/fb/fbglyph.c6
-rw-r--r--drv/fb/fbimage.c10
-rw-r--r--drv/fb/fbline.c14
-rw-r--r--drv/fb/fboverlay.c12
-rw-r--r--drv/fb/fbpict.c29
-rw-r--r--drv/fb/fbpixmap.c36
-rw-r--r--drv/fb/fbpoint.c4
-rw-r--r--drv/fb/fbpush.c12
-rw-r--r--drv/fb/fbscreen.c70
-rw-r--r--drv/fb/fbseg.c24
-rw-r--r--drv/fb/fbsetsp.c4
-rw-r--r--drv/fb/fbsolid.c2
-rw-r--r--drv/fb/fbstipple.c2
-rw-r--r--drv/fb/fbtile.c2
-rw-r--r--drv/fb/fbtrap.c4
-rw-r--r--drv/fb/fbutil.c2
-rw-r--r--drv/fb/fbwindow.c10
-rw-r--r--include/privates.h1
64 files changed, 1031 insertions, 896 deletions
diff --git a/drv/drv_damage.c b/drv/drv_damage.c
index a7916f34e..e8ab27980 100644
--- a/drv/drv_damage.c
+++ b/drv/drv_damage.c
@@ -29,7 +29,7 @@ DrvDamageCreate (DrvDamageReportFunc damageReport,
DrvDamageDestroyFunc damageDestroy,
DamageReportLevel damageLevel,
Bool isInternal,
- ScreenPtr pScreen,
+ DrvScreenPtr pScreen,
void *closure)
{
DrvDamagePtr pDamage;
diff --git a/drv/drv_damage.h b/drv/drv_damage.h
index f43c4653e..b8f043b5b 100644
--- a/drv/drv_damage.h
+++ b/drv/drv_damage.h
@@ -1,6 +1,8 @@
#ifndef DRV_DAMAGE_H
#define DRV_DAMAGE_H
+
+#include "drv_types.h"
#include "damage.h"
typedef void (*DrvDamageReportFunc) (DrvDamagePtr pDamage, RegionPtr pRegion, void *closure);
typedef void (*DrvDamageDestroyFunc) (DrvDamagePtr pDamage, void *closure);
@@ -15,7 +17,7 @@ DrvDamageCreate (DrvDamageReportFunc damageReport,
DrvDamageDestroyFunc damageDestroy,
DamageReportLevel damageLevel,
Bool isInternal,
- ScreenPtr pScreen,
+ DrvScreenPtr pScreen,
void * closure);
extern _X_EXPORT RegionPtr DrvDamagePendingRegion (DrvDamagePtr pDamage);
diff --git a/drv/drv_gc.c b/drv/drv_gc.c
index eb5916979..d48232818 100644
--- a/drv/drv_gc.c
+++ b/drv/drv_gc.c
@@ -7,7 +7,7 @@
#include <X11/Xmd.h>
#include <X11/Xproto.h>
#include "misc.h"
-#include "scrnintstr.h"
+#include "drv_scrnintstr.h"
#include "resource.h"
#include "drv_types.h"
#include "drv_gcstruct.h"
@@ -54,15 +54,15 @@ DrvCreateDefaultTile (DrvGCPtr pGC)
w = 1;
h = 1;
- (*pGC->pScreen->gpu.QueryBestSize)(TileShape, &w, &h, pGC->pScreen);
+ (*pGC->pDrvScreen->QueryBestSize)(TileShape, &w, &h, pGC->pDrvScreen);
pTile = (DrvPixmapPtr)
- (*pGC->pScreen->gpu.CreatePixmap)(pGC->pScreen,
+ (*pGC->pDrvScreen->CreatePixmap)(pGC->pDrvScreen,
w, h, pGC->depth, 0, NULL);
- pgcScratch = DrvGetScratchGC(pGC->depth, pGC->pScreen);
+ pgcScratch = DrvGetScratchGC(pGC->depth, pGC->pDrvScreen);
if (!pTile || !pgcScratch)
{
if (pTile)
- (*pTile->pScreen->gpu.DestroyPixmap)(pTile);
+ (*pTile->pDrvScreen->DestroyPixmap)(pTile);
if (pgcScratch)
DrvFreeScratchGC(pgcScratch);
return FALSE;
@@ -232,7 +232,7 @@ DrvChangeGC(DrvGCPtr pGC, BITS32 mask, DrvChangeGCValPtr pUnion)
case GCTile:
NEXT_PTR(DrvPixmapPtr, pPixmap);
if ((pPixmap->depth != pGC->depth) ||
- (pPixmap->pScreen != pGC->pScreen))
+ (pPixmap->pDrvScreen != pGC->pDrvScreen))
{
error = BadMatch;
}
@@ -240,7 +240,7 @@ DrvChangeGC(DrvGCPtr pGC, BITS32 mask, DrvChangeGCValPtr pUnion)
{
pPixmap->refcnt++;
if (!pGC->tileIsPixel)
- (* pGC->pScreen->gpu.DestroyPixmap)(pGC->tile.pixmap);
+ (* pGC->pDrvScreen->DestroyPixmap)(pGC->tile.pixmap);
pGC->tileIsPixel = FALSE;
pGC->tile.pixmap = pPixmap;
}
@@ -248,7 +248,7 @@ DrvChangeGC(DrvGCPtr pGC, BITS32 mask, DrvChangeGCValPtr pUnion)
case GCStipple:
NEXT_PTR(DrvPixmapPtr, pPixmap);
if ((pPixmap->depth != 1) ||
- (pPixmap->pScreen != pGC->pScreen))
+ (pPixmap->pDrvScreen != pGC->pDrvScreen))
{
error = BadMatch;
}
@@ -256,7 +256,7 @@ DrvChangeGC(DrvGCPtr pGC, BITS32 mask, DrvChangeGCValPtr pUnion)
{
pPixmap->refcnt++;
if (pGC->stipple)
- (* pGC->pScreen->gpu.DestroyPixmap)(pGC->stipple);
+ (* pGC->pDrvScreen->DestroyPixmap)(pGC->stipple);
pGC->stipple = pPixmap;
}
break;
@@ -313,7 +313,7 @@ DrvChangeGC(DrvGCPtr pGC, BITS32 mask, DrvChangeGCValPtr pUnion)
if (pPixmap)
{
if ((pPixmap->depth != 1) ||
- (pPixmap->pScreen != pGC->pScreen))
+ (pPixmap->pDrvScreen != pGC->pDrvScreen))
{
error = BadMatch;
break;
@@ -396,7 +396,7 @@ DrvChangeGC(DrvGCPtr pGC, BITS32 mask, DrvChangeGCValPtr pUnion)
#undef NEXT_PTR
DrvGCPtr
-DrvCreateGC(ScreenPtr pScreen, int depth)
+DrvCreateGC(DrvScreenPtr pDrvScreen, int depth)
{
DrvGCPtr pGC;
int status;
@@ -407,7 +407,7 @@ DrvCreateGC(ScreenPtr pScreen, int depth)
return (DrvGCPtr)NULL;
}
- pGC->pScreen = pScreen;
+ pGC->pDrvScreen = pDrvScreen;
pGC->depth = depth;
pGC->alu = GXcopy; /* dst <- src */
pGC->planemask = ~0;
@@ -422,7 +422,7 @@ DrvCreateGC(ScreenPtr pScreen, int depth)
pGC->fillRule = EvenOddRule;
pGC->arcMode = ArcPieSlice;
pGC->tile.pixel = 0;
- pGC->tile.pixmap = NullPixmap;
+ pGC->tile.pixmap = NullDrvPixmap;
#if 0
if (mask & GCForeground)
{
@@ -450,14 +450,14 @@ DrvCreateGC(ScreenPtr pScreen, int depth)
pGC->dashOffset = 0;
/* use the default font and stipple */
- // pGC->stipple = pGC->pScreen->PixmapPerDepth[0];
+ // pGC->stipple = pGC->pDrvScreen->PixmapPerDepth[0];
// pGC->stipple->refcnt++;
/* this is not a scratch GC */
pGC->scratch_inuse = FALSE;
pGC->stateChanges = GCAllBits;
- if (!(*pGC->pScreen->gpu.CreateGC)(pGC))
+ if (!(*pGC->pDrvScreen->CreateGC)(pGC))
status = BadAlloc;
else
status = Success;
@@ -488,9 +488,9 @@ DrvFreeGC(pointer value)
// (* pGC->funcs->DestroyClip)(pGC);
if (!pGC->tileIsPixel)
- (* pGC->pScreen->DestroyPixmap)(pGC->tile.pixmap);
+ (* pGC->pDrvScreen->DestroyPixmap)(pGC->tile.pixmap);
if (pGC->stipple)
- (* pGC->pScreen->DestroyPixmap)(pGC->stipple);
+ (* pGC->pDrvScreen->DestroyPixmap)(pGC->stipple);
(*pGC->funcs->DestroyGC) (pGC);
if (pGC->dash != DefaultDash)
@@ -501,7 +501,7 @@ DrvFreeGC(pointer value)
}
-/* CreateScratchGC(pScreen, depth)
+/* CreateScratchGC(pDrvScreen, depth)
like CreateGC, but doesn't do the default tile or stipple,
since we can't create them without already having a GC. any code
using the tile or stipple has to set them explicitly anyway,
@@ -515,7 +515,7 @@ go with CreateGC() or ChangeGC().)
*/
static DrvGCPtr
-DrvCreateScratchGC(ScreenPtr pScreen, unsigned depth)
+DrvCreateScratchGC(DrvScreenPtr pDrvScreen, unsigned depth)
{
DrvGCPtr pGC;
@@ -523,7 +523,7 @@ DrvCreateScratchGC(ScreenPtr pScreen, unsigned depth)
if (!pGC)
return NULL;
- pGC->pScreen = pScreen;
+ pGC->pDrvScreen = pDrvScreen;
pGC->depth = depth;
pGC->alu = GXcopy; /* dst <- src */
pGC->planemask = ~0;
@@ -542,8 +542,8 @@ DrvCreateScratchGC(ScreenPtr pScreen, unsigned depth)
// pGC->font->refcnt++;
pGC->tileIsPixel = TRUE;
pGC->tile.pixel = 0;
- pGC->tile.pixmap = NullPixmap;
- pGC->stipple = NullPixmap;
+ pGC->tile.pixmap = NullDrvPixmap;
+ pGC->stipple = NullDrvPixmap;
pGC->patOrg.x = 0;
pGC->patOrg.y = 0;
pGC->subWindowMode = ClipByChildren;
@@ -560,7 +560,7 @@ DrvCreateScratchGC(ScreenPtr pScreen, unsigned depth)
pGC->stateChanges = GCAllBits;
- if (!(*pScreen->gpu.CreateGC)(pGC))
+ if (!(*pDrvScreen->CreateGC)(pGC))
{
DrvFreeGC(pGC);
pGC = (DrvGCPtr)NULL;
@@ -575,15 +575,15 @@ DrvCreateScratchGC(ScreenPtr pScreen, unsigned depth)
you use it often enough it will become real.)
*/
DrvGCPtr
-DrvGetScratchGC(unsigned depth, ScreenPtr pScreen)
+DrvGetScratchGC(unsigned depth, DrvScreenPtr pDrvScreen)
{
int i;
DrvGCPtr pGC;
#if 0
- for (i=0; i<=pScreen->numDepths; i++)
+ for (i=0; i<=pDrvScreen->numDepths; i++)
{
- pGC = pScreen->GCperDepth[i];
+ pGC = pDrvScreen->GCperDepth[i];
if (pGC && pGC->depth == depth && !pGC->scratch_inuse)
{
pGC->scratch_inuse = TRUE;
@@ -614,7 +614,7 @@ DrvGetScratchGC(unsigned depth, ScreenPtr pScreen)
}
#endif
/* if we make it this far, need to roll our own */
- pGC = DrvCreateScratchGC(pScreen, depth);
+ pGC = DrvCreateScratchGC(pDrvScreen, depth);
return pGC;
}
diff --git a/drv/drv_gc.h b/drv/drv_gc.h
index dc1f6bd81..204c7f0a0 100644
--- a/drv/drv_gc.h
+++ b/drv/drv_gc.h
@@ -1,7 +1,7 @@
#ifndef DRV_GC_H
#define DRV_GC_H
-#include "screenint.h" /* for ScreenPtr */
+#include "drv_screenint.h" /* for ScreenPtr */
#include "drv_types.h"
#include "drv_pixmap.h"
@@ -18,7 +18,7 @@ extern _X_EXPORT int DrvChangeGC(
DrvChangeGCValPtr /*pCGCV*/);
-extern _X_EXPORT DrvGCPtr DrvCreateGC(ScreenPtr pPixmap, int depth);
+extern _X_EXPORT DrvGCPtr DrvCreateGC(DrvScreenPtr pPixmap, int depth);
extern _X_EXPORT int DrvFreeGC(
pointer /*pGC*/);
@@ -26,7 +26,7 @@ extern _X_EXPORT int DrvFreeGC(
extern _X_EXPORT DrvGCPtr DrvGetScratchGC(
unsigned /*depth*/,
- ScreenPtr /*pScreen*/);
+ DrvScreenPtr /*pScreen*/);
extern _X_EXPORT void DrvFreeScratchGC(
DrvGCPtr /*pGC*/);
diff --git a/drv/drv_gcstruct.h b/drv/drv_gcstruct.h
index 58f5de4a3..1a8519302 100644
--- a/drv/drv_gcstruct.h
+++ b/drv/drv_gcstruct.h
@@ -178,7 +178,7 @@ typedef struct _DrvGCOps {
} DrvGCOps;
typedef struct _DrvGC {
- ScreenPtr pScreen;
+ DrvScreenPtr pDrvScreen;
unsigned char depth;
unsigned char alu;
unsigned short lineWidth;
diff --git a/drv/drv_picture.c b/drv/drv_picture.c
index 84dc549ba..1a186dad5 100644
--- a/drv/drv_picture.c
+++ b/drv/drv_picture.c
@@ -27,7 +27,7 @@
#include "misc.h"
#include "screenint.h"
-#include "scrnintstr.h"
+#include "drv_scrnintstr.h"
#include "drv_picturestr.h"
#include "drv_pixmapstr.h"
#include "drv_gcstruct.h"
@@ -42,8 +42,8 @@ DrvChangePicture (DrvPicturePtr pPicture,
int *vlist,
DevUnion *ulist)
{
- ScreenPtr pScreen = pPicture->pPixmap ? pPicture->pPixmap->pScreen : 0;
- PictureScreenPtr ps = pScreen ? GetPictureScreen(pScreen) : 0;
+ DrvScreenPtr pScreen = pPicture->pPixmap ? pPicture->pPixmap->pDrvScreen : 0;
+ DrvPictureScreenPtr ps = pScreen ? DrvGetPictureScreen(pScreen) : 0;
BITS32 index2;
int error = 0;
BITS32 maskQ;
@@ -141,7 +141,7 @@ DrvChangePicture (DrvPicturePtr pPicture,
if (pid == None)
{
clipType = CT_NONE;
- pPixmap = NullPixmap;
+ pPixmap = NullDrvPixmap;
}
else
{
@@ -170,7 +170,7 @@ DrvChangePicture (DrvPicturePtr pPicture,
if (pPixmap)
{
if ((pPixmap->depth != 1) ||
- (pPixmap->pScreen != pScreen))
+ (pPixmap->pDrvScreen != pScreen))
{
error = BadMatch;
break;
@@ -259,15 +259,15 @@ DrvFreePicture (pointer value)
if (pPicture->pPixmap)
{
- ScreenPtr pScreen = pPicture->pPixmap->pScreen;
- PictureScreenPtr ps = GetPictureScreen(pScreen);
+ DrvScreenPtr pScreen = pPicture->pPixmap->pDrvScreen;
+ DrvPictureScreenPtr ps = DrvGetPictureScreen(pScreen);
if (pPicture->alphaMap)
DrvFreePicture ((pointer) pPicture->alphaMap);
// (*ps->gpu.DestroyPicture) (pPicture);
// (*ps->DestroyPictureClip) (pPicture);
- (*pScreen->gpu.DestroyPixmap) (pPicture->pPixmap);
+ (*pScreen->DestroyPixmap) (pPicture->pPixmap);
}
dixFreeObjectWithPrivates(pPicture, PRIVATE_DRV_PICTURE);
}
@@ -389,24 +389,24 @@ DrvCompositePicture (CARD8 op,
CARD16 width,
CARD16 height)
{
- PictureScreenPtr ps = GetPictureScreen(pDst->pPixmap->pScreen);
+ DrvPictureScreenPtr ps = DrvGetPictureScreen(pDst->pPixmap->pDrvScreen);
DrvValidatePicture (pSrc);
if (pMask)
DrvValidatePicture (pMask);
DrvValidatePicture (pDst);
- (*ps->gpu.Composite) (op,
- pSrc,
- pMask,
- pDst,
- xSrc,
- ySrc,
- xMask,
- yMask,
- xDst,
- yDst,
- width,
- height);
+ (*ps->Composite) (op,
+ pSrc,
+ pMask,
+ pDst,
+ xSrc,
+ ySrc,
+ xMask,
+ yMask,
+ xDst,
+ yDst,
+ width,
+ height);
}
@@ -478,7 +478,7 @@ DrvGlyphs (CARD8 op,
DrvPicturePtr pPicture;
DrvPixmapPtr pMaskPixmap = 0;
DrvPicturePtr pMask;
- ScreenPtr pScreen = pDst->pPixmap->pScreen;
+ DrvScreenPtr pScreen = pDst->pPixmap->pDrvScreen;
int width = 0, height = 0;
int x, y;
int xDst = list->xOff, yDst = list->yOff;
@@ -499,7 +499,7 @@ DrvGlyphs (CARD8 op,
return;
width = extents.x2 - extents.x1;
height = extents.y2 - extents.y1;
- pMaskPixmap = (*pScreen->gpu.CreatePixmap) (pScreen, width, height,
+ pMaskPixmap = (*pScreen->CreatePixmap) (pScreen, width, height,
maskFormat->depth,
CREATE_PIXMAP_USAGE_SCRATCH, NULL);
if (!pMaskPixmap)
@@ -510,7 +510,7 @@ DrvGlyphs (CARD8 op,
if (!pMask)
{
- (*pScreen->gpu.DestroyPixmap) (pMaskPixmap);
+ (*pScreen->DestroyPixmap) (pMaskPixmap);
return;
}
pGC = DrvGetScratchGC (pMaskPixmap->depth, pScreen);
@@ -538,7 +538,7 @@ DrvGlyphs (CARD8 op,
while (n--)
{
glyph = *glyphs++;
- pPicture = (GlyphPicture (glyph)[pScreen->myNum])->gpu[gp_index];
+ //TODO pPicture = (GlyphPicture (glyph)[pScreen->myNum])->gpu[gp_index];
if (pPicture)
{
@@ -590,7 +590,7 @@ DrvGlyphs (CARD8 op,
x, y,
width, height);
DrvFreePicture ((pointer) pMask);
- (*pScreen->gpu.DestroyPixmap) (pMaskPixmap);
+ (*pScreen->DestroyPixmap) (pMaskPixmap);
}
}
diff --git a/drv/drv_picturestr.h b/drv/drv_picturestr.h
index 84debbdbe..8c8b654d4 100644
--- a/drv/drv_picturestr.h
+++ b/drv/drv_picturestr.h
@@ -2,6 +2,7 @@
#define DRV_PICTURESTR_H
#include "drv_picture.h"
+#include "drv_picturehooks.h"
#include "glyphstr.h"
#include "resource.h"
#include "privates.h"
@@ -9,7 +10,7 @@
#include "picturestr.h"
typedef struct _DrvPicture {
- PixmapPtr pPixmap;
+ DrvPixmapPtr pPixmap;
PictFormatPtr pFormat;
PictFormatShort format; /* PICT_FORMAT */
int refcnt;
@@ -39,4 +40,29 @@ typedef struct _DrvPicture {
int filter_nparams;
} DrvPictureRec;
+typedef struct _DrvPictureScreen {
+ DrvCreatePictureProcPtr CreatePicture;
+ DrvDestroyPictureProcPtr DestroyPicture;
+ DrvCompositeProcPtr Composite;
+ DrvRasterizeTrapezoidProcPtr RasterizeTrapezoid;
+ DrvAddTrapsProcPtr AddTraps;
+ DrvAddTrianglesProcPtr AddTriangles;
+ DrvTrapezoidsProcPtr Trapezoids;
+ DrvTrianglesProcPtr Triangles;
+ DrvGlyphsProcPtr Glyphs;
+
+ PictureScreenPtr *parent;
+} DrvPictureScreenRec, *DrvPictureScreenPtr;
+
+extern _X_EXPORT DevPrivateKeyRec DrvPictureScreenPrivateKeyRec;
+#define DrvPictureScreenPrivateKey (&DrvPictureScreenPrivateKeyRec)
+
+extern _X_EXPORT DevPrivateKeyRec DrvPictureWindowPrivateKeyRec;
+#define DrvPictureWindowPrivateKey (&DrvPictureWindowPrivateKeyRec)
+
+#define DrvGetPictureScreen(s) ((DrvPictureScreenPtr)dixLookupPrivate(&(s)->devPrivates, DrvPictureScreenPrivateKey))
+
+#define DrvGetPictureScreenIfSet(s) (dixPrivateKeyRegistered(DrvPictureScreenPrivateKey) ? DrvGetPictureScreen(s) : NULL)
+#define DrvSetPictureScreen(s,p) dixSetPrivate(&(s)->devPrivates, DrvPictureScreenPrivateKey, p)
+
#endif
diff --git a/drv/drv_pixmap.c b/drv/drv_pixmap.c
index de1173f12..56a7bcbad 100644
--- a/drv/drv_pixmap.c
+++ b/drv/drv_pixmap.c
@@ -31,25 +31,25 @@ from The Open Group.
#include <X11/X.h>
#include "servermd.h"
-#include "scrnintstr.h"
#include "drv_types.h"
+#include "drv_scrnintstr.h"
#include "drv_pixmapstr.h"
#include "drv_pixmap.h"
/* callable by ddx */
DrvPixmapPtr
-DrvAllocatePixmap(ScreenPtr pScreen, int pixDataSize)
+DrvAllocatePixmap(DrvScreenPtr pScreen, int pixDataSize)
{
DrvPixmapPtr pPixmap;
- assert(pScreen->totalPixmapSize > 0);
+ assert(pScreen->pScreen->totalPixmapSize > 0);
- if (pScreen->totalPixmapSize > ((size_t)-1) - pixDataSize)
- return NullPixmap;
+ if (pScreen->pScreen->totalPixmapSize > ((size_t)-1) - pixDataSize)
+ return NullDrvPixmap;
- pPixmap = malloc(pScreen->totalPixmapSize + pixDataSize);
+ pPixmap = malloc(pScreen->pScreen->totalPixmapSize + pixDataSize);
if (!pPixmap)
- return NullPixmap;
+ return NullDrvPixmap;
dixInitPrivates(pPixmap, pPixmap + 1, PRIVATE_PIXMAP);
return pPixmap;
diff --git a/drv/drv_pixmap.h b/drv/drv_pixmap.h
index d6d5c1185..630d6664b 100644
--- a/drv/drv_pixmap.h
+++ b/drv/drv_pixmap.h
@@ -48,6 +48,8 @@ SOFTWARE.
#ifndef DRV_PIXMAP_H
#define DRV_PIXMAP_H
+#include "drv_types.h"
+#include "privates.h"
#define NullDrvPixmap ((DrvPixmapPtr)0)
typedef union _DrvPixUnion {
@@ -57,7 +59,7 @@ typedef union _DrvPixUnion {
/* for driver side */
extern _X_EXPORT DrvPixmapPtr DrvAllocatePixmap(
- ScreenPtr /*pScreen*/,
+ DrvScreenPtr /*pScreen*/,
int /*pixDataSize*/);
extern _X_EXPORT void DrvFreePixmap(
diff --git a/drv/drv_pixmapstr.h b/drv/drv_pixmapstr.h
index 4fa84a08d..2b5e5a87a 100644
--- a/drv/drv_pixmapstr.h
+++ b/drv/drv_pixmapstr.h
@@ -58,7 +58,7 @@ typedef struct _DrvPixmap {
unsigned char bitsPerPixel;
unsigned short width;
unsigned short height;
- ScreenPtr pScreen;
+ DrvScreenPtr pDrvScreen;
PrivateRec *devPrivates;
int devKind; /* This is the pitch of the pixmap, typically width*bpp/8. */
diff --git a/drv/drv_screenint.h b/drv/drv_screenint.h
new file mode 100644
index 000000000..9e3d898c3
--- /dev/null
+++ b/drv/drv_screenint.h
@@ -0,0 +1,5 @@
+#ifndef DRV_SCREENINT_H
+#define DRV_SCREENINT_H
+
+
+#endif
diff --git a/drv/drv_scrnintstr.h b/drv/drv_scrnintstr.h
new file mode 100644
index 000000000..07ed20cd9
--- /dev/null
+++ b/drv/drv_scrnintstr.h
@@ -0,0 +1,102 @@
+
+#ifndef DRV_SCRNINTSTR_H
+#define DRV_SCRNINTSTR_H
+
+#include "drv_screenint.h"
+#include "drv_pixmap.h"
+
+#include "pixmap.h"
+#include "scrnintstr.h"
+
+typedef void (* DrvQueryBestSizeProcPtr)(
+ int /*class*/,
+ unsigned short * /*pwidth*/,
+ unsigned short * /*pheight*/,
+ DrvScreenPtr /*pScreen*/);
+
+
+typedef drvCopyProc (*GetCopyAreaFunctionProcPtr)(
+ DrvPixmapPtr pSrc,
+ DrvPixmapPtr pDst);
+
+typedef drvCopyProc (*GetCopyPlaneFunctionProcPtr)(
+ DrvPixmapPtr pSrc,
+ DrvPixmapPtr pDst, int bitplane);
+
+typedef DrvPixmapPtr (* DrvCreatePixmapProcPtr)(
+ DrvScreenPtr /*pScreen*/,
+ int /*width*/,
+ int /*height*/,
+ int /*depth*/,
+ unsigned /*usage_hint*/,
+ PixmapPtr pParent);
+
+typedef Bool (* DrvDestroyPixmapProcPtr)(
+ DrvPixmapPtr /*pPixmap*/);
+
+typedef Bool (* DrvModifyPixmapHeaderProcPtr)(
+ DrvPixmapPtr /*pPixmap*/,
+ int /*width*/,
+ int /*height*/,
+ int /*depth*/,
+ int /*bitsPerPixel*/,
+ int /*devKind*/,
+ pointer /*pPixData*/);
+
+typedef RegionPtr (* DrvBitmapToRegionProcPtr)(
+ DrvPixmapPtr /*pPix*/);
+
+typedef Bool (* DrvCloseScreenProcPtr)(
+ int /*index*/,
+ DrvScreenPtr /*pScreen*/);
+
+typedef void (* DrvScreenBlockHandlerProcPtr)(
+ DrvScreenPtr pDrvScreen,
+ pointer /*blockData*/,
+ pointer /*pTimeout*/,
+ pointer /*pReadmask*/);
+
+typedef void (* DrvScreenWakeupHandlerProcPtr)(
+ DrvScreenPtr pDrvScreen,
+ pointer /*wakeupData*/,
+ unsigned long /*result*/,
+ pointer /*pReadMask*/);
+
+typedef Bool (* DrvCreateScreenResourcesProcPtr)(
+ DrvScreenPtr /*pScreen*/);
+
+typedef struct _DrvScreen
+{ /* new driver interface */
+
+ ScreenPtr pScreen;
+ int myNum;
+
+ GetCopyAreaFunctionProcPtr GetCopyAreaFunction;
+ GetCopyPlaneFunctionProcPtr GetCopyPlaneFunction;
+
+ PixmapWindowFixupProcPtr PixmapWindowFixup;
+ DrvGetImageProcPtr GetImage;
+ DrvGetSpansProcPtr GetSpans;
+
+ DrvCreatePixmapProcPtr CreatePixmap;
+ DrvDestroyPixmapProcPtr DestroyPixmap;
+ DrvModifyPixmapHeaderProcPtr ModifyPixmapHeader;
+
+ DrvCreateScreenResourcesProcPtr CreateScreenResources;
+ DrvCreateGCProcPtr CreateGC;
+
+ DrvQueryBestSizeProcPtr QueryBestSize;
+ DrvBitmapToRegionProcPtr PixmapToRegion;
+ DrvCloseScreenProcPtr CloseScreen;
+
+ DrvScreenBlockHandlerProcPtr BlockHandler;
+ DrvScreenWakeupHandlerProcPtr WakeupHandler;
+
+ pointer blockData;
+ pointer wakeupData;
+
+ PrivateRec *devPrivates;
+} DrvScreenRec;
+
+#endif
+
diff --git a/drv/drv_types.h b/drv/drv_types.h
index 4d5b1eadd..dd4f247ac 100644
--- a/drv/drv_types.h
+++ b/drv/drv_types.h
@@ -9,6 +9,8 @@ typedef struct _DrvPicture *DrvPicturePtr;
typedef struct _DrvGC *DrvGCPtr;
+typedef struct _DrvScreen *DrvScreenPtr;
+
typedef struct _drvdamage *DrvDamagePtr;
typedef Bool (* DrvCreateGCProcPtr)(DrvGCPtr /*pGC*/);
diff --git a/drv/drvarc.c b/drv/drvarc.c
index e754cc61c..39b61deaf 100644
--- a/drv/drvarc.c
+++ b/drv/drvarc.c
@@ -57,7 +57,7 @@ SOFTWARE.
#include "misc.h"
#include "drv_types.h"
#include "drv_gcstruct.h"
-#include "scrnintstr.h"
+#include "drv_scrnintstr.h"
#include "drv_pixmapstr.h"
#include "drvfpoly.h"
#include "drv_mi.h"
@@ -1015,7 +1015,7 @@ drvPolyArc(DrvPixmapPtr pPixmap, DrvGCPtr pGC, int narcs, xArc *parcs)
}
/* set up scratch GC */
- pGCTo = DrvGetScratchGC(1, pPixmap->pScreen);
+ pGCTo = DrvGetScratchGC(1, pPixmap->pDrvScreen);
if (!pGCTo)
return;
{
@@ -1033,8 +1033,8 @@ drvPolyArc(DrvPixmapPtr pPixmap, DrvGCPtr pGC, int narcs, xArc *parcs)
/* allocate a 1 bit deep pixmap of the appropriate size, and
* validate it */
- pPixmapTo = (DrvPixmapPtr)(*pPixmap->pScreen->gpu.CreatePixmap)
- (pPixmap->pScreen, pixmapWidth, pixmapHeight, 1,
+ pPixmapTo = (DrvPixmapPtr)(*pPixmap->pDrvScreen->CreatePixmap)
+ (pPixmap->pDrvScreen, pixmapWidth, pixmapHeight, 1,
CREATE_PIXMAP_USAGE_SCRATCH, NULL);
if (!pPixmapTo)
{
@@ -1056,7 +1056,7 @@ drvPolyArc(DrvPixmapPtr pPixmap, DrvGCPtr pGC, int narcs, xArc *parcs)
if (!polyArcs)
{
if (fTricky) {
- (*pPixmap->pScreen->gpu.DestroyPixmap) ((DrvPixmapPtr)pPixmapTo);
+ (*pPixmap->pDrvScreen->DestroyPixmap) ((DrvPixmapPtr)pPixmapTo);
DrvFreeScratchGC (pGCTo);
}
return;
@@ -1147,7 +1147,7 @@ drvPolyArc(DrvPixmapPtr pPixmap, DrvGCPtr pGC, int narcs, xArc *parcs)
if(fTricky)
{
- (*pGCTo->pScreen->gpu.DestroyPixmap)((DrvPixmapPtr)pPixmapTo);
+ (*pGCTo->pDrvScreen->DestroyPixmap)((DrvPixmapPtr)pPixmapTo);
DrvFreeScratchGC(pGCTo);
}
}
diff --git a/drv/drvzerline.c b/drv/drvzerline.c
index c3403fc86..b0afb15e5 100644
--- a/drv/drvzerline.c
+++ b/drv/drvzerline.c
@@ -51,7 +51,7 @@ SOFTWARE.
#include <X11/X.h>
#include "misc.h"
-#include "scrnintstr.h"
+#include "drv_scrnintstr.h"
#include "drv_gcstruct.h"
#include "drv_pixmapstr.h"
#include "drv_mi.h"
@@ -120,7 +120,7 @@ drvZeroLine(
int width, height;
int adx, ady;
int octant;
- unsigned int bias = drvGetZeroLineBias(pDraw->pScreen);
+ unsigned int bias = drvGetZeroLineBias(pDraw->pDrvScreen);
int e, e1, e2, e3; /* Bresenham error terms */
int length; /* length of lines == # of pixels on major axis */
diff --git a/drv/exa/drvexa.h b/drv/exa/drvexa.h
index c91615c54..f976876c6 100644
--- a/drv/exa/drvexa.h
+++ b/drv/exa/drvexa.h
@@ -31,11 +31,10 @@
#ifndef EXA_H
#define EXA_H
-#include "scrnintstr.h"
-#include "pixmapstr.h"
-#include "windowstr.h"
-#include "gcstruct.h"
-#include "picturestr.h"
+#include "drv_scrnintstr.h"
+#include "drv_pixmapstr.h"
+#include "drv_gcstruct.h"
+#include "drv_picturestr.h"
#include "fb.h"
#define EXA_VERSION_MAJOR 2
@@ -44,7 +43,7 @@
typedef struct _ExaOffscreenArea ExaOffscreenArea;
-typedef void (*ExaOffscreenSaveProc) (ScreenPtr pScreen, ExaOffscreenArea *area);
+typedef void (*ExaOffscreenSaveProc) (DrvScreenPtr pScreen, ExaOffscreenArea *area);
typedef enum _ExaOffscreenState {
ExaOffscreenAvail,
@@ -189,7 +188,7 @@ typedef struct _ExaDriver {
* The PrepareSolid() call is required of all drivers, but it may fail for any
* reason. Failure results in a fallback to software rendering.
*/
- Bool (*PrepareSolid) (PixmapPtr pPixmap,
+ Bool (*PrepareSolid) (DrvPixmapPtr pPixmap,
int alu,
Pixel planemask,
Pixel fg);
@@ -213,7 +212,7 @@ typedef struct _ExaDriver {
*
* This call is required if PrepareSolid() ever succeeds.
*/
- void (*Solid) (PixmapPtr pPixmap, int x1, int y1, int x2, int y2);
+ void (*Solid) (DrvPixmapPtr pPixmap, int x1, int y1, int x2, int y2);
/**
* DoneSolid() finishes a set of solid fills.
@@ -227,7 +226,7 @@ typedef struct _ExaDriver {
*
* This call is required if PrepareSolid() ever succeeds.
*/
- void (*DoneSolid) (PixmapPtr pPixmap);
+ void (*DoneSolid) (DrvPixmapPtr pPixmap);
/** @} */
/** @name Copy
@@ -264,8 +263,8 @@ typedef struct _ExaDriver {
* The PrepareCopy() call is required of all drivers, but it may fail for any
* reason. Failure results in a fallback to software rendering.
*/
- Bool (*PrepareCopy) (PixmapPtr pSrcPixmap,
- PixmapPtr pDstPixmap,
+ Bool (*PrepareCopy) (DrvPixmapPtr pSrcPixmap,
+ DrvPixmapPtr pDstPixmap,
int dx,
int dy,
int alu,
@@ -295,7 +294,7 @@ typedef struct _ExaDriver {
*
* This call is required if PrepareCopy ever succeeds.
*/
- void (*Copy) (PixmapPtr pDstPixmap,
+ void (*Copy) (DrvPixmapPtr pDstPixmap,
int srcX,
int srcY,
int dstX,
@@ -315,7 +314,7 @@ typedef struct _ExaDriver {
*
* This call is required if PrepareCopy() ever succeeds.
*/
- void (*DoneCopy) (PixmapPtr pDstPixmap);
+ void (*DoneCopy) (DrvPixmapPtr pDstPixmap);
/** @} */
/** @name Composite
@@ -409,9 +408,9 @@ typedef struct _ExaDriver {
DrvPicturePtr pSrcPicture,
DrvPicturePtr pMaskPicture,
DrvPicturePtr pDstPicture,
- PixmapPtr pSrc,
- PixmapPtr pMask,
- PixmapPtr pDst);
+ DrvPixmapPtr pSrc,
+ DrvPixmapPtr pMask,
+ DrvPixmapPtr pDst);
/**
* Composite() performs a Composite operation set up in the last
@@ -437,7 +436,7 @@ typedef struct _ExaDriver {
*
* This call is required if PrepareComposite() ever succeeds.
*/
- void (*Composite) (PixmapPtr pDst,
+ void (*Composite) (DrvPixmapPtr pDst,
int srcX,
int srcY,
int maskX,
@@ -459,7 +458,7 @@ typedef struct _ExaDriver {
*
* This call is required if PrepareComposite() ever succeeds.
*/
- void (*DoneComposite) (PixmapPtr pDst);
+ void (*DoneComposite) (DrvPixmapPtr pDst);
/** @} */
/**
@@ -493,7 +492,7 @@ typedef struct _ExaDriver {
* UploadToScreen() is not required, but is recommended if Composite
* acceleration is supported.
*/
- Bool (*UploadToScreen) (PixmapPtr pDst,
+ Bool (*UploadToScreen) (DrvPixmapPtr pDst,
int x,
int y,
int w,
@@ -505,8 +504,8 @@ typedef struct _ExaDriver {
* UploadToScratch() is no longer used and will be removed next time the EXA
* major version needs to be bumped.
*/
- Bool (*UploadToScratch) (PixmapPtr pSrc,
- PixmapPtr pDst);
+ Bool (*UploadToScratch) (DrvPixmapPtr pSrc,
+ DrvPixmapPtr pDst);
/**
* DownloadFromScreen() loads a rectangle of data from pSrc into dst
@@ -538,7 +537,7 @@ typedef struct _ExaDriver {
*
* DownloadFromScreen() is not required, but is highly recommended.
*/
- Bool (*DownloadFromScreen)(PixmapPtr pSrc,
+ Bool (*DownloadFromScreen)(DrvPixmapPtr pSrc,
int x, int y,
int w, int h,
char *dst, int dst_pitch);
@@ -558,7 +557,7 @@ typedef struct _ExaDriver {
*
* MarkSync() is optional.
*/
- int (*MarkSync) (ScreenPtr pScreen);
+ int (*MarkSync) (DrvScreenPtr pScreen);
/**
* WaitMarker() waits for all rendering before the given marker to have
@@ -572,7 +571,7 @@ typedef struct _ExaDriver {
*
* WaitMarker() is required of all drivers.
*/
- void (*WaitMarker) (ScreenPtr pScreen, int marker);
+ void (*WaitMarker) (DrvScreenPtr pScreen, int marker);
/** @{ */
/**
@@ -608,7 +607,7 @@ typedef struct _ExaDriver {
* @return FALSE if PrepareAccess() is unsuccessful and EXA should use
* DownloadFromScreen() to migate the pixmap out.
*/
- Bool (*PrepareAccess)(PixmapPtr pPix, int index);
+ Bool (*PrepareAccess)(DrvPixmapPtr pPix, int index);
/**
* FinishAccess() is called after CPU access to an offscreen pixmap.
@@ -620,7 +619,7 @@ typedef struct _ExaDriver {
* pixmap set up by PrepareAccess(). Note that the FinishAccess() will not be
* called if PrepareAccess() failed and the pixmap was migrated out.
*/
- void (*FinishAccess)(PixmapPtr pPix, int index);
+ void (*FinishAccess)(DrvPixmapPtr pPix, int index);
/**
* PixmapIsOffscreen() is an optional driver replacement to
@@ -637,7 +636,7 @@ typedef struct _ExaDriver {
*
*
*/
- Bool (*PixmapIsOffscreen)(PixmapPtr pPix);
+ Bool (*PixmapIsOffscreen)(DrvPixmapPtr pPix);
/** @name PrepareAccess() and FinishAccess() indices
* @{
@@ -697,21 +696,21 @@ typedef struct _ExaDriver {
int maxPitchBytes;
/* Hooks to allow driver to its own pixmap memory management */
- void *(*CreatePixmap)(ScreenPtr pScreen, int size, int align);
- void (*DestroyPixmap)(ScreenPtr pScreen, void *driverPriv);
+ void *(*CreatePixmap)(DrvScreenPtr pScreen, int size, int align);
+ void (*DestroyPixmap)(DrvScreenPtr pScreen, void *driverPriv);
/**
* Returning a pixmap with non-NULL devPrivate.ptr implies a pixmap which is
* not offscreen, which will never be accelerated and Prepare/FinishAccess won't
* be called.
*/
- Bool (*ModifyPixmapHeader)(PixmapPtr pPixmap, int width, int height,
+ Bool (*ModifyPixmapHeader)(DrvPixmapPtr pPixmap, int width, int height,
int depth, int bitsPerPixel, int devKind,
pointer pPixData);
/* hooks for drivers with tiling support:
* driver MUST fill out new_fb_pitch with valid pitch of pixmap
*/
- void *(*CreatePixmap2)(ScreenPtr pScreen, int width, int height,
+ void *(*CreatePixmap2)(DrvScreenPtr pScreen, int width, int height,
int depth, int usage_hint, int bitsPerPixel,
int *new_fb_pitch);
/** @} */
@@ -776,60 +775,60 @@ extern _X_EXPORT ExaDriverPtr
exaDriverAlloc(void);
extern _X_EXPORT Bool
-exaDriverInit(ScreenPtr pScreen,
+exaDriverInit(DrvScreenPtr pScreen,
ExaDriverPtr pScreenInfo);
extern _X_EXPORT void
-exaDriverFini(ScreenPtr pScreen);
+exaDriverFini(DrvScreenPtr pScreen);
extern _X_EXPORT void
-exaMarkSync(ScreenPtr pScreen);
+exaMarkSync(DrvScreenPtr pScreen);
extern _X_EXPORT void
-exaWaitSync(ScreenPtr pScreen);
+exaWaitSync(DrvScreenPtr pScreen);
extern _X_EXPORT unsigned long
-exaGetPixmapOffset(PixmapPtr pPix);
+exaGetPixmapOffset(DrvPixmapPtr pPix);
extern _X_EXPORT unsigned long
-exaGetPixmapPitch(PixmapPtr pPix);
+exaGetPixmapPitch(DrvPixmapPtr pPix);
extern _X_EXPORT unsigned long
-exaGetPixmapSize(PixmapPtr pPix);
+exaGetPixmapSize(DrvPixmapPtr pPix);
extern _X_EXPORT void *
-exaGetPixmapDriverPrivate(PixmapPtr p);
+exaGetPixmapDriverPrivate(DrvPixmapPtr p);
/* in exa_offscreen.c */
extern _X_EXPORT ExaOffscreenArea *
-exaOffscreenAlloc(ScreenPtr pScreen, int size, int align,
+exaOffscreenAlloc(DrvScreenPtr pScreen, int size, int align,
Bool locked,
ExaOffscreenSaveProc save,
pointer privData);
extern _X_EXPORT ExaOffscreenArea *
-exaOffscreenFree(ScreenPtr pScreen, ExaOffscreenArea *area);
+exaOffscreenFree(DrvScreenPtr pScreen, ExaOffscreenArea *area);
extern _X_EXPORT void
-ExaOffscreenMarkUsed (PixmapPtr pPixmap);
+ExaOffscreenMarkUsed (DrvPixmapPtr pPixmap);
extern _X_EXPORT void
-exaEnableDisableFBAccess (int index, Bool enable);
+exaEnableDisableFBAccess (DrvScreenPtr pScreen, Bool enable);
extern _X_EXPORT Bool
-exaDrawableIsOffscreen (PixmapPtr pPixmap);
+exaDrawableIsOffscreen (DrvPixmapPtr pPixmap);
/* in exa.c */
extern _X_EXPORT void
-exaMoveInPixmap (PixmapPtr pPixmap);
+exaMoveInPixmap (DrvPixmapPtr pPixmap);
extern _X_EXPORT void
-exaMoveOutPixmap (PixmapPtr pPixmap);
+exaMoveOutPixmap (DrvPixmapPtr pPixmap);
/* in exa_unaccel.c */
extern _X_EXPORT CARD32
-exaGetPixmapFirstPixel (PixmapPtr pPixmap);
+exaGetPixmapFirstPixel (DrvPixmapPtr pPixmap);
/**
diff --git a/drv/exa/exa.c b/drv/exa/exa.c
index 79a500012..0238db50e 100644
--- a/drv/exa/exa.c
+++ b/drv/exa/exa.c
@@ -56,16 +56,16 @@ static ShmFuncs exaShmFuncs = { NULL, NULL };
* pool alongside the framebuffer pool.
*/
unsigned long
-exaGetPixmapOffset(PixmapPtr pPix)
+exaGetPixmapOffset(DrvPixmapPtr pPix)
{
- ExaScreenPriv (pPix->pScreen);
+ ExaScreenPriv (pPix->pDrvScreen);
ExaPixmapPriv (pPix);
return (CARD8 *)pExaPixmap->fb_ptr - pExaScr->info->memoryBase;
}
void *
-exaGetPixmapDriverPrivate(PixmapPtr pPix)
+exaGetPixmapDriverPrivate(DrvPixmapPtr pPix)
{
ExaPixmapPriv(pPix);
@@ -79,7 +79,7 @@ exaGetPixmapDriverPrivate(PixmapPtr pPix)
* naming of the pitch field in the pixmap.
*/
unsigned long
-exaGetPixmapPitch(PixmapPtr pPix)
+exaGetPixmapPitch(DrvPixmapPtr pPix)
{
return pPix->devKind;
}
@@ -89,7 +89,7 @@ exaGetPixmapPitch(PixmapPtr pPix)
* memory. Only valid when the pixmap is currently in framebuffer.
*/
unsigned long
-exaGetPixmapSize(PixmapPtr pPix)
+exaGetPixmapSize(DrvPixmapPtr pPix)
{
ExaPixmapPrivPtr pExaPixmap;
@@ -110,8 +110,8 @@ exaGetPixmapSize(PixmapPtr pPix)
* redirected window, and the translation coordinates are provided by calling
* exaGetOffscreenPixmap() on the drawable.
*/
-PixmapPtr
-exaGetDrawablePixmap(PixmapPtr pPixmap)
+DrvPixmapPtr
+exaGetDrawablePixmap(DrvPixmapPtr pPixmap)
{
return pPixmap;
}
@@ -121,7 +121,7 @@ exaGetDrawablePixmap(PixmapPtr pPixmap)
* optimizations in pixmap migration when no changes have occurred.
*/
void
-exaPixmapDirty (PixmapPtr pPix, int x1, int y1, int x2, int y2)
+exaPixmapDirty (DrvPixmapPtr pPix, int x1, int y1, int x2, int y2)
{
BoxRec box;
RegionRec region;
@@ -202,7 +202,7 @@ exaSetFbPitch(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap,
* some X Server internal component (the score says it's pinned).
*/
Bool
-exaPixmapIsPinned (PixmapPtr pPix)
+exaPixmapIsPinned (DrvPixmapPtr pPix)
{
ExaPixmapPriv (pPix);
@@ -225,9 +225,9 @@ exaPixmapIsPinned (PixmapPtr pPix)
* @return TRUE if the given drawable is in framebuffer memory.
*/
Bool
-exaPixmapHasGpuCopy(PixmapPtr pPixmap)
+exaPixmapHasGpuCopy(DrvPixmapPtr pPixmap)
{
- ScreenPtr pScreen = pPixmap->pScreen;
+ DrvScreenPtr pScreen = pPixmap->pDrvScreen;
ExaScreenPriv(pScreen);
if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS))
@@ -240,7 +240,7 @@ exaPixmapHasGpuCopy(PixmapPtr pPixmap)
* exaDrawableIsOffscreen() is a convenience wrapper for exaPixmapHasGpuCopy().
*/
Bool
-exaDrawableIsOffscreen (PixmapPtr pPixmap)
+exaDrawableIsOffscreen (DrvPixmapPtr pPixmap)
{
return exaPixmapHasGpuCopy (exaGetDrawablePixmap (pPixmap));
}
@@ -249,8 +249,8 @@ exaDrawableIsOffscreen (PixmapPtr pPixmap)
* Returns the pixmap which backs a drawable, and the offsets to add to
* coordinates to make them address the same bits in the backing drawable.
*/
-PixmapPtr
-exaGetOffscreenPixmap (PixmapPtr pPixmap)
+DrvPixmapPtr
+exaGetOffscreenPixmap (DrvPixmapPtr pPixmap)
{
if (exaPixmapHasGpuCopy (pPixmap))
return pPixmap;
@@ -262,9 +262,9 @@ exaGetOffscreenPixmap (PixmapPtr pPixmap)
* Returns TRUE if the pixmap GPU copy is being accessed.
*/
Bool
-ExaDoPrepareAccess(PixmapPtr pPixmap, int index)
+ExaDoPrepareAccess(DrvPixmapPtr pPixmap, int index)
{
- ScreenPtr pScreen = pPixmap->pScreen;
+ DrvScreenPtr pScreen = pPixmap->pDrvScreen;
ExaScreenPriv (pScreen);
ExaPixmapPriv(pPixmap);
Bool has_gpu_copy, ret;
@@ -351,9 +351,9 @@ out:
* PrepareAccess() is necessary, and working around PrepareAccess() failure.
*/
void
-exaPrepareAccess(PixmapPtr pPixmap, int index)
+exaPrepareAccess(DrvPixmapPtr pPixmap, int index)
{
- ExaScreenPriv(pPixmap->pScreen);
+ ExaScreenPriv(pPixmap->pDrvScreen);
if (pExaScr->prepare_access_reg)
pExaScr->prepare_access_reg(pPixmap, index, NULL);
@@ -367,9 +367,9 @@ exaPrepareAccess(PixmapPtr pPixmap, int index)
* It deals with calling the driver's FinishAccess() only if necessary.
*/
void
-exaFinishAccess(PixmapPtr pPixmap, int index)
+exaFinishAccess(DrvPixmapPtr pPixmap, int index)
{
- ScreenPtr pScreen = pPixmap->pScreen;
+ DrvScreenPtr pScreen = pPixmap->pDrvScreen;
ExaScreenPriv (pScreen);
ExaPixmapPriv (pPixmap);
int i;
@@ -418,9 +418,9 @@ exaFinishAccess(PixmapPtr pPixmap, int index)
* Helper for things common to all schemes when a pixmap is destroyed
*/
void
-exaDestroyPixmap(PixmapPtr pPixmap)
+exaDestroyPixmap(DrvPixmapPtr pPixmap)
{
- ExaScreenPriv(pPixmap->pScreen);
+ ExaScreenPriv(pPixmap->pDrvScreen);
int i;
/* Finish access if it was prepared (e.g. pixmap created during
@@ -444,16 +444,16 @@ exaDestroyPixmap(PixmapPtr pPixmap)
void
exaValidateGC(DrvGCPtr pGC,
unsigned long changes,
- PixmapPtr pPixmap)
+ DrvPixmapPtr pPixmap)
{
/* fbValidateGC will do direct access to pixmaps if the tiling has changed.
* Do a few smart things so fbValidateGC can do it's work.
*/
- ScreenPtr pScreen = pPixmap->pScreen;
+ DrvScreenPtr pScreen = pPixmap->pDrvScreen;
ExaScreenPriv(pScreen);
ExaGCPriv(pGC);
- PixmapPtr pTile = NULL;
+ DrvPixmapPtr pTile = NULL;
Bool finish_current_tile = FALSE;
/* Either of these conditions is enough to trigger access to a tile pixmap. */
@@ -467,7 +467,7 @@ exaValidateGC(DrvGCPtr pGC,
* - Or the current tile pixmap and a newly created one.
*/
if (pTile && pTile->depth != pPixmap->depth && !(changes & GCTile)) {
- PixmapPtr pRotatedTile = fbGetRotatedPixmap(pGC);
+ DrvPixmapPtr pRotatedTile = fbGetRotatedPixmap(pGC);
if (pRotatedTile && pRotatedTile->depth == pPixmap->depth)
pTile = pRotatedTile;
else
@@ -503,59 +503,59 @@ exaValidateGC(DrvGCPtr pGC,
static int
exaCreateGC (DrvGCPtr pGC)
{
- ScreenPtr pScreen = pGC->pScreen;
+ DrvScreenPtr pScreen = pGC->pDrvScreen;
ExaScreenPriv(pScreen);
ExaGCPriv(pGC);
Bool ret;
- swap(pExaScr, (&pScreen->gpu), CreateGC);
- if ((ret = (*pScreen->gpu.CreateGC) (pGC))) {
+ swap(pExaScr, pScreen, CreateGC);
+ if ((ret = (*pScreen->CreateGC) (pGC))) {
// wrap(pExaGC, pGC, funcs, (GCFuncs *) &exaGCFuncs);
wrap(pExaGC, pGC, ops, (GCOps *) &exaOps);
}
- swap(pExaScr, (&pScreen->gpu), CreateGC);
+ swap(pExaScr, pScreen, CreateGC);
return ret;
}
static void
-exaPixmapWindowFixup(PixmapPtr *ppPixmap, int bpp)
+exaPixmapWindowFixup(DrvPixmapPtr *ppPixmap, int bpp)
{
- ScreenPtr pScreen = (*ppPixmap)->pScreen;
+ DrvScreenPtr pScreen = (*ppPixmap)->pDrvScreen;
ExaScreenPriv(pScreen);
exaPrepareAccess((*ppPixmap), EXA_PREPARE_SRC);
pExaScr->fallback_counter++;
- swap(pExaScr, (&pScreen->gpu), PixmapWindowFixup);
- pScreen->gpu.PixmapWindowFixup(ppPixmap, bpp);
- swap(pExaScr, (&pScreen->gpu), PixmapWindowFixup);
+ swap(pExaScr, pScreen, PixmapWindowFixup);
+ pScreen->PixmapWindowFixup(ppPixmap, bpp);
+ swap(pExaScr, pScreen, PixmapWindowFixup);
pExaScr->fallback_counter--;
exaFinishAccess((*ppPixmap), EXA_PREPARE_SRC);
}
static RegionPtr
-exaPixmapToRegion(PixmapPtr pPix)
+exaPixmapToRegion(DrvPixmapPtr pPix)
{
RegionPtr ret;
- ScreenPtr pScreen = pPix->pScreen;
+ DrvScreenPtr pScreen = pPix->pDrvScreen;
ExaScreenPriv(pScreen);
exaPrepareAccess(pPix, EXA_PREPARE_SRC);
- swap(pExaScr, (&pScreen->gpu), PixmapToRegion);
- ret = (*pScreen->gpu.PixmapToRegion)(pPix);
- swap(pExaScr, (&pScreen->gpu), PixmapToRegion);
+ swap(pExaScr, pScreen, PixmapToRegion);
+ ret = (*pScreen->PixmapToRegion)(pPix);
+ swap(pExaScr, pScreen, PixmapToRegion);
exaFinishAccess(pPix, EXA_PREPARE_SRC);
return ret;
}
static drvCopyProc
-exaGetCopyAreaFunction(PixmapPtr pSrc,
- PixmapPtr pDst)
+exaGetCopyAreaFunction(DrvPixmapPtr pSrc,
+ DrvPixmapPtr pDst)
{
- ExaScreenPriv (pDst->pScreen);
+ ExaScreenPriv (pDst->pDrvScreen);
if (pExaScr->fallback_counter || pExaScr->swappedOut)
return ExaCheckCopyNtoN;
@@ -564,10 +564,10 @@ exaGetCopyAreaFunction(PixmapPtr pSrc,
}
static drvCopyProc
-exaGetCopyPlaneFunction(PixmapPtr pSrc,
- PixmapPtr pDst, int bitplane)
+exaGetCopyPlaneFunction(DrvPixmapPtr pSrc,
+ DrvPixmapPtr pDst, int bitplane)
{
- ExaScreenPriv (pDst->pScreen);
+ ExaScreenPriv (pDst->pDrvScreen);
drvCopyProc copy;
copy = pExaScr->SavedGetCopyPlaneFunction(pSrc, pDst, bitplane);
@@ -577,10 +577,10 @@ exaGetCopyPlaneFunction(PixmapPtr pSrc,
}
static Bool
-exaCreateScreenResources(ScreenPtr pScreen)
+exaCreateScreenResources(DrvScreenPtr pScreen)
{
ExaScreenPriv(pScreen);
- PixmapPtr pScreenPixmap;
+ DrvPixmapPtr pScreenPixmap;
Bool b;
swap(pExaScr, pScreen, CreateScreenResources);
@@ -590,7 +590,7 @@ exaCreateScreenResources(ScreenPtr pScreen)
if (!b)
return FALSE;
- pScreenPixmap = pScreen->GetScreenPixmap(pScreen)->gpu[0];
+ // pScreenPixmap = pScreen->GetScreenPixmap(pScreen)->gpu[0];
if (pScreenPixmap) {
ExaPixmapPriv(pScreenPixmap);
@@ -605,19 +605,18 @@ exaCreateScreenResources(ScreenPtr pScreen)
}
static void
-ExaBlockHandler(int screenNum, pointer blockData, pointer pTimeout,
+ExaBlockHandler(DrvScreenPtr pDrvScreen, pointer blockData, pointer pTimeout,
pointer pReadmask)
{
- ScreenPtr pScreen = screenInfo.screens[screenNum];
- ExaScreenPriv(pScreen);
+ ExaScreenPriv(pDrvScreen);
/* Move any deferred results from a software fallback to the driver pixmap */
if (pExaScr->deferred_mixed_pixmap)
exaMoveInPixmap_mixed(pExaScr->deferred_mixed_pixmap);
- unwrap(pExaScr, pScreen, BlockHandler);
- (*pScreen->BlockHandler) (screenNum, blockData, pTimeout, pReadmask);
- wrap(pExaScr, pScreen, BlockHandler, ExaBlockHandler);
+ unwrap(pExaScr, pDrvScreen, BlockHandler);
+ (*pDrvScreen->BlockHandler) (pDrvScreen, blockData, pTimeout, pReadmask);
+ wrap(pExaScr, pDrvScreen, BlockHandler, ExaBlockHandler);
/* The rest only applies to classic EXA */
if (pExaScr->info->flags & EXA_HANDLES_PIXMAPS)
@@ -636,21 +635,20 @@ ExaBlockHandler(int screenNum, pointer blockData, pointer pTimeout,
}
static void
-ExaWakeupHandler(int screenNum, pointer wakeupData, unsigned long result,
+ExaWakeupHandler(DrvScreenPtr pDrvScreen, pointer wakeupData, unsigned long result,
pointer pReadmask)
{
- ScreenPtr pScreen = screenInfo.screens[screenNum];
- ExaScreenPriv(pScreen);
+ ExaScreenPriv(pDrvScreen);
- unwrap(pExaScr, pScreen, WakeupHandler);
- (*pScreen->WakeupHandler) (screenNum, wakeupData, result, pReadmask);
- wrap(pExaScr, pScreen, WakeupHandler, ExaWakeupHandler);
+ unwrap(pExaScr, pDrvScreen, WakeupHandler);
+ (*pDrvScreen->WakeupHandler) (pDrvScreen, wakeupData, result, pReadmask);
+ wrap(pExaScr, pDrvScreen, WakeupHandler, ExaWakeupHandler);
if (result == 0 && pExaScr->numOffscreenAvailable > 1) {
CARD32 now = GetTimeInMillis();
if ((int)(now - pExaScr->nextDefragment) > 0) {
- ExaOffscreenDefragment(pScreen);
+ ExaOffscreenDefragment(pDrvScreen);
pExaScr->lastDefragment = now;
}
}
@@ -661,44 +659,44 @@ ExaWakeupHandler(int screenNum, pointer wakeupData, unsigned long result,
* screen private, before calling down to the next CloseSccreen.
*/
static Bool
-exaCloseScreen(int i, ScreenPtr pScreen)
+exaCloseScreen(int i, DrvScreenPtr pScreen)
{
ExaScreenPriv(pScreen);
PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
- if (ps->gpu.Glyphs == exaGlyphs)
+ if (ps->Glyphs == exaGlyphs)
exaGlyphsFini(pScreen);
if (pScreen->BlockHandler == ExaBlockHandler)
unwrap(pExaScr, pScreen, BlockHandler);
if (pScreen->WakeupHandler == ExaWakeupHandler)
unwrap(pExaScr, pScreen, WakeupHandler);
- unwrap(pExaScr, (&pScreen->gpu), CreateGC);
- unwrap(pExaScr, (&pScreen->gpu), CloseScreen);
- unwrap(pExaScr, (&pScreen->gpu), GetImage);
- unwrap(pExaScr, (&pScreen->gpu), GetSpans);
+ unwrap(pExaScr, pScreen, CreateGC);
+ unwrap(pExaScr, pScreen, CloseScreen);
+ unwrap(pExaScr, pScreen, GetImage);
+ unwrap(pExaScr, pScreen, GetSpans);
if (pExaScr->SavedCreatePixmap)
- unwrap(pExaScr, (&pScreen->gpu), CreatePixmap);
+ unwrap(pExaScr, pScreen, CreatePixmap);
if (pExaScr->SavedDestroyPixmap)
- unwrap(pExaScr, (&pScreen->gpu), DestroyPixmap);
+ unwrap(pExaScr, pScreen, DestroyPixmap);
if (pExaScr->SavedModifyPixmapHeader)
- unwrap(pExaScr, (&pScreen->gpu), ModifyPixmapHeader);
- unwrap(pExaScr, (&pScreen->gpu), PixmapToRegion);
+ unwrap(pExaScr, pScreen, ModifyPixmapHeader);
+ unwrap(pExaScr, pScreen, PixmapToRegion);
unwrap(pExaScr, pScreen, CreateScreenResources);
- unwrap(pExaScr, (&ps->gpu), Composite);
+ unwrap(pExaScr, ps, Composite);
if (pExaScr->SavedGlyphs)
- unwrap(pExaScr, (&ps->gpu), Glyphs);
- unwrap(pExaScr, (&ps->gpu), Trapezoids);
- unwrap(pExaScr, (&ps->gpu), Triangles);
- unwrap(pExaScr, (&ps->gpu), AddTraps);
+ unwrap(pExaScr, ps, Glyphs);
+ unwrap(pExaScr, ps, Trapezoids);
+ unwrap(pExaScr, ps, Triangles);
+ unwrap(pExaScr, ps, AddTraps);
- unwrap(pExaScr, (&pScreen->gpu), PixmapWindowFixup);
- unwrap(pExaScr, (&pScreen->gpu), GetCopyAreaFunction);
- unwrap(pExaScr, (&pScreen->gpu), GetCopyPlaneFunction);
+ unwrap(pExaScr, pScreen, PixmapWindowFixup);
+ unwrap(pExaScr, pScreen, GetCopyAreaFunction);
+ unwrap(pExaScr, pScreen, GetCopyPlaneFunction);
free(pExaScr);
- return (*pScreen->gpu.CloseScreen) (i, pScreen);
+ return (*pScreen->CloseScreen) (i, pScreen);
}
/**
@@ -728,11 +726,11 @@ exaDriverAlloc(void)
* @return TRUE if EXA was successfully initialized.
*/
Bool
-exaDriverInit (ScreenPtr pScreen,
+exaDriverInit (DrvScreenPtr pScreen,
ExaDriverPtr pScreenInfo)
{
ExaScreenPrivPtr pExaScr;
- PictureScreenPtr ps;
+ DrvPictureScreenPtr ps;
if (!pScreenInfo)
return FALSE;
@@ -800,7 +798,7 @@ exaDriverInit (ScreenPtr pScreen,
pScreenInfo->maxPitchPixels = pScreenInfo->maxX;
}
- ps = GetPictureScreenIfSet(pScreen);
+ ps = DrvGetPictureScreenIfSet(pScreen);
if (!dixRegisterPrivateKey(&exaScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) {
LogMessage(X_WARNING, "EXA(%d): Failed to register screen private\n",
@@ -840,26 +838,26 @@ exaDriverInit (ScreenPtr pScreen,
if ((pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS) &&
!(pExaScr->info->flags & EXA_HANDLES_PIXMAPS))
wrap(pExaScr, pScreen, WakeupHandler, ExaWakeupHandler);
- wrap(pExaScr, (&pScreen->gpu), CreateGC, exaCreateGC);
- wrap(pExaScr, (&pScreen->gpu), CloseScreen, exaCloseScreen);
- wrap(pExaScr, (&pScreen->gpu), GetImage, exaGetImage);
- wrap(pExaScr, (&pScreen->gpu), GetSpans, ExaCheckGetSpans);
- wrap(pExaScr, (&pScreen->gpu), PixmapToRegion, exaPixmapToRegion);
+ wrap(pExaScr, pScreen, CreateGC, exaCreateGC);
+ wrap(pExaScr, pScreen, CloseScreen, exaCloseScreen);
+ wrap(pExaScr, pScreen, GetImage, exaGetImage);
+ wrap(pExaScr, pScreen, GetSpans, ExaCheckGetSpans);
+ wrap(pExaScr, pScreen, PixmapToRegion, exaPixmapToRegion);
wrap(pExaScr, pScreen, CreateScreenResources, exaCreateScreenResources);
- wrap(pExaScr, (&pScreen->gpu), PixmapWindowFixup, exaPixmapWindowFixup);
- wrap(pExaScr, (&pScreen->gpu), GetCopyAreaFunction, exaGetCopyAreaFunction);
- wrap(pExaScr, (&pScreen->gpu), GetCopyPlaneFunction, exaGetCopyPlaneFunction);
+ wrap(pExaScr, pScreen, PixmapWindowFixup, exaPixmapWindowFixup);
+ wrap(pExaScr, pScreen, GetCopyAreaFunction, exaGetCopyAreaFunction);
+ wrap(pExaScr, pScreen, GetCopyPlaneFunction, exaGetCopyPlaneFunction);
if (ps) {
- wrap(pExaScr, (&ps->gpu), Composite, exaComposite);
+ wrap(pExaScr, ps, Composite, exaComposite);
if (pScreenInfo->PrepareComposite) {
- wrap(pExaScr, (&ps->gpu), Glyphs, exaGlyphs);
+ wrap(pExaScr, ps, Glyphs, exaGlyphs);
} else {
- wrap(pExaScr, (&ps->gpu), Glyphs, ExaCheckGlyphs);
+ wrap(pExaScr, ps, Glyphs, ExaCheckGlyphs);
}
- wrap(pExaScr, (&ps->gpu), Trapezoids, exaTrapezoids);
- wrap(pExaScr, (&ps->gpu), Triangles, exaTriangles);
- wrap(pExaScr, (&ps->gpu), AddTraps, ExaCheckAddTraps);
+ wrap(pExaScr, ps, Trapezoids, exaTrapezoids);
+ wrap(pExaScr, ps, Triangles, exaTriangles);
+ wrap(pExaScr, ps, AddTraps, ExaCheckAddTraps);
}
#ifdef MITSHM
@@ -881,18 +879,18 @@ exaDriverInit (ScreenPtr pScreen,
}
if (pExaScr->info->flags & EXA_HANDLES_PIXMAPS) {
if (pExaScr->info->flags & EXA_MIXED_PIXMAPS) {
- wrap(pExaScr, (&pScreen->gpu), CreatePixmap, exaCreatePixmap_mixed);
- wrap(pExaScr, (&pScreen->gpu), DestroyPixmap, exaDestroyPixmap_mixed);
- wrap(pExaScr, (&pScreen->gpu), ModifyPixmapHeader, exaModifyPixmapHeader_mixed);
+ wrap(pExaScr, pScreen, CreatePixmap, exaCreatePixmap_mixed);
+ wrap(pExaScr, pScreen, DestroyPixmap, exaDestroyPixmap_mixed);
+ wrap(pExaScr, pScreen, ModifyPixmapHeader, exaModifyPixmapHeader_mixed);
pExaScr->do_migration = exaDoMigration_mixed;
pExaScr->pixmap_has_gpu_copy = exaPixmapHasGpuCopy_mixed;
pExaScr->do_move_in_pixmap = exaMoveInPixmap_mixed;
pExaScr->do_move_out_pixmap = NULL;
pExaScr->prepare_access_reg = exaPrepareAccessReg_mixed;
} else {
- wrap(pExaScr, (&pScreen->gpu), CreatePixmap, exaCreatePixmap_driver);
- wrap(pExaScr, (&pScreen->gpu), DestroyPixmap, exaDestroyPixmap_driver);
- wrap(pExaScr, (&pScreen->gpu), ModifyPixmapHeader, exaModifyPixmapHeader_driver);
+ wrap(pExaScr, pScreen, CreatePixmap, exaCreatePixmap_driver);
+ wrap(pExaScr, pScreen, DestroyPixmap, exaDestroyPixmap_driver);
+ wrap(pExaScr, pScreen, ModifyPixmapHeader, exaModifyPixmapHeader_driver);
pExaScr->do_migration = NULL;
pExaScr->pixmap_has_gpu_copy = exaPixmapHasGpuCopy_driver;
pExaScr->do_move_in_pixmap = NULL;
@@ -900,9 +898,9 @@ exaDriverInit (ScreenPtr pScreen,
pExaScr->prepare_access_reg = NULL;
}
} else {
- wrap(pExaScr, (&pScreen->gpu), CreatePixmap, exaCreatePixmap_classic);
- wrap(pExaScr, (&pScreen->gpu), DestroyPixmap, exaDestroyPixmap_classic);
- wrap(pExaScr, (&pScreen->gpu), ModifyPixmapHeader, exaModifyPixmapHeader_classic);
+ wrap(pExaScr, pScreen, CreatePixmap, exaCreatePixmap_classic);
+ wrap(pExaScr, pScreen, DestroyPixmap, exaDestroyPixmap_classic);
+ wrap(pExaScr, pScreen, ModifyPixmapHeader, exaModifyPixmapHeader_classic);
pExaScr->do_migration = exaDoMigration_classic;
pExaScr->pixmap_has_gpu_copy = exaPixmapHasGpuCopy_classic;
pExaScr->do_move_in_pixmap = exaMoveInPixmap_classic;
@@ -934,7 +932,7 @@ exaDriverInit (ScreenPtr pScreen,
}
}
- if (ps->gpu.Glyphs == exaGlyphs)
+ if (ps->Glyphs == exaGlyphs)
exaGlyphsInit(pScreen);
LogMessage(X_INFO, "EXA(%d): Driver registered support for the following"
@@ -962,7 +960,7 @@ exaDriverInit (ScreenPtr pScreen,
* @param pScreen screen being torn down.
*/
void
-exaDriverFini (ScreenPtr pScreen)
+exaDriverFini (DrvScreenPtr pScreen)
{
/*right now does nothing*/
}
@@ -978,7 +976,7 @@ exaDriverFini (ScreenPtr pScreen)
* driver MarkSync() callback, the return value of which may be used to do partial
* synchronization with the hardware in the future.
*/
-void exaMarkSync(ScreenPtr pScreen)
+void exaMarkSync(DrvScreenPtr pScreen)
{
ExaScreenPriv(pScreen);
@@ -997,7 +995,7 @@ void exaMarkSync(ScreenPtr pScreen)
* It should always be called before relying on the framebuffer contents
* reflecting previous drawing, from a CPU perspective.
*/
-void exaWaitSync(ScreenPtr pScreen)
+void exaWaitSync(DrvScreenPtr pScreen)
{
ExaScreenPriv(pScreen);
@@ -1015,7 +1013,7 @@ void exaWaitSync(ScreenPtr pScreen)
void
exaDoMigration (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
{
- ScreenPtr pScreen = pixmaps[0].pPix->pScreen;
+ DrvScreenPtr pScreen = pixmaps[0].pPix->pDrvScreen;
ExaScreenPriv(pScreen);
if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS))
@@ -1026,9 +1024,9 @@ exaDoMigration (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
}
void
-exaMoveInPixmap (PixmapPtr pPixmap)
+exaMoveInPixmap (DrvPixmapPtr pPixmap)
{
- ScreenPtr pScreen = pPixmap->pScreen;
+ DrvScreenPtr pScreen = pPixmap->pDrvScreen;
ExaScreenPriv(pScreen);
if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS))
@@ -1039,9 +1037,9 @@ exaMoveInPixmap (PixmapPtr pPixmap)
}
void
-exaMoveOutPixmap (PixmapPtr pPixmap)
+exaMoveOutPixmap (DrvPixmapPtr pPixmap)
{
- ScreenPtr pScreen = pPixmap->pScreen;
+ DrvScreenPtr pScreen = pPixmap->pDrvScreen;
ExaScreenPriv(pScreen);
if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS))
diff --git a/drv/exa/exa_accel.c b/drv/exa/exa_accel.c
index f1ccad24a..c5bef6780 100644
--- a/drv/exa/exa_accel.c
+++ b/drv/exa/exa_accel.c
@@ -33,16 +33,16 @@
#include "exa_priv.h"
#include <X11/fonts/fontstruct.h>
#include "dixfontstr.h"
-#include "exa.h"
+#include "drvexa.h"
static void
-exaFillSpans(PixmapPtr pPix, DrvGCPtr pGC, int n,
+exaFillSpans(DrvPixmapPtr pPix, DrvGCPtr pGC, int n,
DDXPointPtr ppt, int *pwidth, int fSorted)
{
- ScreenPtr pScreen = pPix->pScreen;
+ DrvScreenPtr pScreen = pPix->pDrvScreen;
ExaScreenPriv (pScreen);
RegionPtr pClip = fbGetCompositeClip(pGC);
- PixmapPtr pPixmap = exaGetDrawablePixmap (pPix);
+ DrvPixmapPtr pPixmap = exaGetDrawablePixmap (pPix);
ExaPixmapPriv (pPixmap);
BoxPtr pextent, pbox;
int nbox;
@@ -140,11 +140,11 @@ exaFillSpans(PixmapPtr pPix, DrvGCPtr pGC, int n,
}
static Bool
-exaDoPutImage (PixmapPtr pPixmap, DrvGCPtr pGC, int depth, int x, int y,
+exaDoPutImage (DrvPixmapPtr pPixmap, DrvGCPtr pGC, int depth, int x, int y,
int w, int h, int format, char *bits, int src_stride)
{
- ExaScreenPriv (pPixmap->pScreen);
- PixmapPtr pPix = exaGetDrawablePixmap (pPixmap);
+ ExaScreenPriv (pPixmap->pDrvScreen);
+ DrvPixmapPtr pPix = exaGetDrawablePixmap (pPixmap);
ExaPixmapPriv(pPix);
RegionPtr pClip;
BoxPtr pbox;
@@ -225,13 +225,13 @@ exaDoPutImage (PixmapPtr pPixmap, DrvGCPtr pGC, int depth, int x, int y,
}
if (ret)
- exaMarkSync(pPixmap->pScreen);
+ exaMarkSync(pPixmap->pDrvScreen);
return ret;
}
static void
-exaPutImage (PixmapPtr pPixmap, DrvGCPtr pGC, int depth, int x, int y,
+exaPutImage (DrvPixmapPtr pPixmap, DrvGCPtr pGC, int depth, int x, int y,
int w, int h, int leftPad, int format, char *bits)
{
if (!exaDoPutImage(pPixmap, pGC, depth, x, y, w, h, format, bits,
@@ -241,11 +241,11 @@ exaPutImage (PixmapPtr pPixmap, DrvGCPtr pGC, int depth, int x, int y,
}
static Bool inline
-exaCopyNtoNTwoDir (PixmapPtr pSrcDrawable, PixmapPtr pDstDrawable,
+exaCopyNtoNTwoDir (DrvPixmapPtr pSrcDrawable, DrvPixmapPtr pDstDrawable,
DrvGCPtr pGC, BoxPtr pbox, int nbox, int dx, int dy)
{
- ExaScreenPriv (pDstDrawable->pScreen);
- PixmapPtr pSrcPixmap, pDstPixmap;
+ ExaScreenPriv (pDstDrawable->pDrvScreen);
+ DrvPixmapPtr pSrcPixmap, pDstPixmap;
int dirsetup;
/* Need to get both pixmaps to call the driver routines */
@@ -356,13 +356,13 @@ exaCopyNtoNTwoDir (PixmapPtr pSrcDrawable, PixmapPtr pDstDrawable,
}
if (dirsetup != 0)
pExaScr->info->DoneCopy(pDstPixmap);
- exaMarkSync(pDstDrawable->pScreen);
+ exaMarkSync(pDstDrawable->pDrvScreen);
return TRUE;
}
Bool
-exaHWCopyNtoN (PixmapPtr pSrcDrawable,
- PixmapPtr pDstDrawable,
+exaHWCopyNtoN (DrvPixmapPtr pSrcDrawable,
+ DrvPixmapPtr pDstDrawable,
DrvGCPtr pGC,
BoxPtr pbox,
int nbox,
@@ -371,8 +371,8 @@ exaHWCopyNtoN (PixmapPtr pSrcDrawable,
Bool reverse,
Bool upsidedown)
{
- ExaScreenPriv (pDstDrawable->pScreen);
- PixmapPtr pSrcPixmap, pDstPixmap;
+ ExaScreenPriv (pDstDrawable->pDrvScreen);
+ DrvPixmapPtr pSrcPixmap, pDstPixmap;
ExaPixmapPrivPtr pSrcExaPixmap, pDstExaPixmap;
RegionPtr srcregion = NULL, dstregion = NULL;
xRectangle *rects;
@@ -497,7 +497,7 @@ exaHWCopyNtoN (PixmapPtr pSrcDrawable,
}
(*pExaScr->info->DoneCopy) (pDstPixmap);
- exaMarkSync (pDstDrawable->pScreen);
+ exaMarkSync (pDstDrawable->pDrvScreen);
/* UTS: mainly for SHM PutImage's secondary path.
*
* Only taking this path for directly accessible pixmaps.
@@ -553,8 +553,8 @@ out:
}
void
-exaCopyNtoN (PixmapPtr pSrcDrawable,
- PixmapPtr pDstDrawable,
+exaCopyNtoN (DrvPixmapPtr pSrcDrawable,
+ DrvPixmapPtr pDstDrawable,
DrvGCPtr pGC,
BoxPtr pbox,
int nbox,
@@ -565,7 +565,7 @@ exaCopyNtoN (PixmapPtr pSrcDrawable,
Pixel bitplane,
void *closure)
{
- ExaScreenPriv(pDstDrawable->pScreen);
+ ExaScreenPriv(pDstDrawable->pDrvScreen);
if (pExaScr->fallback_counter)
return;
@@ -578,10 +578,10 @@ exaCopyNtoN (PixmapPtr pSrcDrawable,
}
static void
-exaPolyPoint(PixmapPtr pPixmap, DrvGCPtr pGC, int mode, int npt,
+exaPolyPoint(DrvPixmapPtr pPixmap, DrvGCPtr pGC, int mode, int npt,
DDXPointPtr ppt)
{
- ExaScreenPriv (pPixmap->pScreen);
+ ExaScreenPriv (pPixmap->pDrvScreen);
int i;
xRectangle *prect;
@@ -614,10 +614,10 @@ exaPolyPoint(PixmapPtr pPixmap, DrvGCPtr pGC, int mode, int npt,
* acceleration if so.
*/
static void
-exaPolylines(PixmapPtr pPixmap, DrvGCPtr pGC, int mode, int npt,
+exaPolylines(DrvPixmapPtr pPixmap, DrvGCPtr pGC, int mode, int npt,
DDXPointPtr ppt)
{
- ExaScreenPriv (pPixmap->pScreen);
+ ExaScreenPriv (pPixmap->pDrvScreen);
xRectangle *prect;
int x1, x2, y1, y2;
int i;
@@ -682,10 +682,10 @@ exaPolylines(PixmapPtr pPixmap, DrvGCPtr pGC, int mode, int npt,
* acceleration if so.
*/
static void
-exaPolySegment (PixmapPtr pPixmap, DrvGCPtr pGC, int nseg,
+exaPolySegment (DrvPixmapPtr pPixmap, DrvGCPtr pGC, int nseg,
xSegment *pSeg)
{
- ExaScreenPriv (pPixmap->pScreen);
+ ExaScreenPriv (pPixmap->pDrvScreen);
xRectangle *prect;
int i;
@@ -734,19 +734,19 @@ exaPolySegment (PixmapPtr pPixmap, DrvGCPtr pGC, int nseg,
free(prect);
}
-static Bool exaFillRegionSolid (PixmapPtr pPixmap, RegionPtr pRegion,
+static Bool exaFillRegionSolid (DrvPixmapPtr pPixmap, RegionPtr pRegion,
Pixel pixel, CARD32 planemask, CARD32 alu,
unsigned int clientClipType);
static void
-exaPolyFillRect(PixmapPtr pPix,
+exaPolyFillRect(DrvPixmapPtr pPix,
DrvGCPtr pGC,
int nrect,
xRectangle *prect)
{
- ExaScreenPriv (pPix->pScreen);
+ ExaScreenPriv (pPix->pDrvScreen);
RegionPtr pClip = fbGetCompositeClip(pGC);
- PixmapPtr pPixmap = exaGetDrawablePixmap(pPix);
+ DrvPixmapPtr pPixmap = exaGetDrawablePixmap(pPix);
ExaPixmapPriv (pPixmap);
register BoxPtr pbox;
BoxPtr pextent;
@@ -889,14 +889,14 @@ fallback:
}
}
(*pExaScr->info->DoneSolid) (pPixmap);
- exaMarkSync(pPixmap->pScreen);
+ exaMarkSync(pPixmap->pDrvScreen);
out:
RegionUninit(pReg);
RegionDestroy(pReg);
}
-const GCOps exaOps = {
+const DrvGCOps exaOps = {
exaFillSpans,
ExaCheckSetSpans,
exaPutImage,
@@ -921,10 +921,10 @@ const GCOps exaOps = {
};
static Bool
-exaFillRegionSolid (PixmapPtr pPixmap, RegionPtr pRegion, Pixel pixel,
+exaFillRegionSolid (DrvPixmapPtr pPixmap, RegionPtr pRegion, Pixel pixel,
CARD32 planemask, CARD32 alu, unsigned int clientClipType)
{
- ExaScreenPriv(pPixmap->pScreen);
+ ExaScreenPriv(pPixmap->pDrvScreen);
ExaPixmapPriv (pPixmap);
Bool ret = FALSE;
@@ -959,7 +959,7 @@ exaFillRegionSolid (PixmapPtr pPixmap, RegionPtr pRegion, Pixel pixel,
pBox++;
}
(*pExaScr->info->DoneSolid) (pPixmap);
- exaMarkSync(pPixmap->pScreen);
+ exaMarkSync(pPixmap->pDrvScreen);
if (pExaPixmap->pDamage &&
pExaPixmap->sys_ptr && pPixmap->type == DRAWABLE_PIXMAP &&
@@ -999,12 +999,12 @@ out:
* Based on fbFillRegionTiled(), fbTile().
*/
Bool
-exaFillRegionTiled (PixmapPtr pPixmap, RegionPtr pRegion, PixmapPtr pTile,
+exaFillRegionTiled (DrvPixmapPtr pPixmap, RegionPtr pRegion, DrvPixmapPtr pTile,
DDXPointPtr pPatOrg, CARD32 planemask, CARD32 alu,
unsigned int clientClipType)
{
- ExaScreenPriv(pPixmap->pScreen);
- PixmapPtr pPix;
+ ExaScreenPriv(pPixmap->pDrvScreen);
+ DrvPixmapPtr pPix;
ExaPixmapPrivPtr pExaPixmap;
ExaPixmapPrivPtr pTileExaPixmap = ExaGetPixmapPriv(pTile);
int tileWidth, tileHeight;
@@ -1157,7 +1157,7 @@ exaFillRegionTiled (PixmapPtr pPixmap, RegionPtr pRegion, PixmapPtr pTile,
}
}
- exaMarkSync(pPixmap->pScreen);
+ exaMarkSync(pPixmap->pDrvScreen);
}
return ret;
@@ -1172,11 +1172,11 @@ exaFillRegionTiled (PixmapPtr pPixmap, RegionPtr pRegion, PixmapPtr pTile,
* the pixmap out of framebuffer.
*/
void
-exaGetImage (PixmapPtr pPixmap, int x, int y, int w, int h,
+exaGetImage (DrvPixmapPtr pPixmap, int x, int y, int w, int h,
unsigned int format, unsigned long planeMask, char *d)
{
- ExaScreenPriv (pPixmap->pScreen);
- PixmapPtr pPix = exaGetDrawablePixmap (pPixmap);
+ ExaScreenPriv (pPixmap->pDrvScreen);
+ DrvPixmapPtr pPix = exaGetDrawablePixmap (pPixmap);
ExaPixmapPriv(pPix);
Bool ok;
@@ -1206,7 +1206,7 @@ exaGetImage (PixmapPtr pPixmap, int x, int y, int w, int h,
y, w, h, d,
PixmapBytePad(w, pPixmap->depth));
if (ok) {
- exaWaitSync(pPixmap->pScreen);
+ exaWaitSync(pPixmap->pDrvScreen);
return;
}
diff --git a/drv/exa/exa_classic.c b/drv/exa/exa_classic.c
index 9dc00ebb3..aee70edcb 100644
--- a/drv/exa/exa_classic.c
+++ b/drv/exa/exa_classic.c
@@ -29,12 +29,12 @@
#include <string.h>
#include "exa_priv.h"
-#include "exa.h"
+#include "drvexa.h"
/* This file holds the classic exa specific implementation. */
static _X_INLINE void*
-ExaGetPixmapAddress(PixmapPtr p)
+ExaGetPixmapAddress(DrvPixmapPtr p)
{
ExaPixmapPriv(p);
@@ -52,22 +52,22 @@ ExaGetPixmapAddress(PixmapPtr p)
* ModifyPixmapHeader() would break migration. These types of pixmaps are used
* for scratch pixmaps, or to represent the visible screen.
*/
-PixmapPtr
-exaCreatePixmap_classic(ScreenPtr pScreen, int w, int h, int depth,
- unsigned usage_hint, ProtoPixmapPtr parent)
+DrvPixmapPtr
+exaCreatePixmap_classic(DrvScreenPtr pScreen, int w, int h, int depth,
+ unsigned usage_hint, PixmapPtr parent)
{
- PixmapPtr pPixmap;
+ DrvPixmapPtr pPixmap;
ExaPixmapPrivPtr pExaPixmap;
BoxRec box;
int bpp;
ExaScreenPriv(pScreen);
if (w > 32767 || h > 32767)
- return NullPixmap;
+ return NullDrvPixmap;
- swap(pExaScr, (&pScreen->gpu), CreatePixmap);
- pPixmap = pScreen->gpu.CreatePixmap (pScreen, w, h, depth, usage_hint, parent);
- swap(pExaScr, (&pScreen->gpu), CreatePixmap);
+ swap(pExaScr, pScreen, CreatePixmap);
+ pPixmap = pScreen->CreatePixmap (pScreen, w, h, depth, usage_hint, parent);
+ swap(pExaScr, pScreen, CreatePixmap);
if (!pPixmap)
return NULL;
@@ -97,9 +97,9 @@ exaCreatePixmap_classic(ScreenPtr pScreen, int w, int h, int depth,
pExaPixmap->fb_size = pExaPixmap->fb_pitch * h;
if (pExaPixmap->fb_pitch > 131071) {
- swap(pExaScr, (&pScreen->gpu), DestroyPixmap);
- pScreen->gpu.DestroyPixmap (pPixmap);
- swap(pExaScr, (&pScreen->gpu), DestroyPixmap);
+ swap(pExaScr, pScreen, DestroyPixmap);
+ pScreen->DestroyPixmap (pPixmap);
+ swap(pExaScr, pScreen, DestroyPixmap);
return NULL;
}
@@ -109,9 +109,9 @@ exaCreatePixmap_classic(ScreenPtr pScreen, int w, int h, int depth,
pScreen, pPixmap);
if (pExaPixmap->pDamage == NULL) {
- swap(pExaScr, (&pScreen->gpu), DestroyPixmap);
- pScreen->gpu.DestroyPixmap (pPixmap);
- swap(pExaScr, (&pScreen->gpu), DestroyPixmap);
+ swap(pExaScr, pScreen, DestroyPixmap);
+ pScreen->DestroyPixmap (pPixmap);
+ swap(pExaScr, pScreen, DestroyPixmap);
return NULL;
}
@@ -145,10 +145,10 @@ exaCreatePixmap_classic(ScreenPtr pScreen, int w, int h, int depth,
}
Bool
-exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height, int depth,
+exaModifyPixmapHeader_classic(DrvPixmapPtr pPixmap, int width, int height, int depth,
int bitsPerPixel, int devKind, pointer pPixData)
{
- ScreenPtr pScreen;
+ DrvScreenPtr pScreen;
ExaScreenPrivPtr pExaScr;
ExaPixmapPrivPtr pExaPixmap;
Bool ret;
@@ -156,7 +156,7 @@ exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height, int dept
if (!pPixmap)
return FALSE;
- pScreen = pPixmap->pScreen;
+ pScreen = pPixmap->pDrvScreen;
pExaScr = ExaGetScreenPriv(pScreen);
pExaPixmap = ExaGetPixmapPriv(pPixmap);
@@ -199,10 +199,10 @@ exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height, int dept
}
}
- swap(pExaScr, (&pScreen->gpu), ModifyPixmapHeader);
- ret = pScreen->gpu.ModifyPixmapHeader(pPixmap, width, height, depth,
+ swap(pExaScr, pScreen, ModifyPixmapHeader);
+ ret = pScreen->ModifyPixmapHeader(pPixmap, width, height, depth,
bitsPerPixel, devKind, pPixData);
- swap(pExaScr, (&pScreen->gpu), ModifyPixmapHeader);
+ swap(pExaScr, pScreen, ModifyPixmapHeader);
/* Always NULL this, we don't want lingering pointers. */
pPixmap->devPrivate.ptr = NULL;
@@ -211,9 +211,9 @@ exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height, int dept
}
Bool
-exaDestroyPixmap_classic (PixmapPtr pPixmap)
+exaDestroyPixmap_classic (DrvPixmapPtr pPixmap)
{
- ScreenPtr pScreen = pPixmap->pScreen;
+ DrvScreenPtr pScreen = pPixmap->pDrvScreen;
ExaScreenPriv(pScreen);
Bool ret;
@@ -231,7 +231,7 @@ exaDestroyPixmap_classic (PixmapPtr pPixmap)
pPixmap->width,
pPixmap->height));
/* Free the offscreen area */
- exaOffscreenFree (pPixmap->pScreen, pExaPixmap->area);
+ exaOffscreenFree (pPixmap->pDrvScreen, pExaPixmap->area);
pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
pPixmap->devKind = pExaPixmap->sys_pitch;
}
@@ -239,17 +239,17 @@ exaDestroyPixmap_classic (PixmapPtr pPixmap)
RegionUninit(&pExaPixmap->validFB);
}
- swap(pExaScr, (&pScreen->gpu), DestroyPixmap);
- ret = pScreen->gpu.DestroyPixmap (pPixmap);
- swap(pExaScr, (&pScreen->gpu), DestroyPixmap);
+ swap(pExaScr, pScreen, DestroyPixmap);
+ ret = pScreen->DestroyPixmap (pPixmap);
+ swap(pExaScr, pScreen, DestroyPixmap);
return ret;
}
Bool
-exaPixmapHasGpuCopy_classic(PixmapPtr pPixmap)
+exaPixmapHasGpuCopy_classic(DrvPixmapPtr pPixmap)
{
- ScreenPtr pScreen = pPixmap->pScreen;
+ DrvScreenPtr pScreen = pPixmap->pDrvScreen;
ExaScreenPriv(pScreen);
ExaPixmapPriv(pPixmap);
Bool ret;
diff --git a/drv/exa/exa_driver.c b/drv/exa/exa_driver.c
index 430bfadd5..56272392f 100644
--- a/drv/exa/exa_driver.c
+++ b/drv/exa/exa_driver.c
@@ -29,12 +29,12 @@
#include <string.h>
#include "exa_priv.h"
-#include "exa.h"
+#include "drvexa.h"
/* This file holds the driver allocated pixmaps specific implementation. */
static _X_INLINE void*
-ExaGetPixmapAddress(PixmapPtr p)
+ExaGetPixmapAddress(DrvPixmapPtr p)
{
ExaPixmapPriv(p);
@@ -46,22 +46,22 @@ ExaGetPixmapAddress(PixmapPtr p)
*
* Pixmaps are always marked as pinned, because exa has no control over them.
*/
-PixmapPtr
-exaCreatePixmap_driver(ScreenPtr pScreen, int w, int h, int depth,
- unsigned usage_hint, ProtoPixmapPtr parent)
+DrvPixmapPtr
+exaCreatePixmap_driver(DrvScreenPtr pScreen, int w, int h, int depth,
+ unsigned usage_hint, PixmapPtr parent)
{
- PixmapPtr pPixmap;
+ DrvPixmapPtr pPixmap;
ExaPixmapPrivPtr pExaPixmap;
int bpp;
size_t paddedWidth, datasize;
ExaScreenPriv(pScreen);
if (w > 32767 || h > 32767)
- return NullPixmap;
+ return NullDrvPixmap;
- swap(pExaScr, (&pScreen->gpu), CreatePixmap);
- pPixmap = pScreen->gpu.CreatePixmap(pScreen, 0, 0, depth, usage_hint, parent);
- swap(pExaScr, (&pScreen->gpu), CreatePixmap);
+ swap(pExaScr, pScreen, CreatePixmap);
+ pPixmap = pScreen->CreatePixmap(pScreen, 0, 0, depth, usage_hint, parent);
+ swap(pExaScr, pScreen, CreatePixmap);
if (!pPixmap)
return NULL;
@@ -84,7 +84,7 @@ exaCreatePixmap_driver(ScreenPtr pScreen, int w, int h, int depth,
else {
paddedWidth = ((w * bpp + FB_MASK) >> FB_SHIFT) * sizeof(FbBits);
if (paddedWidth / 4 > 32767 || h > 32767)
- return NullPixmap;
+ return NullDrvPixmap;
exaSetFbPitch(pExaScr, pExaPixmap, w, h, bpp);
@@ -95,9 +95,9 @@ exaCreatePixmap_driver(ScreenPtr pScreen, int w, int h, int depth,
}
if (!pExaPixmap->driverPriv) {
- swap(pExaScr, (&pScreen->gpu), DestroyPixmap);
- pScreen->gpu.DestroyPixmap (pPixmap);
- swap(pExaScr, (&pScreen->gpu), DestroyPixmap);
+ swap(pExaScr, pScreen, DestroyPixmap);
+ pScreen->DestroyPixmap (pPixmap);
+ swap(pExaScr, pScreen, DestroyPixmap);
return NULL;
}
@@ -107,7 +107,7 @@ exaCreatePixmap_driver(ScreenPtr pScreen, int w, int h, int depth,
pExaPixmap->pDamage = NULL;
pExaPixmap->sys_ptr = NULL;
- (*pScreen->gpu.ModifyPixmapHeader)(pPixmap, w, h, 0, 0,
+ (*pScreen->ModifyPixmapHeader)(pPixmap, w, h, 0, 0,
paddedWidth, NULL);
pExaPixmap->area = NULL;
@@ -125,10 +125,10 @@ exaCreatePixmap_driver(ScreenPtr pScreen, int w, int h, int depth,
}
Bool
-exaModifyPixmapHeader_driver(PixmapPtr pPixmap, int width, int height, int depth,
+exaModifyPixmapHeader_driver(DrvPixmapPtr pPixmap, int width, int height, int depth,
int bitsPerPixel, int devKind, pointer pPixData)
{
- ScreenPtr pScreen;
+ DrvScreenPtr pScreen;
ExaScreenPrivPtr pExaScr;
ExaPixmapPrivPtr pExaPixmap;
Bool ret;
@@ -136,7 +136,7 @@ exaModifyPixmapHeader_driver(PixmapPtr pPixmap, int width, int height, int depth
if (!pPixmap)
return FALSE;
- pScreen = pPixmap->pScreen;
+ pScreen = pPixmap->pDrvScreen;
pExaScr = ExaGetScreenPriv(pScreen);
pExaPixmap = ExaGetPixmapPriv(pPixmap);
@@ -172,10 +172,10 @@ exaModifyPixmapHeader_driver(PixmapPtr pPixmap, int width, int height, int depth
goto out;
}
- swap(pExaScr, (&pScreen->gpu), ModifyPixmapHeader);
- ret = pScreen->gpu.ModifyPixmapHeader(pPixmap, width, height, depth,
+ swap(pExaScr, pScreen, ModifyPixmapHeader);
+ ret = pScreen->ModifyPixmapHeader(pPixmap, width, height, depth,
bitsPerPixel, devKind, pPixData);
- swap(pExaScr, (&pScreen->gpu), ModifyPixmapHeader);
+ swap(pExaScr, pScreen, ModifyPixmapHeader);
out:
/* Always NULL this, we don't want lingering pointers. */
@@ -185,9 +185,9 @@ out:
}
Bool
-exaDestroyPixmap_driver (PixmapPtr pPixmap)
+exaDestroyPixmap_driver (DrvPixmapPtr pPixmap)
{
- ScreenPtr pScreen = pPixmap->pScreen;
+ DrvScreenPtr pScreen = pPixmap->pDrvScreen;
ExaScreenPriv(pScreen);
Bool ret;
@@ -202,17 +202,17 @@ exaDestroyPixmap_driver (PixmapPtr pPixmap)
pExaPixmap->driverPriv = NULL;
}
- swap(pExaScr, (&pScreen->gpu), DestroyPixmap);
- ret = pScreen->gpu.DestroyPixmap (pPixmap);
- swap(pExaScr, (&pScreen->gpu), DestroyPixmap);
+ swap(pExaScr, pScreen, DestroyPixmap);
+ ret = pScreen->DestroyPixmap (pPixmap);
+ swap(pExaScr, pScreen, DestroyPixmap);
return ret;
}
Bool
-exaPixmapHasGpuCopy_driver(PixmapPtr pPixmap)
+exaPixmapHasGpuCopy_driver(DrvPixmapPtr pPixmap)
{
- ScreenPtr pScreen = pPixmap->pScreen;
+ DrvScreenPtr pScreen = pPixmap->pDrvScreen;
ExaScreenPriv(pScreen);
pointer saved_ptr;
Bool ret;
diff --git a/drv/exa/exa_glyphs.c b/drv/exa/exa_glyphs.c
index 25ac8d3e3..a58f2fe97 100644
--- a/drv/exa/exa_glyphs.c
+++ b/drv/exa/exa_glyphs.c
@@ -80,7 +80,7 @@ typedef enum {
} ExaGlyphCacheResult;
void
-exaGlyphsInit(ScreenPtr pScreen)
+exaGlyphsInit(DrvScreenPtr pScreen)
{
ExaScreenPriv(pScreen);
int i = 0;
@@ -110,7 +110,7 @@ exaGlyphsInit(ScreenPtr pScreen)
}
static void
-exaUnrealizeGlyphCaches(ScreenPtr pScreen,
+exaUnrealizeGlyphCaches(DrvScreenPtr pScreen,
unsigned int format)
{
ExaScreenPriv(pScreen);
@@ -148,14 +148,14 @@ exaUnrealizeGlyphCaches(ScreenPtr pScreen,
* rest of the allocated structures for all caches with the given format.
*/
static Bool
-exaRealizeGlyphCaches(ScreenPtr pScreen,
+exaRealizeGlyphCaches(DrvScreenPtr pScreen,
unsigned int format)
{
ExaScreenPriv(pScreen);
int depth = PIXMAN_FORMAT_DEPTH(format);
PictFormatPtr pPictFormat;
- PixmapPtr pPixmap;
+ DrvPixmapPtr pPixmap;
DrvPicturePtr pPicture;
CARD32 component_alpha;
int height;
@@ -183,7 +183,7 @@ exaRealizeGlyphCaches(ScreenPtr pScreen,
}
/* Now allocate the pixmap and picture */
- pPixmap = (*pScreen->gpu.CreatePixmap) (pScreen,
+ pPixmap = (*pScreen->CreatePixmap) (pScreen,
CACHE_PICTURE_WIDTH,
height, depth, 0 , NULL);
if (!pPixmap)
@@ -193,7 +193,7 @@ exaRealizeGlyphCaches(ScreenPtr pScreen,
pPicture = DrvCreatePicture(pPixmap, pPictFormat,
CPComponentAlpha, &component_alpha);
- (*pScreen->gpu.DestroyPixmap) (pPixmap); /* picture holds a refcount */
+ (*pScreen->DestroyPixmap) (pPixmap); /* picture holds a refcount */
if (!pPicture)
return FALSE;
@@ -231,7 +231,7 @@ bail:
}
void
-exaGlyphsFini (ScreenPtr pScreen)
+exaGlyphsFini (DrvScreenPtr pScreen)
{
ExaScreenPriv(pScreen);
int i;
@@ -357,17 +357,17 @@ exaGlyphCacheHashRemove(ExaGlyphCachePtr cache,
* layer unwrapped the picture screen before calling exaGlyphs.
*/
static void
-exaGlyphCacheUploadGlyph(ScreenPtr pScreen,
+exaGlyphCacheUploadGlyph(DrvScreenPtr pScreen,
ExaGlyphCachePtr cache,
int x,
int y,
GlyphPtr pGlyph, int gp_index)
{
ExaScreenPriv(pScreen);
- DrvPicturePtr pGlyphPicture = GlyphPicture(pGlyph)[pScreen->myNum]->gpu[gp_index];
- PixmapPtr pGlyphPixmap = (PixmapPtr)pGlyphPicture->pPixmap;
+ DrvPicturePtr pGlyphPicture = NULL; //TODO GlyphPicture(pGlyph)[pScreen->myNum]->gpu[gp_index];
+ DrvPixmapPtr pGlyphPixmap = (DrvPixmapPtr)pGlyphPicture->pPixmap;
ExaPixmapPriv(pGlyphPixmap);
- PixmapPtr pCachePixmap = (PixmapPtr)cache->picture->pPixmap;
+ DrvPixmapPtr pCachePixmap = (DrvPixmapPtr)cache->picture->pPixmap;
if (!pExaScr->info->UploadToScreen || pExaScr->swappedOut || pExaPixmap->accel_blocked)
goto composite;
@@ -427,7 +427,7 @@ damage:
}
static ExaGlyphCacheResult
-exaGlyphCacheBufferGlyph(ScreenPtr pScreen,
+exaGlyphCacheBufferGlyph(DrvScreenPtr pScreen,
ExaGlyphCachePtr cache,
ExaGlyphBufferPtr buffer,
GlyphPtr pGlyph,
@@ -540,7 +540,7 @@ exaGlyphCacheBufferGlyph(ScreenPtr pScreen,
#undef CACHE_Y
static ExaGlyphCacheResult
-exaBufferGlyph(ScreenPtr pScreen,
+exaBufferGlyph(DrvScreenPtr pScreen,
ExaGlyphBufferPtr buffer,
GlyphPtr pGlyph,
DrvPicturePtr pSrc,
@@ -594,7 +594,7 @@ exaBufferGlyph(ScreenPtr pScreen,
/* Couldn't find the glyph in the cache, use the glyph picture directly */
- mask = GlyphPicture(pGlyph)[pScreen->myNum]->gpu[gp_index];
+ //TODO mask = GlyphPicture(pGlyph)[pScreen->myNum]->gpu[gp_index];
if (buffer->mask && buffer->mask != mask)
return ExaGlyphNeedFlush;
@@ -702,9 +702,9 @@ exaGlyphs (CARD8 op,
GlyphListPtr list,
GlyphPtr *glyphs, int gp_index)
{
- PixmapPtr pMaskPixmap = 0;
+ DrvPixmapPtr pMaskPixmap = 0;
DrvPicturePtr pMask = NULL;
- ScreenPtr pScreen = pDst->pPixmap->pScreen;
+ DrvScreenPtr pScreen = pDst->pPixmap->pDrvScreen;
int width = 0, height = 0;
int x, y;
int first_xOff = list->xOff, first_yOff = list->yOff;
@@ -735,7 +735,7 @@ exaGlyphs (CARD8 op,
maskFormat = a8Format;
}
- pMaskPixmap = (*pScreen->gpu.CreatePixmap) (pScreen, width, height,
+ pMaskPixmap = (*pScreen->CreatePixmap) (pScreen, width, height,
maskFormat->depth,
CREATE_PIXMAP_USAGE_SCRATCH, NULL);
if (!pMaskPixmap)
@@ -749,7 +749,7 @@ exaGlyphs (CARD8 op,
{
PictFormatPtr argbFormat;
- (*pScreen->gpu.DestroyPixmap) (pMaskPixmap);
+ (*pScreen->DestroyPixmap) (pMaskPixmap);
if (!pMask)
return;
@@ -763,7 +763,7 @@ exaGlyphs (CARD8 op,
if (argbFormat)
maskFormat = argbFormat;
- pMaskPixmap = (*pScreen->gpu.CreatePixmap) (pScreen, width, height,
+ pMaskPixmap = (*pScreen->CreatePixmap) (pScreen, width, height,
maskFormat->depth,
CREATE_PIXMAP_USAGE_SCRATCH, NULL);
if (!pMaskPixmap)
@@ -772,7 +772,7 @@ exaGlyphs (CARD8 op,
pMask = DrvCreatePicture (pMaskPixmap, maskFormat, 0, 0);
if (!pMask) {
- (*pScreen->gpu.DestroyPixmap) (pMaskPixmap);
+ (*pScreen->DestroyPixmap) (pMaskPixmap);
return;
}
}
@@ -858,6 +858,6 @@ exaGlyphs (CARD8 op,
x, y,
width, height);
DrvFreePicture ((pointer) pMask);
- (*pScreen->gpu.DestroyPixmap) (pMaskPixmap);
+ (*pScreen->DestroyPixmap) (pMaskPixmap);
}
}
diff --git a/drv/exa/exa_migration_classic.c b/drv/exa/exa_migration_classic.c
index 40d321349..03f915c47 100644
--- a/drv/exa/exa_migration_classic.c
+++ b/drv/exa/exa_migration_classic.c
@@ -33,7 +33,7 @@
#include <string.h>
#include "exa_priv.h"
-#include "exa.h"
+#include "drvexa.h"
#if DEBUG_MIGRATE
#define DBG_MIGRATE(a) ErrorF a
@@ -46,7 +46,7 @@
* and exaCopyDirtyToFb both needed to do this loop.
*/
static void
-exaMemcpyBox (PixmapPtr pPixmap, BoxPtr pbox, CARD8 *src, int src_pitch,
+exaMemcpyBox (DrvPixmapPtr pPixmap, BoxPtr pbox, CARD8 *src, int src_pitch,
CARD8 *dst, int dst_pitch)
{
int i, cpp = pPixmap->bitsPerPixel / 8;
@@ -68,7 +68,7 @@ exaMemcpyBox (PixmapPtr pPixmap, BoxPtr pbox, CARD8 *src, int src_pitch,
* dirtiness.
*/
static Bool
-exaPixmapIsDirty (PixmapPtr pPix)
+exaPixmapIsDirty (DrvPixmapPtr pPix)
{
ExaPixmapPriv (pPix);
@@ -90,7 +90,7 @@ exaPixmapIsDirty (PixmapPtr pPix)
* Only valid if using a migration scheme that tracks score.
*/
static Bool
-exaPixmapShouldBeInFB (PixmapPtr pPix)
+exaPixmapShouldBeInFB (DrvPixmapPtr pPix)
{
ExaPixmapPriv (pPix);
@@ -106,11 +106,11 @@ exaPixmapShouldBeInFB (PixmapPtr pPix)
*/
static void
exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
- Bool (*transfer) (PixmapPtr pPix, int x, int y, int w, int h,
+ Bool (*transfer) (DrvPixmapPtr pPix, int x, int y, int w, int h,
char *sys, int sys_pitch), int fallback_index,
- void (*sync) (ScreenPtr pScreen))
+ void (*sync) (DrvScreenPtr pScreen))
{
- PixmapPtr pPixmap = migrate->pPix;
+ DrvPixmapPtr pPixmap = migrate->pPix;
ExaPixmapPriv (pPixmap);
RegionPtr damage = DrvDamageRegion (pExaPixmap->pDamage);
RegionRec CopyReg;
@@ -141,7 +141,7 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
RegionSubtract(&CopyReg, pValidSrc, pValidDst);
if (migrate->as_dst) {
- ExaScreenPriv (pPixmap->pScreen);
+ ExaScreenPriv (pPixmap->pDrvScreen);
/* XXX: The pending damage region will be marked as damaged after the
* operation, so it should serve as an upper bound for the region that
@@ -263,7 +263,7 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
if (access_prepared)
exaFinishAccess(pPixmap, fallback_index);
else if (need_sync && sync)
- sync (pPixmap->pScreen);
+ sync (pPixmap->pDrvScreen);
}
/**
@@ -274,8 +274,8 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
void
exaCopyDirtyToSys (ExaMigrationPtr migrate)
{
- PixmapPtr pPixmap = migrate->pPix;
- ExaScreenPriv (pPixmap->pScreen);
+ DrvPixmapPtr pPixmap = migrate->pPix;
+ ExaScreenPriv (pPixmap->pDrvScreen);
ExaPixmapPriv (pPixmap);
exaCopyDirty(migrate, &pExaPixmap->validSys, &pExaPixmap->validFB,
@@ -291,8 +291,8 @@ exaCopyDirtyToSys (ExaMigrationPtr migrate)
void
exaCopyDirtyToFb (ExaMigrationPtr migrate)
{
- PixmapPtr pPixmap = migrate->pPix;
- ExaScreenPriv (pPixmap->pScreen);
+ DrvPixmapPtr pPixmap = migrate->pPix;
+ ExaScreenPriv (pPixmap->pDrvScreen);
ExaPixmapPriv (pPixmap);
exaCopyDirty(migrate, &pExaPixmap->validFB, &pExaPixmap->validSys,
@@ -317,8 +317,8 @@ exaCopyDirtyToFb (ExaMigrationPtr migrate)
static void
exaDoMoveInPixmap (ExaMigrationPtr migrate)
{
- PixmapPtr pPixmap = migrate->pPix;
- ScreenPtr pScreen = pPixmap->pScreen;
+ DrvPixmapPtr pPixmap = migrate->pPix;
+ DrvScreenPtr pScreen = pPixmap->pDrvScreen;
ExaScreenPriv (pScreen);
ExaPixmapPriv (pPixmap);
@@ -371,7 +371,7 @@ exaDoMoveInPixmap (ExaMigrationPtr migrate)
}
void
-exaMoveInPixmap_classic (PixmapPtr pPixmap)
+exaMoveInPixmap_classic (DrvPixmapPtr pPixmap)
{
static ExaMigrationRec migrate = { .as_dst = FALSE, .as_src = TRUE,
.pReg = NULL };
@@ -387,7 +387,7 @@ exaMoveInPixmap_classic (PixmapPtr pPixmap)
static void
exaDoMoveOutPixmap (ExaMigrationPtr migrate)
{
- PixmapPtr pPixmap = migrate->pPix;
+ DrvPixmapPtr pPixmap = migrate->pPix;
ExaPixmapPriv (pPixmap);
if (!pExaPixmap->area || exaPixmapIsPinned(pPixmap))
@@ -412,7 +412,7 @@ exaDoMoveOutPixmap (ExaMigrationPtr migrate)
}
void
-exaMoveOutPixmap_classic (PixmapPtr pPixmap)
+exaMoveOutPixmap_classic (DrvPixmapPtr pPixmap)
{
static ExaMigrationRec migrate = { .as_dst = FALSE, .as_src = TRUE,
.pReg = NULL };
@@ -428,9 +428,9 @@ exaMoveOutPixmap_classic (PixmapPtr pPixmap)
* framebuffer entirely.
*/
void
-exaPixmapSave (ScreenPtr pScreen, ExaOffscreenArea *area)
+exaPixmapSave (DrvScreenPtr pScreen, ExaOffscreenArea *area)
{
- PixmapPtr pPixmap = area->privData;
+ DrvPixmapPtr pPixmap = area->privData;
ExaPixmapPriv(pPixmap);
exaMoveOutPixmap(pPixmap);
@@ -450,7 +450,7 @@ exaPixmapSave (ScreenPtr pScreen, ExaOffscreenArea *area)
static void
exaMigrateTowardFb (ExaMigrationPtr migrate)
{
- PixmapPtr pPixmap = migrate->pPix;
+ DrvPixmapPtr pPixmap = migrate->pPix;
ExaPixmapPriv (pPixmap);
if (pExaPixmap->score == EXA_PIXMAP_SCORE_PINNED) {
@@ -490,7 +490,7 @@ exaMigrateTowardFb (ExaMigrationPtr migrate)
static void
exaMigrateTowardSys (ExaMigrationPtr migrate)
{
- PixmapPtr pPixmap = migrate->pPix;
+ DrvPixmapPtr pPixmap = migrate->pPix;
ExaPixmapPriv (pPixmap);
DBG_MIGRATE(("UseMem: %p score %d\n", (pointer)pPixmap, pExaPixmap->score));
@@ -519,7 +519,7 @@ exaMigrateTowardSys (ExaMigrationPtr migrate)
* asserts that both of them are the same.
*/
static Bool
-exaAssertNotDirty (PixmapPtr pPixmap)
+exaAssertNotDirty (DrvPixmapPtr pPixmap)
{
ExaPixmapPriv (pPixmap);
CARD8 *dst, *src;
@@ -598,7 +598,7 @@ out:
void
exaDoMigration_classic (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
{
- ScreenPtr pScreen = pixmaps[0].pPix->pScreen;
+ DrvScreenPtr pScreen = pixmaps[0].pPix->pDrvScreen;
ExaScreenPriv(pScreen);
int i, j;
@@ -725,7 +725,7 @@ exaDoMigration_classic (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
}
void
-exaPrepareAccessReg_classic(PixmapPtr pPixmap, int index, RegionPtr pReg)
+exaPrepareAccessReg_classic(DrvPixmapPtr pPixmap, int index, RegionPtr pReg)
{
ExaMigrationRec pixmaps[1];
diff --git a/drv/exa/exa_migration_mixed.c b/drv/exa/exa_migration_mixed.c
index 23e8c3481..4a0c3bee9 100644
--- a/drv/exa/exa_migration_mixed.c
+++ b/drv/exa/exa_migration_mixed.c
@@ -29,12 +29,12 @@
#include <string.h>
#include "exa_priv.h"
-#include "exa.h"
+#include "drvexa.h"
void
-exaCreateDriverPixmap_mixed(PixmapPtr pPixmap)
+exaCreateDriverPixmap_mixed(DrvPixmapPtr pPixmap)
{
- ScreenPtr pScreen = pPixmap->pScreen;
+ DrvScreenPtr pScreen = pPixmap->pDrvScreen;
ExaScreenPriv(pScreen);
ExaPixmapPriv(pPixmap);
int w = pPixmap->width, h = pPixmap->height;
@@ -66,7 +66,7 @@ exaCreateDriverPixmap_mixed(PixmapPtr pPixmap)
if (!pExaPixmap->driverPriv)
return;
- (*pScreen->gpu.ModifyPixmapHeader)(pPixmap, w, h, 0, 0,
+ (*pScreen->ModifyPixmapHeader)(pPixmap, w, h, 0, 0,
paddedWidth, NULL);
}
@@ -92,14 +92,14 @@ exaDoMigration_mixed(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
return;
for (i = 0; i < npixmaps; i++) {
- PixmapPtr pPixmap = pixmaps[i].pPix;
+ DrvPixmapPtr pPixmap = pixmaps[i].pPix;
ExaPixmapPriv(pPixmap);
if (!pExaPixmap->driverPriv)
exaCreateDriverPixmap_mixed(pPixmap);
if (pExaPixmap->pDamage && exaPixmapHasGpuCopy(pPixmap)) {
- ExaScreenPriv(pPixmap->pScreen);
+ ExaScreenPriv(pPixmap->pDrvScreen);
/* This pitch is needed for proper acceleration. For some reason
* there are pixmaps without pDamage and a bad fb_pitch value.
@@ -122,7 +122,7 @@ exaDoMigration_mixed(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
}
void
-exaMoveInPixmap_mixed(PixmapPtr pPixmap)
+exaMoveInPixmap_mixed(DrvPixmapPtr pPixmap)
{
ExaMigrationRec pixmaps[1];
@@ -137,7 +137,7 @@ exaMoveInPixmap_mixed(PixmapPtr pPixmap)
void
exaDamageReport_mixed(DrvDamagePtr pDamage, RegionPtr pRegion, void *closure)
{
- PixmapPtr pPixmap = closure;
+ DrvPixmapPtr pPixmap = closure;
ExaPixmapPriv(pPixmap);
/* Move back results of software rendering on system memory copy of mixed driver
@@ -147,7 +147,7 @@ exaDamageReport_mixed(DrvDamagePtr pDamage, RegionPtr pRegion, void *closure)
* overhead on multiple subsequent software fallbacks.
*/
if (!pExaPixmap->use_gpu_copy && exaPixmapHasGpuCopy(pPixmap)) {
- ExaScreenPriv(pPixmap->pScreen);
+ ExaScreenPriv(pPixmap->pDrvScreen);
if (pExaScr->deferred_mixed_pixmap &&
pExaScr->deferred_mixed_pixmap != pPixmap)
@@ -162,7 +162,7 @@ exaDamageReport_mixed(DrvDamagePtr pDamage, RegionPtr pRegion, void *closure)
* UploadToScreen hook (see exaDamageReport_mixed).
*/
void
-exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg)
+exaPrepareAccessReg_mixed(DrvPixmapPtr pPixmap, int index, RegionPtr pReg)
{
ExaPixmapPriv(pPixmap);
Bool has_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
@@ -224,7 +224,7 @@ exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg)
/* Set up damage tracking */
pExaPixmap->pDamage = DrvDamageCreate(exaDamageReport_mixed, NULL,
DamageReportNonEmpty, TRUE,
- pPixmap->pScreen,
+ pPixmap->pDrvScreen,
pPixmap);
DrvDamageRegister(pPixmap, pExaPixmap->pDamage);
diff --git a/drv/exa/exa_mixed.c b/drv/exa/exa_mixed.c
index fb1a9fcca..09a2ad582 100644
--- a/drv/exa/exa_mixed.c
+++ b/drv/exa/exa_mixed.c
@@ -29,13 +29,13 @@
#include <string.h>
#include "exa_priv.h"
-#include "exa.h"
+#include "drvexa.h"
/* This file holds the driver allocated pixmaps + better initial placement code.
*/
static _X_INLINE void*
-ExaGetPixmapAddress(PixmapPtr p)
+ExaGetPixmapAddress(DrvPixmapPtr p)
{
ExaPixmapPriv(p);
@@ -45,22 +45,22 @@ ExaGetPixmapAddress(PixmapPtr p)
/**
* exaCreatePixmap() creates a new pixmap.
*/
-PixmapPtr
-exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth,
- unsigned usage_hint, ProtoPixmapPtr parent)
+DrvPixmapPtr
+exaCreatePixmap_mixed(DrvScreenPtr pScreen, int w, int h, int depth,
+ unsigned usage_hint, PixmapPtr parent)
{
- PixmapPtr pPixmap;
+ DrvPixmapPtr pPixmap;
ExaPixmapPrivPtr pExaPixmap;
int bpp;
size_t paddedWidth;
ExaScreenPriv(pScreen);
if (w > 32767 || h > 32767)
- return NullPixmap;
+ return NullDrvPixmap;
- swap(pExaScr, (&pScreen->gpu), CreatePixmap);
- pPixmap = pScreen->gpu.CreatePixmap(pScreen, 0, 0, depth, usage_hint, parent);
- swap(pExaScr, (&pScreen->gpu), CreatePixmap);
+ swap(pExaScr, pScreen, CreatePixmap);
+ pPixmap = pScreen->CreatePixmap(pScreen, 0, 0, depth, usage_hint, parent);
+ swap(pExaScr, pScreen, CreatePixmap);
if (!pPixmap)
return NULL;
@@ -72,7 +72,7 @@ exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth,
paddedWidth = ((w * bpp + FB_MASK) >> FB_SHIFT) * sizeof(FbBits);
if (paddedWidth / 4 > 32767 || h > 32767)
- return NullPixmap;
+ return NullDrvPixmap;
/* We will allocate the system pixmap later if needed. */
pPixmap->devPrivate.ptr = NULL;
@@ -87,7 +87,7 @@ exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth,
exaSetAccelBlock(pExaScr, pExaPixmap,
w, h, bpp);
- (*pScreen->gpu.ModifyPixmapHeader)(pPixmap, w, h, 0, 0,
+ (*pScreen->ModifyPixmapHeader)(pPixmap, w, h, 0, 0,
paddedWidth, NULL);
/* A scratch pixmap will become a driver pixmap right away. */
@@ -103,7 +103,7 @@ exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth,
/* Set up damage tracking */
pExaPixmap->pDamage = DrvDamageCreate(exaDamageReport_mixed, NULL,
DamageReportNonEmpty, TRUE,
- pPixmap->pScreen,
+ pPixmap->pDrvScreen,
pPixmap);
DrvDamageRegister(pPixmap, pExaPixmap->pDamage);
@@ -121,10 +121,10 @@ exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth,
}
Bool
-exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
+exaModifyPixmapHeader_mixed(DrvPixmapPtr pPixmap, int width, int height, int depth,
int bitsPerPixel, int devKind, pointer pPixData)
{
- ScreenPtr pScreen;
+ DrvScreenPtr pScreen;
ExaScreenPrivPtr pExaScr;
ExaPixmapPrivPtr pExaPixmap;
Bool ret, has_gpu_copy;
@@ -132,7 +132,7 @@ exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
if (!pPixmap)
return FALSE;
- pScreen = pPixmap->pScreen;
+ pScreen = pPixmap->pDrvScreen;
pExaScr = ExaGetScreenPriv(pScreen);
pExaPixmap = ExaGetPixmapPriv(pPixmap);
@@ -216,10 +216,10 @@ exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
goto out;
}
- swap(pExaScr, (&pScreen->gpu), ModifyPixmapHeader);
- ret = pScreen->gpu.ModifyPixmapHeader(pPixmap, width, height, depth,
+ swap(pExaScr, pScreen, ModifyPixmapHeader);
+ ret = pScreen->ModifyPixmapHeader(pPixmap, width, height, depth,
bitsPerPixel, devKind, pPixData);
- swap(pExaScr, (&pScreen->gpu), ModifyPixmapHeader);
+ swap(pExaScr, pScreen, ModifyPixmapHeader);
out:
if (has_gpu_copy) {
@@ -236,9 +236,9 @@ out:
}
Bool
-exaDestroyPixmap_mixed(PixmapPtr pPixmap)
+exaDestroyPixmap_mixed(DrvPixmapPtr pPixmap)
{
- ScreenPtr pScreen = pPixmap->pScreen;
+ DrvScreenPtr pScreen = pPixmap->pDrvScreen;
ExaScreenPriv(pScreen);
Bool ret;
@@ -262,17 +262,17 @@ exaDestroyPixmap_mixed(PixmapPtr pPixmap)
}
}
- swap(pExaScr, (&pScreen->gpu), DestroyPixmap);
- ret = pScreen->gpu.DestroyPixmap (pPixmap);
- swap(pExaScr, (&pScreen->gpu), DestroyPixmap);
+ swap(pExaScr, pScreen, DestroyPixmap);
+ ret = pScreen->DestroyPixmap (pPixmap);
+ swap(pExaScr, pScreen, DestroyPixmap);
return ret;
}
Bool
-exaPixmapHasGpuCopy_mixed(PixmapPtr pPixmap)
+exaPixmapHasGpuCopy_mixed(DrvPixmapPtr pPixmap)
{
- ScreenPtr pScreen = pPixmap->pScreen;
+ DrvScreenPtr pScreen = pPixmap->pDrvScreen;
ExaScreenPriv(pScreen);
ExaPixmapPriv(pPixmap);
pointer saved_ptr;
diff --git a/drv/exa/exa_offscreen.c b/drv/exa/exa_offscreen.c
index d2bc6214d..5c03b6e9b 100644
--- a/drv/exa/exa_offscreen.c
+++ b/drv/exa/exa_offscreen.c
@@ -40,7 +40,7 @@
#if DEBUG_OFFSCREEN
static void
-ExaOffscreenValidate (ScreenPtr pScreen)
+ExaOffscreenValidate (DrvScreenPtr pScreen)
{
ExaScreenPriv (pScreen);
ExaOffscreenArea *prev = 0, *area;
@@ -62,7 +62,7 @@ ExaOffscreenValidate (ScreenPtr pScreen)
#endif
static ExaOffscreenArea *
-ExaOffscreenKickOut (ScreenPtr pScreen, ExaOffscreenArea *area)
+ExaOffscreenKickOut (DrvScreenPtr pScreen, ExaOffscreenArea *area)
{
if (area->save)
(*area->save) (pScreen, area);
@@ -162,7 +162,7 @@ exaFindAreaToEvict(ExaScreenPrivPtr pExaScr, int size, int align)
* still called.
*/
ExaOffscreenArea *
-exaOffscreenAlloc (ScreenPtr pScreen, int size, int align,
+exaOffscreenAlloc (DrvScreenPtr pScreen, int size, int align,
Bool locked,
ExaOffscreenSaveProc save,
pointer privData)
@@ -294,7 +294,7 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align,
* Ejects all offscreen areas, and uninitializes the offscreen memory manager.
*/
void
-ExaOffscreenSwapOut (ScreenPtr pScreen)
+ExaOffscreenSwapOut (DrvScreenPtr pScreen)
{
ExaScreenPriv (pScreen);
@@ -322,7 +322,7 @@ ExaOffscreenSwapOut (ScreenPtr pScreen)
/** Ejects all pixmaps managed by EXA. */
static void
-ExaOffscreenEjectPixmaps (ScreenPtr pScreen)
+ExaOffscreenEjectPixmaps (DrvScreenPtr pScreen)
{
ExaScreenPriv (pScreen);
@@ -350,7 +350,7 @@ ExaOffscreenEjectPixmaps (ScreenPtr pScreen)
}
void
-ExaOffscreenSwapIn (ScreenPtr pScreen)
+ExaOffscreenSwapIn (DrvScreenPtr pScreen)
{
exaOffscreenInit (pScreen);
}
@@ -371,9 +371,8 @@ ExaOffscreenSwapIn (ScreenPtr pScreen)
* swapped out.
*/
void
-exaEnableDisableFBAccess (int index, Bool enable)
+exaEnableDisableFBAccess (DrvScreenPtr pScreen, Bool enable)
{
- ScreenPtr pScreen = screenInfo.screens[index];
ExaScreenPriv (pScreen);
if (pExaScr->info->flags & EXA_HANDLES_PIXMAPS)
@@ -427,7 +426,7 @@ ExaOffscreenMerge (ExaScreenPrivPtr pExaScr, ExaOffscreenArea *area)
* on.
*/
ExaOffscreenArea *
-exaOffscreenFree (ScreenPtr pScreen, ExaOffscreenArea *area)
+exaOffscreenFree (DrvScreenPtr pScreen, ExaOffscreenArea *area)
{
ExaScreenPriv(pScreen);
ExaOffscreenArea *next = area->next;
@@ -468,10 +467,10 @@ exaOffscreenFree (ScreenPtr pScreen, ExaOffscreenArea *area)
}
void
-ExaOffscreenMarkUsed (PixmapPtr pPixmap)
+ExaOffscreenMarkUsed (DrvPixmapPtr pPixmap)
{
ExaPixmapPriv (pPixmap);
- ExaScreenPriv (pPixmap->pScreen);
+ ExaScreenPriv (pPixmap->pDrvScreen);
if (!pExaPixmap || !pExaPixmap->area)
return;
@@ -485,15 +484,15 @@ ExaOffscreenMarkUsed (PixmapPtr pPixmap)
* beginning (when there are no pinned allocations).
*/
_X_HIDDEN ExaOffscreenArea*
-ExaOffscreenDefragment (ScreenPtr pScreen)
+ExaOffscreenDefragment (DrvScreenPtr pScreen)
{
ExaScreenPriv (pScreen);
ExaOffscreenArea *area, *largest_available = NULL;
int largest_size = 0;
- PixmapPtr pDstPix;
+ DrvPixmapPtr pDstPix;
ExaPixmapPrivPtr pExaDstPix;
- pDstPix = (*pScreen->gpu.CreatePixmap) (pScreen, 0, 0, 0, 0, NULL);
+ pDstPix = (*pScreen->CreatePixmap) (pScreen, 0, 0, 0, 0, NULL);
if (!pDstPix)
return NULL;
@@ -506,7 +505,7 @@ ExaOffscreenDefragment (ScreenPtr pScreen)
)
{
ExaOffscreenArea *prev = area->prev;
- PixmapPtr pSrcPix;
+ DrvPixmapPtr pSrcPix;
ExaPixmapPrivPtr pExaSrcPix;
Bool save_use_gpu_copy;
int save_pitch;
@@ -632,7 +631,7 @@ ExaOffscreenDefragment (ScreenPtr pScreen)
pDstPix->depth = 0;
pDstPix->bitsPerPixel = 0;
- (*pScreen->gpu.DestroyPixmap) (pDstPix);
+ (*pScreen->DestroyPixmap) (pDstPix);
if (area->state == ExaOffscreenAvail && area->size > largest_size)
return area;
@@ -649,7 +648,7 @@ ExaOffscreenDefragment (ScreenPtr pScreen)
* the screen, if any offscreen memory is available.
*/
Bool
-exaOffscreenInit (ScreenPtr pScreen)
+exaOffscreenInit (DrvScreenPtr pScreen)
{
ExaScreenPriv (pScreen);
ExaOffscreenArea *area;
@@ -682,7 +681,7 @@ exaOffscreenInit (ScreenPtr pScreen)
}
void
-ExaOffscreenFini (ScreenPtr pScreen)
+ExaOffscreenFini (DrvScreenPtr pScreen)
{
ExaScreenPriv (pScreen);
ExaOffscreenArea *area;
diff --git a/drv/exa/exa_priv.h b/drv/exa/exa_priv.h
index fab1caa08..89926b5da 100644
--- a/drv/exa/exa_priv.h
+++ b/drv/exa/exa_priv.h
@@ -37,7 +37,7 @@
#ifdef MITSHM
#include "shmint.h"
#endif
-#include "scrnintstr.h"
+#include "drv_scrnintstr.h"
#include "drv_pixmapstr.h"
#include "servermd.h"
@@ -46,7 +46,7 @@
#include "drv_gcstruct.h"
#include "input.h"
#include "mipointer.h"
-#include "mi.h"
+#include "drv_mi.h"
#include "dix.h"
#include "fb.h"
#include "fboverlay.h"
@@ -69,7 +69,7 @@ do { \
} while (0)
char
-exaDrawableLocation(PixmapPtr pPixmap);
+exaDrawableLocation(DrvPixmapPtr pPixmap);
#else
#define EXA_FALLBACK(x)
#endif
@@ -141,11 +141,11 @@ typedef struct {
typedef struct _ExaMigrationRec {
Bool as_dst;
Bool as_src;
- PixmapPtr pPix;
+ DrvPixmapPtr pPix;
RegionPtr pReg;
} ExaMigrationRec, *ExaMigrationPtr;
-typedef void (*EnableDisableFBAccessProcPtr)(int, Bool);
+typedef void (*EnableDisableFBAccessProcPtr)(DrvScreenPtr, Bool);
typedef struct {
ExaDriverPtr info;
ScreenBlockHandlerProcPtr SavedBlockHandler;
@@ -154,10 +154,10 @@ typedef struct {
CloseScreenProcPtr SavedCloseScreen;
DrvGetImageProcPtr SavedGetImage;
DrvGetSpansProcPtr SavedGetSpans;
- CreatePixmapProcPtr SavedCreatePixmap;
- DestroyPixmapProcPtr SavedDestroyPixmap;
- CreateScreenResourcesProcPtr SavedCreateScreenResources;
- ModifyPixmapHeaderProcPtr SavedModifyPixmapHeader;
+ DrvCreatePixmapProcPtr SavedCreatePixmap;
+ DrvDestroyPixmapProcPtr SavedDestroyPixmap;
+ DrvCreateScreenResourcesProcPtr SavedCreateScreenResources;
+ DrvModifyPixmapHeaderProcPtr SavedModifyPixmapHeader;
SourceValidateProcPtr SavedSourceValidate;
DrvCompositeProcPtr SavedComposite;
DrvTrianglesProcPtr SavedTriangles;
@@ -172,10 +172,10 @@ typedef struct {
GetCopyPlaneFunctionProcPtr SavedGetCopyPlaneFunction;
void (*do_migration) (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel);
- Bool (*pixmap_has_gpu_copy) (PixmapPtr pPixmap);
- void (*do_move_in_pixmap) (PixmapPtr pPixmap);
- void (*do_move_out_pixmap) (PixmapPtr pPixmap);
- void (*prepare_access_reg)(PixmapPtr pPixmap, int index, RegionPtr pReg);
+ Bool (*pixmap_has_gpu_copy) (DrvPixmapPtr pPixmap);
+ void (*do_move_in_pixmap) (DrvPixmapPtr pPixmap);
+ void (*do_move_out_pixmap) (DrvPixmapPtr pPixmap);
+ void (*prepare_access_reg)(DrvPixmapPtr pPixmap, int index, RegionPtr pReg);
Bool swappedOut;
enum ExaMigrationHeuristic migration;
@@ -186,11 +186,11 @@ typedef struct {
unsigned numOffscreenAvailable;
CARD32 lastDefragment;
CARD32 nextDefragment;
- PixmapPtr deferred_mixed_pixmap;
+ DrvPixmapPtr deferred_mixed_pixmap;
/* Reference counting for accessed pixmaps */
struct {
- PixmapPtr pixmap;
+ DrvPixmapPtr pixmap;
int count;
Bool retval;
} access[EXA_NUM_PREPARE_INDICES];
@@ -207,7 +207,7 @@ typedef struct {
RegionRec srcReg;
RegionRec maskReg;
- PixmapPtr srcPix;
+ DrvPixmapPtr srcPix;
} ExaScreenPrivRec, *ExaScreenPrivPtr;
@@ -239,7 +239,7 @@ extern DevPrivateKeyRec exaGCPrivateKeyRec;
void
exaValidateGC(DrvGCPtr pGC,
unsigned long changes,
- PixmapPtr pPixmap);
+ DrvPixmapPtr pPixmap);
/*
* Some macros to deal with function wrapping.
*/
@@ -266,7 +266,7 @@ exaValidateGC(DrvGCPtr pGC,
pExaScr->fallback_counter--;
#define EXA_PRE_FALLBACK_GC(_gc_) \
- ExaScreenPriv(_gc_->pScreen); \
+ ExaScreenPriv(_gc_->pDrvScreen); \
ExaGCPriv(_gc_); \
pExaScr->fallback_counter++; \
swap(pExaGC, _gc_, ops);
@@ -337,7 +337,7 @@ typedef struct {
typedef struct {
/* GC values from the layer below. */
- GCOps *Savedops;
+ DrvGCOps *Savedops;
} ExaGCPrivRec, *ExaGCPrivPtr;
typedef struct {
@@ -356,7 +356,7 @@ typedef struct {
* exaDDXDriverInit must be implemented by the DDX using EXA, and is the place
* to set EXA options or hook in screen functions to handle using EXA as the AA.
*/
-void exaDDXDriverInit (ScreenPtr pScreen);
+void exaDDXDriverInit (DrvScreenPtr pScreen);
/* exa_unaccel.c */
void
@@ -366,73 +366,73 @@ void
exaFinishAccessGC(DrvGCPtr pGC);
void
-ExaCheckFillSpans (PixmapPtr pPixmap, DrvGCPtr pGC, int nspans,
+ExaCheckFillSpans (DrvPixmapPtr pPixmap, DrvGCPtr pGC, int nspans,
DDXPointPtr ppt, int *pwidth, int fSorted);
void
-ExaCheckSetSpans (PixmapPtr pPixmap, DrvGCPtr pGC, char *psrc,
+ExaCheckSetSpans (DrvPixmapPtr pPixmap, DrvGCPtr pGC, char *psrc,
DDXPointPtr ppt, int *pwidth, int nspans, int fSorted);
void
-ExaCheckPutImage (PixmapPtr pPixmap, DrvGCPtr pGC, int depth,
+ExaCheckPutImage (DrvPixmapPtr pPixmap, DrvGCPtr pGC, int depth,
int x, int y, int w, int h, int leftPad, int format,
char *bits);
void
-ExaCheckCopyNtoN (PixmapPtr pSrc, PixmapPtr pDst, DrvGCPtr pGC,
+ExaCheckCopyNtoN (DrvPixmapPtr pSrc, DrvPixmapPtr pDst, DrvGCPtr pGC,
BoxPtr pbox, int nbox, int dx, int dy, Bool reverse,
Bool upsidedown, Pixel bitplane, void *closure);
RegionPtr
-ExaCheckCopyArea (PixmapPtr pSrc, PixmapPtr pDst, DrvGCPtr pGC,
+ExaCheckCopyArea (DrvPixmapPtr pSrc, DrvPixmapPtr pDst, DrvGCPtr pGC,
int srcx, int srcy, int w, int h, int dstx, int dsty);
RegionPtr
-ExaCheckCopyPlane (PixmapPtr pSrc, PixmapPtr pDst, DrvGCPtr pGC,
+ExaCheckCopyPlane (DrvPixmapPtr pSrc, DrvPixmapPtr pDst, DrvGCPtr pGC,
int srcx, int srcy, int w, int h, int dstx, int dsty,
unsigned long bitPlane);
void
-ExaCheckPolyPoint (PixmapPtr pPixmap, DrvGCPtr pGC, int mode, int npt,
+ExaCheckPolyPoint (DrvPixmapPtr pPixmap, DrvGCPtr pGC, int mode, int npt,
DDXPointPtr pptInit);
void
-ExaCheckPolylines (PixmapPtr pPixmap, DrvGCPtr pGC,
+ExaCheckPolylines (DrvPixmapPtr pPixmap, DrvGCPtr pGC,
int mode, int npt, DDXPointPtr ppt);
void
-ExaCheckPolySegment (PixmapPtr pPixmap, DrvGCPtr pGC,
+ExaCheckPolySegment (DrvPixmapPtr pPixmap, DrvGCPtr pGC,
int nsegInit, xSegment *pSegInit);
void
-ExaCheckPolyArc (PixmapPtr pPixmap, DrvGCPtr pGC,
+ExaCheckPolyArc (DrvPixmapPtr pPixmap, DrvGCPtr pGC,
int narcs, xArc *pArcs);
void
-ExaCheckPolyFillRect (PixmapPtr pPixmap, DrvGCPtr pGC,
+ExaCheckPolyFillRect (DrvPixmapPtr pPixmap, DrvGCPtr pGC,
int nrect, xRectangle *prect);
void
-ExaCheckImageGlyphBlt (PixmapPtr pPixmap, DrvGCPtr pGC,
+ExaCheckImageGlyphBlt (DrvPixmapPtr pPixmap, DrvGCPtr pGC,
int x, int y, unsigned int nglyph,
CharInfoPtr *ppci, pointer pglyphBase);
void
-ExaCheckPolyGlyphBlt (PixmapPtr pPixmap, DrvGCPtr pGC,
+ExaCheckPolyGlyphBlt (DrvPixmapPtr pPixmap, DrvGCPtr pGC,
int x, int y, unsigned int nglyph,
CharInfoPtr *ppci, pointer pglyphBase);
void
-ExaCheckPushPixels (DrvGCPtr pGC, PixmapPtr pBitmap,
- PixmapPtr pPixmap,
+ExaCheckPushPixels (DrvGCPtr pGC, DrvPixmapPtr pBitmap,
+ DrvPixmapPtr pPixmap,
int w, int h, int x, int y);
void
-ExaCheckGetImage(PixmapPtr pPixmap, int x, int y, int w, int h,
+ExaCheckGetImage(DrvPixmapPtr pPixmap, int x, int y, int w, int h,
unsigned int format, unsigned long planeMask, char *d);
void
-ExaCheckGetSpans (PixmapPtr pPixmap,
+ExaCheckGetSpans (DrvPixmapPtr pPixmap,
int wMax,
DDXPointPtr ppt,
int *pwidth,
@@ -449,7 +449,7 @@ ExaCheckAddTraps (DrvPicturePtr pPicture,
/* exa_accel.c */
static _X_INLINE Bool
-exaGCReadsDestination(PixmapPtr pPixmap, unsigned long planemask,
+exaGCReadsDestination(DrvPixmapPtr pPixmap, unsigned long planemask,
unsigned int fillStyle, unsigned char alu,
unsigned int clientClipType)
{
@@ -459,21 +459,21 @@ exaGCReadsDestination(PixmapPtr pPixmap, unsigned long planemask,
}
Bool
-exaFillRegionTiled (PixmapPtr pPixmap, RegionPtr pRegion, PixmapPtr pTile,
+exaFillRegionTiled (DrvPixmapPtr pPixmap, RegionPtr pRegion, DrvPixmapPtr pTile,
DDXPointPtr pPatOrg, CARD32 planemask, CARD32 alu,
unsigned int clientClipType);
void
-exaGetImage (PixmapPtr pPixmap, int x, int y, int w, int h,
+exaGetImage (DrvPixmapPtr pPixmap, int x, int y, int w, int h,
unsigned int format, unsigned long planeMask, char *d);
RegionPtr
-exaCopyArea(PixmapPtr pSrcDrawable, PixmapPtr pDstDrawable, DrvGCPtr pGC,
+exaCopyArea(DrvPixmapPtr pSrcDrawable, DrvPixmapPtr pDstDrawable, DrvGCPtr pGC,
int srcx, int srcy, int width, int height, int dstx, int dsty);
Bool
-exaHWCopyNtoN (PixmapPtr pSrcDrawable,
- PixmapPtr pDstDrawable,
+exaHWCopyNtoN (DrvPixmapPtr pSrcDrawable,
+ DrvPixmapPtr pDstDrawable,
DrvGCPtr pGC,
BoxPtr pbox,
int nbox,
@@ -483,8 +483,8 @@ exaHWCopyNtoN (PixmapPtr pSrcDrawable,
Bool upsidedown);
void
-exaCopyNtoN (PixmapPtr pSrcDrawable,
- PixmapPtr pDstDrawable,
+exaCopyNtoN (DrvPixmapPtr pSrcDrawable,
+ DrvPixmapPtr pDstDrawable,
DrvGCPtr pGC,
BoxPtr pbox,
int nbox,
@@ -496,8 +496,8 @@ exaCopyNtoN (PixmapPtr pSrcDrawable,
void *closure);
void
-ExaCopyPlaneNtoN (PixmapPtr pSrcDrawable,
- PixmapPtr pDstDrawable,
+ExaCopyPlaneNtoN (DrvPixmapPtr pSrcDrawable,
+ DrvPixmapPtr pDstDrawable,
DrvGCPtr pGC,
BoxPtr pbox,
int nbox,
@@ -507,7 +507,7 @@ ExaCopyPlaneNtoN (PixmapPtr pSrcDrawable,
Bool upsidedown,
Pixel bitplane,
void *closure);
-extern const GCOps exaOps;
+extern const DrvGCOps exaOps;
void
ExaCheckComposite (CARD8 op,
@@ -537,44 +537,44 @@ ExaCheckGlyphs (CARD8 op,
/* exa_offscreen.c */
void
-ExaOffscreenSwapOut (ScreenPtr pScreen);
+ExaOffscreenSwapOut (DrvScreenPtr pScreen);
void
-ExaOffscreenSwapIn (ScreenPtr pScreen);
+ExaOffscreenSwapIn (DrvScreenPtr pScreen);
ExaOffscreenArea*
-ExaOffscreenDefragment (ScreenPtr pScreen);
+ExaOffscreenDefragment (DrvScreenPtr pScreen);
Bool
-exaOffscreenInit(ScreenPtr pScreen);
+exaOffscreenInit(DrvScreenPtr pScreen);
void
-ExaOffscreenFini (ScreenPtr pScreen);
+ExaOffscreenFini (DrvScreenPtr pScreen);
/* exa.c */
Bool
-ExaDoPrepareAccess(PixmapPtr pPixmap, int index);
+ExaDoPrepareAccess(DrvPixmapPtr pPixmap, int index);
void
-exaPrepareAccess(PixmapPtr pPixmap, int index);
+exaPrepareAccess(DrvPixmapPtr pPixmap, int index);
void
-exaFinishAccess(PixmapPtr pPixmap, int index);
+exaFinishAccess(DrvPixmapPtr pPixmap, int index);
void
-exaDestroyPixmap(PixmapPtr pPixmap);
+exaDestroyPixmap(DrvPixmapPtr pPixmap);
void
-exaPixmapDirty(PixmapPtr pPix, int x1, int y1, int x2, int y2);
+exaPixmapDirty(DrvPixmapPtr pPix, int x1, int y1, int x2, int y2);
Bool
-exaPixmapHasGpuCopy(PixmapPtr p);
+exaPixmapHasGpuCopy(DrvPixmapPtr p);
-PixmapPtr
-exaGetOffscreenPixmap (PixmapPtr pPixmap);
+DrvPixmapPtr
+exaGetOffscreenPixmap (DrvPixmapPtr pPixmap);
-PixmapPtr
-exaGetDrawablePixmap(PixmapPtr pPixmap);
+DrvPixmapPtr
+exaGetDrawablePixmap(DrvPixmapPtr pPixmap);
void
exaSetFbPitch(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap,
@@ -588,70 +588,70 @@ void
exaDoMigration (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel);
Bool
-exaPixmapIsPinned (PixmapPtr pPix);
+exaPixmapIsPinned (DrvPixmapPtr pPix);
extern const GCFuncs exaGCFuncs;
/* exa_classic.c */
-PixmapPtr
-exaCreatePixmap_classic(ScreenPtr pScreen, int w, int h, int depth,
- unsigned usage_hint, ProtoPixmapPtr parent);
+DrvPixmapPtr
+exaCreatePixmap_classic(DrvScreenPtr pScreen, int w, int h, int depth,
+ unsigned usage_hint, PixmapPtr parent);
Bool
-exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height, int depth,
+exaModifyPixmapHeader_classic(DrvPixmapPtr pPixmap, int width, int height, int depth,
int bitsPerPixel, int devKind, pointer pPixData);
Bool
-exaDestroyPixmap_classic (PixmapPtr pPixmap);
+exaDestroyPixmap_classic (DrvPixmapPtr pPixmap);
Bool
-exaPixmapHasGpuCopy_classic(PixmapPtr pPixmap);
+exaPixmapHasGpuCopy_classic(DrvPixmapPtr pPixmap);
/* exa_driver.c */
-PixmapPtr
-exaCreatePixmap_driver(ScreenPtr pScreen, int w, int h, int depth,
- unsigned usage_hint, ProtoPixmapPtr parent);
+DrvPixmapPtr
+exaCreatePixmap_driver(DrvScreenPtr pScreen, int w, int h, int depth,
+ unsigned usage_hint, PixmapPtr parent);
Bool
-exaModifyPixmapHeader_driver(PixmapPtr pPixmap, int width, int height, int depth,
+exaModifyPixmapHeader_driver(DrvPixmapPtr pPixmap, int width, int height, int depth,
int bitsPerPixel, int devKind, pointer pPixData);
Bool
-exaDestroyPixmap_driver (PixmapPtr pPixmap);
+exaDestroyPixmap_driver (DrvPixmapPtr pPixmap);
Bool
-exaPixmapHasGpuCopy_driver(PixmapPtr pPixmap);
+exaPixmapHasGpuCopy_driver(DrvPixmapPtr pPixmap);
/* exa_mixed.c */
-PixmapPtr
-exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth,
- unsigned usage_hint, ProtoPixmapPtr parent);
+DrvPixmapPtr
+exaCreatePixmap_mixed(DrvScreenPtr pScreen, int w, int h, int depth,
+ unsigned usage_hint, PixmapPtr parent);
Bool
-exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
+exaModifyPixmapHeader_mixed(DrvPixmapPtr pPixmap, int width, int height, int depth,
int bitsPerPixel, int devKind, pointer pPixData);
Bool
-exaDestroyPixmap_mixed(PixmapPtr pPixmap);
+exaDestroyPixmap_mixed(DrvPixmapPtr pPixmap);
Bool
-exaPixmapHasGpuCopy_mixed(PixmapPtr pPixmap);
+exaPixmapHasGpuCopy_mixed(DrvPixmapPtr pPixmap);
/* exa_migration_mixed.c */
void
-exaCreateDriverPixmap_mixed(PixmapPtr pPixmap);
+exaCreateDriverPixmap_mixed(DrvPixmapPtr pPixmap);
void
exaDoMigration_mixed(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel);
void
-exaMoveInPixmap_mixed(PixmapPtr pPixmap);
+exaMoveInPixmap_mixed(DrvPixmapPtr pPixmap);
void
exaDamageReport_mixed(DrvDamagePtr pDamage, RegionPtr pRegion, void *closure);
void
-exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg);
+exaPrepareAccessReg_mixed(DrvPixmapPtr pPixmap, int index, RegionPtr pReg);
/* exa_render.c */
Bool
@@ -691,10 +691,10 @@ exaTriangles (CARD8 op, DrvPicturePtr pSrc, DrvPicturePtr pDst,
/* exa_glyph.c */
void
-exaGlyphsInit(ScreenPtr pScreen);
+exaGlyphsInit(DrvScreenPtr pScreen);
void
-exaGlyphsFini (ScreenPtr pScreen);
+exaGlyphsFini (DrvScreenPtr pScreen);
void
exaGlyphs (CARD8 op,
@@ -718,15 +718,15 @@ void
exaDoMigration_classic (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel);
void
-exaPixmapSave (ScreenPtr pScreen, ExaOffscreenArea *area);
+exaPixmapSave (DrvScreenPtr pScreen, ExaOffscreenArea *area);
void
-exaMoveOutPixmap_classic (PixmapPtr pPixmap);
+exaMoveOutPixmap_classic (DrvPixmapPtr pPixmap);
void
-exaMoveInPixmap_classic (PixmapPtr pPixmap);
+exaMoveInPixmap_classic (DrvPixmapPtr pPixmap);
void
-exaPrepareAccessReg_classic(PixmapPtr pPixmap, int index, RegionPtr pReg);
+exaPrepareAccessReg_classic(DrvPixmapPtr pPixmap, int index, RegionPtr pReg);
#endif /* EXAPRIV_H */
diff --git a/drv/exa/exa_render.c b/drv/exa/exa_render.c
index ea2702953..71f89e93c 100644
--- a/drv/exa/exa_render.c
+++ b/drv/exa/exa_render.c
@@ -259,11 +259,11 @@ exaTryDriverSolidFill(DrvPicturePtr pSrc,
CARD16 width,
CARD16 height)
{
- ExaScreenPriv (pDst->pPixmap->pScreen);
+ ExaScreenPriv (pDst->pPixmap->pDrvScreen);
RegionRec region;
BoxPtr pbox;
int nbox;
- PixmapPtr pSrcPix, pDstPix;
+ DrvPixmapPtr pSrcPix, pDstPix;
ExaPixmapPrivPtr pDstExaPix;
CARD32 pixel;
CARD16 red, green, blue, alpha;
@@ -341,7 +341,7 @@ exaTryDriverSolidFill(DrvPicturePtr pSrc,
}
(*pExaScr->info->DoneSolid) (pDstPix);
- exaMarkSync(pDst->pPixmap->pScreen);
+ exaMarkSync(pDst->pPixmap->pDrvScreen);
RegionUninit(&region);
return 1;
@@ -355,8 +355,8 @@ exaTryDriverCompositeRects(CARD8 op,
int nrect,
ExaCompositeRectPtr rects)
{
- ExaScreenPriv (pDst->pPixmap->pScreen);
- PixmapPtr pSrcPix = NULL, pMaskPix = NULL, pDstPix;
+ ExaScreenPriv (pDst->pPixmap->pDrvScreen);
+ DrvPixmapPtr pSrcPix = NULL, pMaskPix = NULL, pDstPix;
ExaPixmapPrivPtr pSrcExaPix = NULL, pMaskExaPix = NULL, pDstExaPix;
if (!pExaScr->info->PrepareComposite)
@@ -498,7 +498,7 @@ exaTryDriverCompositeRects(CARD8 op,
}
(*pExaScr->info->DoneComposite) (pDstPix);
- exaMarkSync(pDst->pPixmap->pScreen);
+ exaMarkSync(pDst->pPixmap->pDrvScreen);
return 1;
}
@@ -518,7 +518,7 @@ exaCompositeRects(CARD8 op,
int nrect,
ExaCompositeRectPtr rects)
{
- ExaScreenPriv (pDst->pPixmap->pScreen);
+ ExaScreenPriv (pDst->pPixmap->pDrvScreen);
int n;
ExaCompositeRectPtr r;
int ret;
@@ -643,11 +643,11 @@ exaTryDriverComposite(CARD8 op,
CARD16 width,
CARD16 height)
{
- ExaScreenPriv (pDst->pPixmap->pScreen);
+ ExaScreenPriv (pDst->pPixmap->pDrvScreen);
RegionRec region;
BoxPtr pbox;
int nbox;
- PixmapPtr pSrcPix = NULL, pMaskPix = NULL, pDstPix;
+ DrvPixmapPtr pSrcPix = NULL, pMaskPix = NULL, pDstPix;
ExaPixmapPrivPtr pSrcExaPix = NULL, pMaskExaPix = NULL, pDstExaPix;
if (pSrc->pPixmap) {
@@ -778,7 +778,7 @@ exaTryDriverComposite(CARD8 op,
pbox++;
}
(*pExaScr->info->DoneComposite) (pDstPix);
- exaMarkSync(pDst->pPixmap->pScreen);
+ exaMarkSync(pDst->pPixmap->pDrvScreen);
RegionUninit(&region);
return 1;
@@ -847,7 +847,7 @@ exaTryMagicTwoPassCompositeHelper(CARD8 op,
CARD16 width,
CARD16 height)
{
- ExaScreenPriv (pDst->pPixmap->pScreen);
+ ExaScreenPriv (pDst->pPixmap->pDrvScreen);
assert(op == PictOpOver);
@@ -888,7 +888,7 @@ exaComposite(CARD8 op,
CARD16 width,
CARD16 height)
{
- ExaScreenPriv (pDst->pPixmap->pScreen);
+ ExaScreenPriv (pDst->pPixmap->pDrvScreen);
int ret = -1;
Bool saveSrcRepeat = pSrc ? pSrc->repeat : 0;
Bool saveMaskRepeat = pMask ? pMask->repeat : 0;
@@ -996,7 +996,7 @@ exaComposite(CARD8 op,
patOrg.y = yDst - ySrc;
ret = exaFillRegionTiled(pDst->pPixmap, &region,
- (PixmapPtr)pSrc->pPixmap,
+ (DrvPixmapPtr)pSrc->pPixmap,
&patOrg, FB_ALLONES, GXcopy, CT_NONE);
RegionUninit(&region);
@@ -1076,13 +1076,13 @@ done:
* See the comments about exaTrapezoids and exaTriangles.
*/
static DrvPicturePtr
-exaCreateAlphaPicture (ScreenPtr pScreen,
+exaCreateAlphaPicture (DrvScreenPtr pScreen,
DrvPicturePtr pDst,
PictFormatPtr pPictFormat,
CARD16 width,
CARD16 height)
{
- PixmapPtr pPixmap;
+ DrvPixmapPtr pPixmap;
DrvPicturePtr pPicture;
DrvGCPtr pGC;
int error;
@@ -1101,14 +1101,14 @@ exaCreateAlphaPicture (ScreenPtr pScreen,
return 0;
}
- pPixmap = (*pScreen->gpu.CreatePixmap) (pScreen, width, height,
+ pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height,
pPictFormat->depth, 0, NULL);
if (!pPixmap)
return 0;
pGC = DrvGetScratchGC (pPixmap->depth, pScreen);
if (!pGC)
{
- (*pScreen->gpu.DestroyPixmap) (pPixmap);
+ (*pScreen->DestroyPixmap) (pPixmap);
return 0;
}
DrvValidateGC (pPixmap, pGC);
@@ -1121,7 +1121,7 @@ exaCreateAlphaPicture (ScreenPtr pScreen,
DrvFreeScratchGC (pGC);
pPicture = DrvCreatePicture (pPixmap, pPictFormat, 0, 0);
- (*pScreen->gpu.DestroyPixmap) (pPixmap);
+ (*pScreen->DestroyPixmap) (pPixmap);
return pPicture;
}
@@ -1143,8 +1143,8 @@ exaTrapezoids (CARD8 op, DrvPicturePtr pSrc, DrvPicturePtr pDst,
PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc,
int ntrap, xTrapezoid *traps)
{
- ScreenPtr pScreen = pDst->pPixmap->pScreen;
- PictureScreenPtr ps = GetPictureScreen(pScreen);
+ DrvScreenPtr pScreen = pDst->pPixmap->pDrvScreen;
+ DrvPictureScreenPtr ps = DrvGetPictureScreen(pScreen);
BoxRec bounds;
if (maskFormat) {
@@ -1168,7 +1168,7 @@ exaTrapezoids (CARD8 op, DrvPicturePtr pSrc, DrvPicturePtr pDst,
exaPrepareAccess(pPicture->pPixmap, EXA_PREPARE_DEST);
for (; ntrap; ntrap--, traps++)
- (*ps->gpu.RasterizeTrapezoid) (pPicture, traps,
+ (*ps->RasterizeTrapezoid) (pPicture, traps,
-bounds.x1, -bounds.y1);
exaFinishAccess(pPicture->pPixmap, EXA_PREPARE_DEST);
@@ -1207,8 +1207,8 @@ exaTriangles (CARD8 op, DrvPicturePtr pSrc, DrvPicturePtr pDst,
PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc,
int ntri, xTriangle *tris)
{
- ScreenPtr pScreen = pDst->pPixmap->pScreen;
- PictureScreenPtr ps = GetPictureScreen(pScreen);
+ DrvScreenPtr pScreen = pDst->pPixmap->pDrvScreen;
+ DrvPictureScreenPtr ps = DrvGetPictureScreen(pScreen);
BoxRec bounds;
if (maskFormat) {
@@ -1231,7 +1231,7 @@ exaTriangles (CARD8 op, DrvPicturePtr pSrc, DrvPicturePtr pDst,
return;
exaPrepareAccess(pPicture->pPixmap, EXA_PREPARE_DEST);
- (*ps->gpu.AddTriangles) (pPicture, -bounds.x1, -bounds.y1, ntri, tris);
+ (*ps->AddTriangles) (pPicture, -bounds.x1, -bounds.y1, ntri, tris);
exaFinishAccess(pPicture->pPixmap, EXA_PREPARE_DEST);
xRel = bounds.x1 + xSrc - xDst;
diff --git a/drv/exa/exa_unaccel.c b/drv/exa/exa_unaccel.c
index 2faf963dc..a5bdf6770 100644
--- a/drv/exa/exa_unaccel.c
+++ b/drv/exa/exa_unaccel.c
@@ -63,14 +63,14 @@ exaFinishAccessGC(DrvGCPtr pGC)
#if DEBUG_TRACE_FALL
char
-exaDrawableLocation(PixmapPtr pPixmap)
+exaDrawableLocation(DrvPixmapPtr pPixmap)
{
return exaDrawableIsOffscreen(pPixmap) ? 's' : 'm';
}
#endif /* DEBUG_TRACE_FALL */
void
-ExaCheckFillSpans (PixmapPtr pPixmap, DrvGCPtr pGC, int nspans,
+ExaCheckFillSpans (DrvPixmapPtr pPixmap, DrvGCPtr pGC, int nspans,
DDXPointPtr ppt, int *pwidth, int fSorted)
{
EXA_PRE_FALLBACK_GC(pGC);
@@ -84,7 +84,7 @@ ExaCheckFillSpans (PixmapPtr pPixmap, DrvGCPtr pGC, int nspans,
}
void
-ExaCheckSetSpans (PixmapPtr pPixmap, DrvGCPtr pGC, char *psrc,
+ExaCheckSetSpans (DrvPixmapPtr pPixmap, DrvGCPtr pGC, char *psrc,
DDXPointPtr ppt, int *pwidth, int nspans, int fSorted)
{
EXA_PRE_FALLBACK_GC(pGC);
@@ -96,7 +96,7 @@ ExaCheckSetSpans (PixmapPtr pPixmap, DrvGCPtr pGC, char *psrc,
}
void
-ExaCheckPutImage (PixmapPtr pPixmap, DrvGCPtr pGC, int depth,
+ExaCheckPutImage (DrvPixmapPtr pPixmap, DrvGCPtr pGC, int depth,
int x, int y, int w, int h, int leftPad, int format,
char *bits)
{
@@ -117,7 +117,7 @@ ExaCheckPutImage (PixmapPtr pPixmap, DrvGCPtr pGC, int depth,
}
void
-ExaCheckCopyNtoN (PixmapPtr pSrc, PixmapPtr pDst, DrvGCPtr pGC,
+ExaCheckCopyNtoN (DrvPixmapPtr pSrc, DrvPixmapPtr pDst, DrvGCPtr pGC,
BoxPtr pbox, int nbox, int dx, int dy, Bool reverse,
Bool upsidedown, Pixel bitplane, void *closure)
{
@@ -125,7 +125,7 @@ ExaCheckCopyNtoN (PixmapPtr pSrc, PixmapPtr pDst, DrvGCPtr pGC,
drvCopyProc copy;
ExaGCPrivPtr pExaGC = NULL;
- EXA_PRE_FALLBACK(pDst->pScreen);
+ EXA_PRE_FALLBACK(pDst->pDrvScreen);
if (pGC) {
pExaGC = ExaGetGCPriv(pGC);
@@ -135,7 +135,7 @@ ExaCheckCopyNtoN (PixmapPtr pSrc, PixmapPtr pDst, DrvGCPtr pGC,
exaDrawableLocation(pSrc), exaDrawableLocation(pDst)));
if (pExaScr->prepare_access_reg) {
- PixmapPtr pPixmap = exaGetDrawablePixmap(pSrc);
+ DrvPixmapPtr pPixmap = exaGetDrawablePixmap(pSrc);
RegionInit(&reg, pbox, nbox);
RegionTranslate(&reg, dx, dy);
@@ -147,7 +147,7 @@ ExaCheckCopyNtoN (PixmapPtr pSrc, PixmapPtr pDst, DrvGCPtr pGC,
if (pExaScr->prepare_access_reg && (!pGC || (pGC &&
!exaGCReadsDestination(pDst, pGC->planemask, pGC->fillStyle,
pGC->alu, pGC->clientClipType)))) {
- PixmapPtr pPixmap = exaGetDrawablePixmap(pDst);
+ DrvPixmapPtr pPixmap = exaGetDrawablePixmap(pDst);
RegionInit(&reg, pbox, nbox);
pExaScr->prepare_access_reg(pPixmap, EXA_PREPARE_DEST, &reg);
@@ -165,17 +165,17 @@ ExaCheckCopyNtoN (PixmapPtr pSrc, PixmapPtr pDst, DrvGCPtr pGC,
if (pGC) {
swap(pExaGC, pGC, ops);
}
- EXA_POST_FALLBACK(pDst->pScreen);
+ EXA_POST_FALLBACK(pDst->pDrvScreen);
}
static void
-ExaFallbackPrepareReg(PixmapPtr pPixmap,
+ExaFallbackPrepareReg(DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int x, int y, int width, int height,
int index, Bool checkReads)
{
- ScreenPtr pScreen = pPixmap->pScreen;
+ DrvScreenPtr pScreen = pPixmap->pDrvScreen;
ExaScreenPriv(pScreen);
if (pExaScr->prepare_access_reg &&
@@ -186,7 +186,7 @@ ExaFallbackPrepareReg(PixmapPtr pPixmap,
pGC->clientClipType))) {
BoxRec box;
RegionRec reg;
- // PixmapPtr pPixmap = exaGetDrawablePixmap(pPixmap);
+ // DrvPixmapPtr pPixmap = exaGetDrawablePixmap(pPixmap);
box.x1 = x;
box.y1 = y;
@@ -202,8 +202,8 @@ ExaFallbackPrepareReg(PixmapPtr pPixmap,
void
-ExaCopyPlaneNtoN (PixmapPtr pSrc,
- PixmapPtr pDst,
+ExaCopyPlaneNtoN (DrvPixmapPtr pSrc,
+ DrvPixmapPtr pDst,
DrvGCPtr pGC,
BoxPtr pbox,
int nbox,
@@ -239,7 +239,7 @@ ExaCopyPlaneNtoN (PixmapPtr pSrc,
}
void
-ExaCheckPolyPoint (PixmapPtr pPixmap, DrvGCPtr pGC, int mode, int npt,
+ExaCheckPolyPoint (DrvPixmapPtr pPixmap, DrvGCPtr pGC, int mode, int npt,
DDXPointPtr pptInit)
{
EXA_PRE_FALLBACK_GC(pGC);
@@ -251,7 +251,7 @@ ExaCheckPolyPoint (PixmapPtr pPixmap, DrvGCPtr pGC, int mode, int npt,
}
void
-ExaCheckPolylines (PixmapPtr pPixmap, DrvGCPtr pGC,
+ExaCheckPolylines (DrvPixmapPtr pPixmap, DrvGCPtr pGC,
int mode, int npt, DDXPointPtr ppt)
{
EXA_PRE_FALLBACK_GC(pGC);
@@ -268,7 +268,7 @@ ExaCheckPolylines (PixmapPtr pPixmap, DrvGCPtr pGC,
}
void
-ExaCheckPolySegment (PixmapPtr pPixmap, DrvGCPtr pGC,
+ExaCheckPolySegment (DrvPixmapPtr pPixmap, DrvGCPtr pGC,
int nsegInit, xSegment *pSegInit)
{
EXA_PRE_FALLBACK_GC(pGC);
@@ -284,7 +284,7 @@ ExaCheckPolySegment (PixmapPtr pPixmap, DrvGCPtr pGC,
}
void
-ExaCheckPolyArc (PixmapPtr pPixmap, DrvGCPtr pGC,
+ExaCheckPolyArc (DrvPixmapPtr pPixmap, DrvGCPtr pGC,
int narcs, xArc *pArcs)
{
EXA_PRE_FALLBACK_GC(pGC);
@@ -299,7 +299,7 @@ ExaCheckPolyArc (PixmapPtr pPixmap, DrvGCPtr pGC,
}
void
-ExaCheckPolyFillRect (PixmapPtr pPixmap, DrvGCPtr pGC,
+ExaCheckPolyFillRect (DrvPixmapPtr pPixmap, DrvGCPtr pGC,
int nrect, xRectangle *prect)
{
EXA_PRE_FALLBACK_GC(pGC);
@@ -314,7 +314,7 @@ ExaCheckPolyFillRect (PixmapPtr pPixmap, DrvGCPtr pGC,
}
void
-ExaCheckImageGlyphBlt (PixmapPtr pPixmap, DrvGCPtr pGC,
+ExaCheckImageGlyphBlt (DrvPixmapPtr pPixmap, DrvGCPtr pGC,
int x, int y, unsigned int nglyph,
CharInfoPtr *ppci, pointer pglyphBase)
{
@@ -330,7 +330,7 @@ ExaCheckImageGlyphBlt (PixmapPtr pPixmap, DrvGCPtr pGC,
}
void
-ExaCheckPolyGlyphBlt (PixmapPtr pPixmap, DrvGCPtr pGC,
+ExaCheckPolyGlyphBlt (DrvPixmapPtr pPixmap, DrvGCPtr pGC,
int x, int y, unsigned int nglyph,
CharInfoPtr *ppci, pointer pglyphBase)
{
@@ -346,8 +346,8 @@ ExaCheckPolyGlyphBlt (PixmapPtr pPixmap, DrvGCPtr pGC,
}
void
-ExaCheckPushPixels (DrvGCPtr pGC, PixmapPtr pBitmap,
- PixmapPtr pPixmap,
+ExaCheckPushPixels (DrvGCPtr pGC, DrvPixmapPtr pBitmap,
+ DrvPixmapPtr pPixmap,
int w, int h, int x, int y)
{
EXA_PRE_FALLBACK_GC(pGC);
@@ -367,54 +367,54 @@ ExaCheckPushPixels (DrvGCPtr pGC, PixmapPtr pBitmap,
}
void
-ExaCheckGetImage(PixmapPtr pPixmap, int x, int y, int w, int h,
+ExaCheckGetImage(DrvPixmapPtr pPixmap, int x, int y, int w, int h,
unsigned int format, unsigned long planeMask, char *d)
{
- ScreenPtr pScreen = pPixmap->pScreen;
+ DrvScreenPtr pScreen = pPixmap->pDrvScreen;
EXA_PRE_FALLBACK(pScreen);
EXA_FALLBACK(("from %p (%c)\n", pPixmap,
exaDrawableLocation(pPixmap)));
ExaFallbackPrepareReg(pPixmap, NULL, x, y, w, h,
EXA_PREPARE_SRC, FALSE);
- swap(pExaScr, (&pScreen->gpu), GetImage);
- pScreen->gpu.GetImage (pPixmap, x, y, w, h, format, planeMask, d);
- swap(pExaScr, (&pScreen->gpu), GetImage);
+ swap(pExaScr, pScreen, GetImage);
+ pScreen->GetImage (pPixmap, x, y, w, h, format, planeMask, d);
+ swap(pExaScr, pScreen, GetImage);
exaFinishAccess (pPixmap, EXA_PREPARE_SRC);
EXA_POST_FALLBACK(pScreen);
}
void
-ExaCheckGetSpans (PixmapPtr pPixmap,
+ExaCheckGetSpans (DrvPixmapPtr pPixmap,
int wMax,
DDXPointPtr ppt,
int *pwidth,
int nspans,
char *pdstStart)
{
- ScreenPtr pScreen = pPixmap->pScreen;
+ DrvScreenPtr pScreen = pPixmap->pDrvScreen;
EXA_PRE_FALLBACK(pScreen);
EXA_FALLBACK(("from %p (%c)\n", pPixmap, exaDrawableLocation(pPixmap)));
exaPrepareAccess (pPixmap, EXA_PREPARE_SRC);
- swap(pExaScr, (&pScreen->gpu), GetSpans);
- pScreen->gpu.GetSpans (pPixmap, wMax, ppt, pwidth, nspans, pdstStart);
- swap(pExaScr, (&pScreen->gpu), GetSpans);
+ swap(pExaScr, pScreen, GetSpans);
+ pScreen->GetSpans (pPixmap, wMax, ppt, pwidth, nspans, pdstStart);
+ swap(pExaScr, pScreen, GetSpans);
exaFinishAccess (pPixmap, EXA_PREPARE_SRC);
EXA_POST_FALLBACK(pScreen);
}
static void
-ExaSrcValidate(PixmapPtr pPixmap,
+ExaSrcValidate(DrvPixmapPtr pPixmap,
int x,
int y,
int width,
int height,
unsigned int subWindowMode)
{
- ScreenPtr pScreen = pPixmap->pScreen;
+ DrvScreenPtr pScreen = pPixmap->pDrvScreen;
ExaScreenPriv(pScreen);
- PixmapPtr pPix = exaGetDrawablePixmap (pPixmap);
+ DrvPixmapPtr pPix = exaGetDrawablePixmap (pPixmap);
BoxRec box;
RegionRec reg;
RegionPtr dst;
@@ -431,7 +431,7 @@ ExaSrcValidate(PixmapPtr pPixmap,
RegionUnion(dst, dst, &reg);
RegionUninit(&reg);
- if (pExaScr->SavedSourceValidate) {
+ if (pExaScr->SavedSourceValidate) {
// swap(pExaScr, pScreen, SourceValidate);
// pScreen->SourceValidate(pPixmap, x, y, width, height, subWindowMode);
// swap(pExaScr, pScreen, SourceValidate);
@@ -439,7 +439,7 @@ ExaSrcValidate(PixmapPtr pPixmap,
}
static Bool
-ExaPrepareCompositeReg(ScreenPtr pScreen,
+ExaPrepareCompositeReg(DrvScreenPtr pScreen,
CARD8 op,
DrvPicturePtr pSrc,
DrvPicturePtr pMask,
@@ -457,9 +457,9 @@ ExaPrepareCompositeReg(ScreenPtr pScreen,
RegionPtr dstReg = NULL;
RegionPtr srcReg = NULL;
RegionPtr maskReg = NULL;
- PixmapPtr pSrcPix = NULL;
- PixmapPtr pMaskPix = NULL;
- PixmapPtr pDstPix;
+ DrvPixmapPtr pSrcPix = NULL;
+ DrvPixmapPtr pMaskPix = NULL;
+ DrvPixmapPtr pDstPix;
ExaScreenPriv(pScreen);
Bool ret;
@@ -493,13 +493,13 @@ ExaPrepareCompositeReg(ScreenPtr pScreen,
// -pDst->pPixmap->y);
pExaScr->SavedSourceValidate = ExaSrcValidate;
- swap(pExaScr, pScreen, SourceValidate);
+ // swap(pExaScr, pScreen, SourceValidate);
ret = drvComputeCompositeRegion (&region, pSrc, pMask, pDst,
xSrc, ySrc, xMask, yMask,
xDst,
yDst,
width, height);
- swap(pExaScr, pScreen, SourceValidate);
+ // swap(pExaScr, pScreen, SourceValidate);
// RegionTranslate(pDst->pCompositeClip, 0, 0);
// pDst->pPixmap->x,
@@ -583,8 +583,8 @@ ExaCheckComposite (CARD8 op,
CARD16 width,
CARD16 height)
{
- ScreenPtr pScreen = pDst->pPixmap->pScreen;
- PictureScreenPtr ps = GetPictureScreen(pScreen);
+ DrvScreenPtr pScreen = pDst->pPixmap->pDrvScreen;
+ DrvPictureScreenPtr ps = DrvGetPictureScreen(pScreen);
EXA_PRE_FALLBACK(pScreen);
if (pExaScr->prepare_access_reg) {
@@ -617,8 +617,8 @@ ExaCheckComposite (CARD8 op,
exaPrepareAccess (pMask->pPixmap, EXA_PREPARE_MASK);
}
- swap(pExaScr, (&ps->gpu), Composite);
- ps->gpu.Composite (op,
+ swap(pExaScr, ps, Composite);
+ ps->Composite (op,
pSrc,
pMask,
pDst,
@@ -630,7 +630,7 @@ ExaCheckComposite (CARD8 op,
yDst,
width,
height);
- swap(pExaScr, (&ps->gpu), Composite);
+ swap(pExaScr, ps, Composite);
if (pMask && pMask->pPixmap != NULL)
exaFinishAccess (pMask->pPixmap, EXA_PREPARE_MASK);
if (pSrc->pPixmap != NULL)
@@ -662,7 +662,7 @@ ExaCheckGlyphs (CARD8 op,
GlyphPtr *glyphs,
int gp_index)
{
- ScreenPtr pScreen = pDst->pPixmap->pScreen;
+ DrvScreenPtr pScreen = pDst->pPixmap->pDrvScreen;
EXA_PRE_FALLBACK(pScreen);
DrvGlyphs(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs, gp_index);
@@ -677,16 +677,16 @@ ExaCheckAddTraps (DrvPicturePtr pPicture,
int ntrap,
xTrap *traps)
{
- ScreenPtr pScreen = pPicture->pPixmap->pScreen;
- PictureScreenPtr ps = GetPictureScreen(pScreen);
+ DrvScreenPtr pScreen = pPicture->pPixmap->pDrvScreen;
+ DrvPictureScreenPtr ps = DrvGetPictureScreen(pScreen);
EXA_PRE_FALLBACK(pScreen);
EXA_FALLBACK(("to pict %p (%c)\n",
exaDrawableLocation(pPicture->pPixmap)));
exaPrepareAccess(pPicture->pPixmap, EXA_PREPARE_DEST);
- swap(pExaScr, (&ps->gpu), AddTraps);
- ps->gpu.AddTraps (pPicture, x_off, y_off, ntrap, traps);
- swap(pExaScr, (&ps->gpu), AddTraps);
+ swap(pExaScr, ps, AddTraps);
+ ps->AddTraps (pPicture, x_off, y_off, ntrap, traps);
+ swap(pExaScr, ps, AddTraps);
exaFinishAccess(pPicture->pPixmap, EXA_PREPARE_DEST);
EXA_POST_FALLBACK(pScreen);
}
@@ -696,14 +696,14 @@ ExaCheckAddTraps (DrvPicturePtr pPicture,
* that happen to be 1x1. Pixmap must be at least 8bpp.
*/
CARD32
-exaGetPixmapFirstPixel (PixmapPtr pPixmap)
+exaGetPixmapFirstPixel (DrvPixmapPtr pPixmap)
{
switch (pPixmap->bitsPerPixel) {
case 32:
{
CARD32 pixel;
- pPixmap->pScreen->gpu.GetImage(pPixmap, 0, 0, 1, 1,
+ pPixmap->pDrvScreen->GetImage(pPixmap, 0, 0, 1, 1,
ZPixmap, ~0, (char*)&pixel);
return pixel;
}
@@ -711,7 +711,7 @@ exaGetPixmapFirstPixel (PixmapPtr pPixmap)
{
CARD16 pixel;
- pPixmap->pScreen->gpu.GetImage(pPixmap, 0, 0, 1, 1,
+ pPixmap->pDrvScreen->GetImage(pPixmap, 0, 0, 1, 1,
ZPixmap, ~0, (char*)&pixel);
return pixel;
}
@@ -721,7 +721,7 @@ exaGetPixmapFirstPixel (PixmapPtr pPixmap)
{
CARD8 pixel;
- pPixmap->pScreen->gpu.GetImage(pPixmap, 0, 0, 1, 1,
+ pPixmap->pDrvScreen->GetImage(pPixmap, 0, 0, 1, 1,
ZPixmap, ~0, (char*)&pixel);
return pixel;
}
diff --git a/drv/fb/Makefile.am b/drv/fb/Makefile.am
index 204bf16fa..b0a9fb368 100644
--- a/drv/fb/Makefile.am
+++ b/drv/fb/Makefile.am
@@ -3,7 +3,7 @@ noinst_LTLIBRARIES = libdrvfb.la libdrvwfb.la
AM_CFLAGS = $(DIX_CFLAGS)
if XORG
-sdk_HEADERS = drv_fb.h drv_fbrop.h drv_fboverlay.h drv_wfbrename.h drv_fbpict.h
+sdk_HEADERS = drvfb.h drvfboverlay.h drv_wfbrename.h drv_fbpict.h
endif
libdrvfb_la_CFLAGS = $(AM_CFLAGS)
diff --git a/drv/fb/fbpict.h b/drv/fb/drv_fbpict.h
index 96ff75e53..96ff75e53 100644
--- a/drv/fb/fbpict.h
+++ b/drv/fb/drv_fbpict.h
diff --git a/drv/fb/wfbrename.h b/drv/fb/drv_wfbrename.h
index 38adf4e1a..38adf4e1a 100644
--- a/drv/fb/wfbrename.h
+++ b/drv/fb/drv_wfbrename.h
diff --git a/drv/fb/fb.h b/drv/fb/drvfb.h
index db254e39c..601486cba 100644
--- a/drv/fb/fb.h
+++ b/drv/fb/drvfb.h
@@ -28,7 +28,7 @@
#include <X11/X.h>
#include <pixman.h>
-#include "scrnintstr.h"
+#include "drv_scrnintstr.h"
#include "drv_pixmap.h"
#include "drv_pixmapstr.h"
#include "region.h"
@@ -49,7 +49,7 @@
#ifdef FB_ACCESS_WRAPPER
-#include "wfbrename.h"
+#include "drv_wfbrename.h"
#define FBPREFIX(x) wfb##x
#define WRITE(ptr, val) ((*wfbWriteMemory)((ptr), (val), sizeof(*(ptr))))
#define READ(ptr) ((*wfbReadMemory)((ptr), sizeof(*(ptr))))
@@ -592,7 +592,7 @@ fbGetGCPrivateKey (void);
extern _X_EXPORT DevPrivateKey
fbGetWinPrivateKey (void);
-extern _X_EXPORT const GCOps fbGCOps;
+extern _X_EXPORT const DrvGCOps fbGCOps;
//extern _X_EXPORT const GCFuncs fbGCFuncs;
@@ -601,18 +601,18 @@ typedef FbBits (*ReadMemoryProcPtr)(const void *src, int size);
typedef void (*WriteMemoryProcPtr)(void *dst, FbBits value, int size);
typedef void (*SetupWrapProcPtr)(ReadMemoryProcPtr *pRead,
WriteMemoryProcPtr *pWrite,
- PixmapPtr pPixmap);
-typedef void (*FinishWrapProcPtr)(PixmapPtr pPixmap);
+ DrvPixmapPtr pPixmap);
+typedef void (*FinishWrapProcPtr)(DrvPixmapPtr pPixmap);
#ifdef FB_ACCESS_WRAPPER
#define fbPrepareAccess(pDraw) \
- fbGetScreenPrivate((pDraw)->pScreen)->setupWrap( \
+ fbGetScreenPrivate((pDraw)->pDrvScreen)->setupWrap( \
&wfbReadMemory, \
&wfbWriteMemory, \
(pDraw))
#define fbFinishAccess(pDraw) \
- fbGetScreenPrivate((pDraw)->pScreen)->finishWrap(pDraw)
+ fbGetScreenPrivate((pDraw)->pDrvScreen)->finishWrap(pDraw)
#else
@@ -635,8 +635,8 @@ typedef struct {
#endif
} FbScreenPrivRec, *FbScreenPrivPtr;
-#define fbGetScreenPrivate(pScreen) ((FbScreenPrivPtr) \
- dixLookupPrivate(&(pScreen)->devPrivates, fbGetScreenPrivateKey()))
+#define fbGetScreenPrivate(pDrvScreen) ((FbScreenPrivPtr) \
+ dixLookupPrivate(&(pDrvScreen)->devPrivates, fbGetScreenPrivateKey()))
/* private field of GC */
typedef struct {
@@ -656,7 +656,7 @@ typedef struct {
#define fbGetFreeCompClip(pGC) ((pGC)->freeCompClip)
#define fbGetRotatedPixmap(pGC) ((pGC)->pRotatedPixmap)
-#define fbGetScreenPixmap(s) ((PixmapPtr) (s)->devPrivate)
+#define fbGetScreenPixmap(s) ((DrvPixmapPtr) (s)->devPrivate)
#ifdef ROOTLESS
#define __fbPixDrawableX(pPix) ((pPix)->x)
@@ -670,14 +670,14 @@ typedef struct {
#define __fbPixOffYPix(pPix) (__fbPixDrawableY(pPix))
#define fbGetDrawablePixmap(pDrawable, pixmap, xoff, yoff) { \
- (pixmap) = (PixmapPtr) (pDrawable); \
+ (pixmap) = (DrvPixmapPtr) (pDrawable); \
(xoff) = __fbPixOffXPix(pixmap); \
(yoff) = __fbPixOffYPix(pixmap); \
fbPrepareAccess(pDrawable); \
}
#define fbGetPixmap(pDrawable, pixmap, xoff, yoff) { \
- (pixmap) = (PixmapPtr) (pDrawable); \
+ (pixmap) = (DrvPixmapPtr) (pDrawable); \
(xoff) = __fbPixOffXPix(pixmap); \
(yoff) = __fbPixOffYPix(pixmap); \
} \
@@ -696,13 +696,13 @@ typedef struct {
}
#define fbGetDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \
- PixmapPtr _pPix; \
+ DrvPixmapPtr _pPix; \
fbGetDrawablePixmap(pDrawable, _pPix, xoff, yoff); \
fbGetPixmapBitsData(_pPix, pointer, stride, bpp); \
}
#define fbGetStipDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \
- PixmapPtr _pPix; \
+ DrvPixmapPtr _pPix; \
fbGetDrawablePixmap(pDrawable, _pPix, xoff, yoff); \
fbGetPixmapStipData(_pPix, pointer, stride, bpp); \
}
@@ -724,7 +724,7 @@ typedef struct {
* fb24_32.c
*/
extern _X_EXPORT void
-fb24_32GetSpans(PixmapPtr pPixmap,
+fb24_32GetSpans(DrvPixmapPtr pPixmap,
int wMax,
DDXPointPtr ppt,
int *pwidth,
@@ -732,7 +732,7 @@ fb24_32GetSpans(PixmapPtr pPixmap,
char *pchardstStart);
extern _X_EXPORT void
-fb24_32SetSpans (PixmapPtr pPixmap,
+fb24_32SetSpans (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
char *src,
DDXPointPtr ppt,
@@ -741,7 +741,7 @@ fb24_32SetSpans (PixmapPtr pPixmap,
int fSorted);
extern _X_EXPORT void
-fb24_32PutZImage (PixmapPtr pPixmap,
+fb24_32PutZImage (DrvPixmapPtr pPixmap,
RegionPtr pClip,
int alu,
FbBits pm,
@@ -753,7 +753,7 @@ fb24_32PutZImage (PixmapPtr pPixmap,
FbStride srcStride);
extern _X_EXPORT void
-fb24_32GetImage (PixmapPtr pPixmap,
+fb24_32GetImage (DrvPixmapPtr pPixmap,
int x,
int y,
int w,
@@ -763,8 +763,8 @@ fb24_32GetImage (PixmapPtr pPixmap,
char *d);
extern _X_EXPORT void
-fb24_32CopyMtoN (PixmapPtr pSrcDrawable,
- PixmapPtr pDstDrawable,
+fb24_32CopyMtoN (DrvPixmapPtr pSrcDrawable,
+ DrvPixmapPtr pDstDrawable,
DrvGCPtr pGC,
BoxPtr pbox,
int nbox,
@@ -775,14 +775,14 @@ fb24_32CopyMtoN (PixmapPtr pSrcDrawable,
Pixel bitplane,
void *closure);
-extern _X_EXPORT PixmapPtr
-fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel);
+extern _X_EXPORT DrvPixmapPtr
+fb24_32ReformatTile(DrvPixmapPtr pOldTile, int bitsPerPixel);
extern _X_EXPORT Bool
fb24_32CreateScreenResources(ScreenPtr pScreen);
extern _X_EXPORT Bool
-fb24_32ModifyPixmapHeader (PixmapPtr pPixmap,
+fb24_32ModifyPixmapHeader (DrvPixmapPtr pPixmap,
int width,
int height,
int depth,
@@ -794,14 +794,14 @@ fb24_32ModifyPixmapHeader (PixmapPtr pPixmap,
* fballpriv.c
*/
extern _X_EXPORT Bool
-fbAllocatePrivates(ScreenPtr pScreen, DevPrivateKey *pGCIndex);
+fbAllocatePrivates(DrvScreenPtr pScreen, DevPrivateKey *pGCIndex);
/*
* fbarc.c
*/
extern _X_EXPORT void
-fbPolyArc (PixmapPtr pPixmap,
+fbPolyArc (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int narcs,
xArc *parcs);
@@ -811,7 +811,7 @@ fbPolyArc (PixmapPtr pPixmap,
*/
extern _X_EXPORT void
-fbBresSolid8(PixmapPtr pPixmap,
+fbBresSolid8(DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int dashOffset,
int signdx,
@@ -825,7 +825,7 @@ fbBresSolid8(PixmapPtr pPixmap,
int len);
extern _X_EXPORT void
-fbBresDash8 (PixmapPtr pPixmap,
+fbBresDash8 (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int dashOffset,
int signdx,
@@ -872,20 +872,20 @@ fbGlyph8 (FbBits *dstLine,
int shift);
extern _X_EXPORT void
-fbPolyline8 (PixmapPtr pPixmap,
+fbPolyline8 (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int mode,
int npt,
DDXPointPtr ptsOrig);
extern _X_EXPORT void
-fbPolySegment8 (PixmapPtr pPixmap,
+fbPolySegment8 (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int nseg,
xSegment *pseg);
extern _X_EXPORT void
-fbBresSolid16(PixmapPtr pPixmap,
+fbBresSolid16(DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int dashOffset,
int signdx,
@@ -899,7 +899,7 @@ fbBresSolid16(PixmapPtr pPixmap,
int len);
extern _X_EXPORT void
-fbBresDash16(PixmapPtr pPixmap,
+fbBresDash16(DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int dashOffset,
int signdx,
@@ -946,21 +946,21 @@ fbGlyph16(FbBits *dstLine,
int shift);
extern _X_EXPORT void
-fbPolyline16 (PixmapPtr pPixmap,
+fbPolyline16 (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int mode,
int npt,
DDXPointPtr ptsOrig);
extern _X_EXPORT void
-fbPolySegment16 (PixmapPtr pPixmap,
+fbPolySegment16 (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int nseg,
xSegment *pseg);
extern _X_EXPORT void
-fbBresSolid24(PixmapPtr pPixmap,
+fbBresSolid24(DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int dashOffset,
int signdx,
@@ -974,7 +974,7 @@ fbBresSolid24(PixmapPtr pPixmap,
int len);
extern _X_EXPORT void
-fbBresDash24(PixmapPtr pPixmap,
+fbBresDash24(DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int dashOffset,
int signdx,
@@ -1021,21 +1021,21 @@ fbGlyph24(FbBits *dstLine,
int shift);
extern _X_EXPORT void
-fbPolyline24 (PixmapPtr pPixmap,
+fbPolyline24 (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int mode,
int npt,
DDXPointPtr ptsOrig);
extern _X_EXPORT void
-fbPolySegment24 (PixmapPtr pPixmap,
+fbPolySegment24 (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int nseg,
xSegment *pseg);
extern _X_EXPORT void
-fbBresSolid32(PixmapPtr pPixmap,
+fbBresSolid32(DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int dashOffset,
int signdx,
@@ -1049,7 +1049,7 @@ fbBresSolid32(PixmapPtr pPixmap,
int len);
extern _X_EXPORT void
-fbBresDash32(PixmapPtr pPixmap,
+fbBresDash32(DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int dashOffset,
int signdx,
@@ -1095,14 +1095,14 @@ fbGlyph32(FbBits *dstLine,
int height,
int shift);
extern _X_EXPORT void
-fbPolyline32 (PixmapPtr pPixmap,
+fbPolyline32 (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int mode,
int npt,
DDXPointPtr ptsOrig);
extern _X_EXPORT void
-fbPolySegment32 (PixmapPtr pPixmap,
+fbPolySegment32 (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int nseg,
xSegment *pseg);
@@ -1224,8 +1224,8 @@ fbBltPlane (FbBits *src,
*/
extern _X_EXPORT void
-fbCopyNtoN (PixmapPtr pSrcPixmap,
- PixmapPtr pDstPixmap,
+fbCopyNtoN (DrvPixmapPtr pSrcPixmap,
+ DrvPixmapPtr pDstPixmap,
DrvGCPtr pGC,
BoxPtr pbox,
int nbox,
@@ -1237,8 +1237,8 @@ fbCopyNtoN (PixmapPtr pSrcPixmap,
void *closure);
extern _X_EXPORT void
-fbCopy1toN (PixmapPtr pSrcPixmap,
- PixmapPtr pDstPixmap,
+fbCopy1toN (DrvPixmapPtr pSrcPixmap,
+ DrvPixmapPtr pDstPixmap,
DrvGCPtr pGC,
BoxPtr pbox,
int nbox,
@@ -1250,8 +1250,8 @@ fbCopy1toN (PixmapPtr pSrcPixmap,
void *closure);
extern _X_EXPORT void
-fbCopyNto1 (PixmapPtr pSrcPixmap,
- PixmapPtr pDstPixmap,
+fbCopyNto1 (DrvPixmapPtr pSrcPixmap,
+ DrvPixmapPtr pDstPixmap,
DrvGCPtr pGC,
BoxPtr pbox,
int nbox,
@@ -1263,18 +1263,18 @@ fbCopyNto1 (PixmapPtr pSrcPixmap,
void *closure);
drvCopyProc
-fbGetCopyAreaFunction(PixmapPtr pSrc,
- PixmapPtr pDst);
+fbGetCopyAreaFunction(DrvPixmapPtr pSrc,
+ DrvPixmapPtr pDst);
drvCopyProc
-fbGetCopyPlaneFunction(PixmapPtr pSrc,
- PixmapPtr pDst, int bitplane);
+fbGetCopyPlaneFunction(DrvPixmapPtr pSrc,
+ DrvPixmapPtr pDst, int bitplane);
/*
* fbfill.c
*/
extern _X_EXPORT void
-fbFill (PixmapPtr pPixmap,
+fbFill (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int x,
int y,
@@ -1282,7 +1282,7 @@ fbFill (PixmapPtr pPixmap,
int height);
extern _X_EXPORT void
-fbSolidBoxClipped (PixmapPtr pPixmap,
+fbSolidBoxClipped (DrvPixmapPtr pPixmap,
RegionPtr pClip,
int xa,
int ya,
@@ -1295,7 +1295,7 @@ fbSolidBoxClipped (PixmapPtr pPixmap,
* fbfillrect.c
*/
extern _X_EXPORT void
-fbPolyFillRect(PixmapPtr pPixmap,
+fbPolyFillRect(DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int nrectInit,
xRectangle *prectInit);
@@ -1308,7 +1308,7 @@ fbPolyFillRect(PixmapPtr pPixmap,
* fbfillsp.c
*/
extern _X_EXPORT void
-fbFillSpans (PixmapPtr pPixmap,
+fbFillSpans (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int nInit,
DDXPointPtr pptInit,
@@ -1324,16 +1324,16 @@ extern _X_EXPORT Bool
fbCreateGC(DrvGCPtr pGC);
extern _X_EXPORT void
-fbPadPixmap (PixmapPtr pPixmap);
+fbPadPixmap (DrvPixmapPtr pPixmap);
extern _X_EXPORT void
-fbValidateGC(DrvGCPtr pGC, unsigned long changes, PixmapPtr pPixmap);
+fbValidateGC(DrvGCPtr pGC, unsigned long changes, DrvPixmapPtr pPixmap);
/*
* fbgetsp.c
*/
extern _X_EXPORT void
-fbGetSpans(PixmapPtr pPixmap,
+fbGetSpans(DrvPixmapPtr pPixmap,
int wMax,
DDXPointPtr ppt,
int *pwidth,
@@ -1352,7 +1352,7 @@ fbGlyphIn (RegionPtr pRegion,
int height);
extern _X_EXPORT void
-fbPolyGlyphBlt (PixmapPtr pPixmap,
+fbPolyGlyphBlt (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int x,
int y,
@@ -1361,7 +1361,7 @@ fbPolyGlyphBlt (PixmapPtr pPixmap,
pointer pglyphBase);
extern _X_EXPORT void
-fbImageGlyphBlt (PixmapPtr pPixmap,
+fbImageGlyphBlt (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int x,
int y,
@@ -1374,7 +1374,7 @@ fbImageGlyphBlt (PixmapPtr pPixmap,
*/
extern _X_EXPORT void
-fbPutImage (PixmapPtr pPixmap,
+fbPutImage (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int depth,
int x,
@@ -1386,7 +1386,7 @@ fbPutImage (PixmapPtr pPixmap,
char *pImage);
extern _X_EXPORT void
-fbPutZImage (PixmapPtr pPixmap,
+fbPutZImage (DrvPixmapPtr pPixmap,
RegionPtr pClip,
int alu,
FbBits pm,
@@ -1398,7 +1398,7 @@ fbPutZImage (PixmapPtr pPixmap,
FbStride srcStride);
extern _X_EXPORT void
-fbPutXYImage (PixmapPtr pPixmap,
+fbPutXYImage (DrvPixmapPtr pPixmap,
RegionPtr pClip,
FbBits fg,
FbBits bg,
@@ -1416,7 +1416,7 @@ fbPutXYImage (PixmapPtr pPixmap,
int srcX);
extern _X_EXPORT void
-fbGetImage (PixmapPtr pPixmap,
+fbGetImage (DrvPixmapPtr pPixmap,
int x,
int y,
int w,
@@ -1429,20 +1429,20 @@ fbGetImage (PixmapPtr pPixmap,
*/
extern _X_EXPORT void
-fbZeroLine (PixmapPtr pPixmap,
+fbZeroLine (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int mode,
int npt,
DDXPointPtr ppt);
extern _X_EXPORT void
-fbZeroSegment (PixmapPtr pPixmap,
+fbZeroSegment (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int nseg,
xSegment *pSegs);
extern _X_EXPORT void
-fbPolyLine (PixmapPtr pPixmap,
+fbPolyLine (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int mode,
int npt,
@@ -1453,7 +1453,7 @@ fbFixCoordModePrevious (int npt,
DDXPointPtr ppt);
extern _X_EXPORT void
-fbPolySegment (PixmapPtr pPixmap,
+fbPolySegment (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int nseg,
xSegment *pseg);
@@ -1465,7 +1465,7 @@ fbPolySegment (PixmapPtr pPixmap,
*/
extern _X_EXPORT Bool
-fbPictureInit (ScreenPtr pScreen,
+fbPictureInit (DrvScreenPtr pScreen,
PictFormatPtr formats,
int nformats);
@@ -1473,19 +1473,19 @@ fbPictureInit (ScreenPtr pScreen,
* fbpixmap.c
*/
-extern _X_EXPORT PixmapPtr
-fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp,
- unsigned usage_hint, ProtoPixmapPtr parent);
+extern _X_EXPORT DrvPixmapPtr
+fbCreatePixmapBpp (DrvScreenPtr pScreen, int width, int height, int depth, int bpp,
+ unsigned usage_hint, PixmapPtr parent);
-extern _X_EXPORT PixmapPtr
-fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth,
- unsigned usage_hint, ProtoPixmapPtr parent);
+extern _X_EXPORT DrvPixmapPtr
+fbCreatePixmap (DrvScreenPtr pScreen, int width, int height, int depth,
+ unsigned usage_hint, PixmapPtr parent);
extern _X_EXPORT Bool
-fbDestroyPixmap (PixmapPtr pPixmap);
+fbDestroyPixmap (DrvPixmapPtr pPixmap);
extern _X_EXPORT RegionPtr
-fbPixmapToRegion(PixmapPtr pPix);
+fbPixmapToRegion(DrvPixmapPtr pPix);
/*
* fbpoint.c
@@ -1506,7 +1506,7 @@ fbDots (FbBits *dstOrig,
FbBits xorOrig);
extern _X_EXPORT void
-fbPolyPoint (PixmapPtr pPixmap,
+fbPolyPoint (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int mode,
int npt,
@@ -1516,7 +1516,7 @@ fbPolyPoint (PixmapPtr pPixmap,
* fbpush.c
*/
extern _X_EXPORT void
-fbPushPattern (PixmapPtr pPixmap,
+fbPushPattern (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
FbStip *src,
@@ -1530,7 +1530,7 @@ fbPushPattern (PixmapPtr pPixmap,
int height);
extern _X_EXPORT void
-fbPushFill (PixmapPtr pPixmap,
+fbPushFill (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
FbStip *src,
@@ -1543,7 +1543,7 @@ fbPushFill (PixmapPtr pPixmap,
int height);
extern _X_EXPORT void
-fbPushImage (PixmapPtr pPixmap,
+fbPushImage (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
FbStip *src,
@@ -1557,8 +1557,8 @@ fbPushImage (PixmapPtr pPixmap,
extern _X_EXPORT void
fbPushPixels (DrvGCPtr pGC,
- PixmapPtr pBitmap,
- PixmapPtr pPixmap,
+ DrvPixmapPtr pBitmap,
+ DrvPixmapPtr pPixmap,
int dx,
int dy,
int xOrg,
@@ -1570,7 +1570,7 @@ fbPushPixels (DrvGCPtr pGC,
*/
extern _X_EXPORT Bool
-fbCloseScreen (int indx, ScreenPtr pScreen);
+fbCloseScreen (int indx, DrvScreenPtr pScreen);
extern _X_EXPORT Bool
fbRealizeFont(ScreenPtr pScreen, FontPtr pFont);
@@ -1581,10 +1581,10 @@ fbUnrealizeFont(ScreenPtr pScreen, FontPtr pFont);
extern _X_EXPORT void
fbQueryBestSize (int class,
unsigned short *width, unsigned short *height,
- ScreenPtr pScreen);
+ DrvScreenPtr pScreen);
extern _X_EXPORT Bool
-fbSetupScreen(ScreenPtr pScreen,
+fbSetupScreen(DrvScreenPtr pScreen,
pointer pbits, /* pointer to screen bitmap */
int xsize, /* in pixels */
int ysize,
@@ -1594,7 +1594,7 @@ fbSetupScreen(ScreenPtr pScreen,
int bpp); /* bits per pixel of frame buffer */
extern _X_EXPORT Bool
-wfbFinishScreenInit(ScreenPtr pScreen,
+wfbFinishScreenInit(DrvScreenPtr pScreen,
pointer pbits,
int xsize,
int ysize,
@@ -1606,7 +1606,7 @@ wfbFinishScreenInit(ScreenPtr pScreen,
FinishWrapProcPtr finishWrap);
extern _X_EXPORT Bool
-wfbScreenInit(ScreenPtr pScreen,
+wfbScreenInit(DrvScreenPtr pScreen,
pointer pbits,
int xsize,
int ysize,
@@ -1618,7 +1618,7 @@ wfbScreenInit(ScreenPtr pScreen,
FinishWrapProcPtr finishWrap);
extern _X_EXPORT Bool
-fbFinishScreenInit(ScreenPtr pScreen,
+fbFinishScreenInit(DrvScreenPtr pScreen,
pointer pbits,
int xsize,
int ysize,
@@ -1628,7 +1628,7 @@ fbFinishScreenInit(ScreenPtr pScreen,
int bpp);
extern _X_EXPORT Bool
-fbScreenInit(ScreenPtr pScreen,
+fbScreenInit(DrvScreenPtr pScreen,
pointer pbits,
int xsize,
int ysize,
@@ -1640,7 +1640,7 @@ fbScreenInit(ScreenPtr pScreen,
/*
* fbseg.c
*/
-typedef void FbBres (PixmapPtr pPixmap,
+typedef void FbBres (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int dashOffset,
int signdx,
@@ -1659,7 +1659,7 @@ extern _X_EXPORT FbBres fbBresSolid, fbBresDash, fbBresFill, fbBresFillDash;
*/
extern _X_EXPORT void
-fbSetSpans (PixmapPtr pPixmap,
+fbSetSpans (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
char *src,
DDXPointPtr ppt,
@@ -1668,11 +1668,11 @@ fbSetSpans (PixmapPtr pPixmap,
int fSorted);
extern _X_EXPORT FbBres *
-fbSelectBres (PixmapPtr pPixmap,
+fbSelectBres (DrvPixmapPtr pPixmap,
DrvGCPtr pGC);
extern _X_EXPORT void
-fbBres (PixmapPtr pPixmap,
+fbBres (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int dashOffset,
int signdx,
@@ -1686,7 +1686,7 @@ fbBres (PixmapPtr pPixmap,
int len);
extern _X_EXPORT void
-fbSegment (PixmapPtr pPixmap,
+fbSegment (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int xa,
int ya,
@@ -1879,10 +1879,10 @@ extern _X_EXPORT WriteMemoryProcPtr wfbWriteMemory;
*/
extern _X_EXPORT void
-fbPixmapWindowFixup(PixmapPtr *ppPixmap, int bpp);
+fbPixmapWindowFixup(DrvPixmapPtr *ppPixmap, int bpp);
extern _X_EXPORT void
-fbFillRegionSolid (PixmapPtr pPixmap,
+fbFillRegionSolid (DrvPixmapPtr pPixmap,
RegionPtr pRegion,
FbBits and,
FbBits xor);
diff --git a/drv/fb/fboverlay.h b/drv/fb/drvfboverlay.h
index b626a7702..b626a7702 100644
--- a/drv/fb/fboverlay.h
+++ b/drv/fb/drvfboverlay.h
diff --git a/drv/fb/fb24_32.c b/drv/fb/fb24_32.c
index 356749e64..bde49d922 100644
--- a/drv/fb/fb24_32.c
+++ b/drv/fb/fb24_32.c
@@ -27,7 +27,7 @@
#include <string.h>
-#include "fb.h"
+#include "drvfb.h"
/* X apps don't like 24bpp images, this code exposes 32bpp images */
@@ -266,7 +266,7 @@ fb24_32BltUp (CARD8 *srcLine,
* Spans functions; probably unused.
*/
void
-fb24_32GetSpans(PixmapPtr pDrawable,
+fb24_32GetSpans(DrvPixmapPtr pDrawable,
int wMax,
DDXPointPtr ppt,
int *pwidth,
@@ -309,7 +309,7 @@ fb24_32GetSpans(PixmapPtr pDrawable,
}
void
-fb24_32SetSpans (PixmapPtr pDrawable,
+fb24_32SetSpans (DrvPixmapPtr pDrawable,
DrvGCPtr pGC,
char *src,
DDXPointPtr ppt,
@@ -375,7 +375,7 @@ fb24_32SetSpans (PixmapPtr pDrawable,
* Clip and put 32bpp Z-format images to a 24bpp drawable
*/
void
-fb24_32PutZImage (PixmapPtr pDrawable,
+fb24_32PutZImage (DrvPixmapPtr pDrawable,
RegionPtr pClip,
int alu,
FbBits pm,
@@ -437,7 +437,7 @@ fb24_32PutZImage (PixmapPtr pDrawable,
}
void
-fb24_32GetImage (PixmapPtr pDrawable,
+fb24_32GetImage (DrvPixmapPtr pDrawable,
int x,
int y,
int w,
@@ -470,8 +470,8 @@ fb24_32GetImage (PixmapPtr pDrawable,
}
void
-fb24_32CopyMtoN (PixmapPtr pSrcDrawable,
- PixmapPtr pDstDrawable,
+fb24_32CopyMtoN (DrvPixmapPtr pSrcDrawable,
+ DrvPixmapPtr pDstDrawable,
DrvGCPtr pGC,
BoxPtr pbox,
int nbox,
@@ -528,11 +528,11 @@ fb24_32CopyMtoN (PixmapPtr pSrcDrawable,
fbFinishAccess (pDstDrawable);
}
-PixmapPtr
-fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel)
+DrvPixmapPtr
+fb24_32ReformatTile(DrvPixmapPtr pOldTile, int bitsPerPixel)
{
- ScreenPtr pScreen = pOldTile->pScreen;
- PixmapPtr pNewTile;
+ DrvScreenPtr pDrvScreen = pOldTile->pDrvScreen;
+ DrvPixmapPtr pNewTile;
FbBits *old, *new;
FbStride oldStride, newStride;
int oldBpp, newBpp;
@@ -540,7 +540,7 @@ fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel)
int oldXoff, oldYoff;
int newXoff, newYoff;
- pNewTile = pScreen->gpu.CreatePixmap(pScreen, pOldTile->width,
+ pNewTile = pDrvScreen->CreatePixmap(pDrvScreen, pOldTile->width,
pOldTile->height,
pOldTile->depth,
pOldTile->usage_hint, NULL);
@@ -593,7 +593,7 @@ fb24_32CreateScreenResources(ScreenPtr pScreen)
if((retval = miCreateScreenResources(pScreen))) {
/* fix the screen pixmap */
- PixmapPtr pPix = (PixmapPtr)pScreen->devPrivate;
+ DrvPixmapPtr pPix = (DrvPixmapPtr)pScreen->devPrivate;
pPix->bitsPerPixel = 24;
pPix->devKind = pitch;
}
@@ -602,7 +602,7 @@ fb24_32CreateScreenResources(ScreenPtr pScreen)
}
Bool
-fb24_32ModifyPixmapHeader (PixmapPtr pPixmap,
+fb24_32ModifyPixmapHeader (DrvPixmapPtr pPixmap,
int width,
int height,
int depth,
diff --git a/drv/fb/fballpriv.c b/drv/fb/fballpriv.c
index ab3ca5165..83e9193f4 100644
--- a/drv/fb/fballpriv.c
+++ b/drv/fb/fballpriv.c
@@ -24,7 +24,7 @@
#include <dix-config.h>
#endif
-#include "fb.h"
+#include "drvfb.h"
static DevPrivateKeyRec fbScreenPrivateKeyRec;
DevPrivateKey
@@ -35,14 +35,14 @@ DevPrivateKey
fbGetGCPrivateKey (void) { return &fbGCPrivateKeyRec; }
Bool
-fbAllocatePrivates(ScreenPtr pScreen, DevPrivateKey *pGCKey)
+fbAllocatePrivates(DrvScreenPtr pScreen, DevPrivateKey *pGCKey)
{
if (pGCKey)
*pGCKey = &fbGCPrivateKeyRec;
if (!dixRegisterPrivateKey(&fbGCPrivateKeyRec, PRIVATE_DRV_GC, sizeof(FbGCPrivRec)))
return FALSE;
- if (!dixRegisterPrivateKey(&fbScreenPrivateKeyRec, PRIVATE_SCREEN, sizeof (FbScreenPrivRec)))
+ if (!dixRegisterPrivateKey(&fbScreenPrivateKeyRec, PRIVATE_DRV_SCREEN, sizeof (FbScreenPrivRec)))
return FALSE;
return TRUE;
diff --git a/drv/fb/fbarc.c b/drv/fb/fbarc.c
index 9831953c7..1cca33660 100644
--- a/drv/fb/fbarc.c
+++ b/drv/fb/fbarc.c
@@ -24,7 +24,7 @@
#include <dix-config.h>
#endif
-#include "fb.h"
+#include "drvfb.h"
#include "drvzerarc.h"
#include <limits.h>
@@ -38,7 +38,7 @@ typedef void (*FbArc) (FbBits *dst,
FbBits xor);
void
-fbPolyArc (PixmapPtr pPixmap,
+fbPolyArc (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int narcs,
xArc *parcs)
diff --git a/drv/fb/fbbits.c b/drv/fb/fbbits.c
index 565b9c1b9..f0c0a2fa2 100644
--- a/drv/fb/fbbits.c
+++ b/drv/fb/fbbits.c
@@ -24,7 +24,7 @@
#include <dix-config.h>
#endif
-#include "fb.h"
+#include "drvfb.h"
#include "drvline.h"
#include "drvzerarc.h"
diff --git a/drv/fb/fbbits.h b/drv/fb/fbbits.h
index 249879dc7..2e0e5d322 100644
--- a/drv/fb/fbbits.h
+++ b/drv/fb/fbbits.h
@@ -68,7 +68,7 @@
#ifdef BRESSOLID
void
-BRESSOLID (PixmapPtr pPixmap,
+BRESSOLID (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int dashOffset,
int signdx,
@@ -124,7 +124,7 @@ BRESSOLID (PixmapPtr pPixmap,
#ifdef BRESDASH
void
-BRESDASH (PixmapPtr pPixmap,
+BRESDASH (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int dashOffset,
int signdx,
@@ -660,7 +660,7 @@ GLYPH (FbBits *dstBits,
#ifdef POLYLINE
void
-POLYLINE (PixmapPtr pPixmap,
+POLYLINE (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int mode,
int npt,
@@ -669,7 +669,7 @@ POLYLINE (PixmapPtr pPixmap,
INT32 *pts = (INT32 *) ptsOrig;
int xoff = 0;
int yoff = 0;
- unsigned int bias = drvGetZeroLineBias(pPixmap->pScreen);
+ unsigned int bias = drvGetZeroLineBias(pPixmap->pDrvScreen);
BoxPtr pBox = RegionExtents(fbGetCompositeClip (pGC));
FbBits *dst;
@@ -798,7 +798,7 @@ POLYLINE (PixmapPtr pPixmap,
#ifdef POLYSEGMENT
void
-POLYSEGMENT (PixmapPtr pPixmap,
+POLYSEGMENT (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int nseg,
xSegment *pseg)
@@ -806,7 +806,7 @@ POLYSEGMENT (PixmapPtr pPixmap,
INT32 *pts = (INT32 *) pseg;
int xoff = 0;
int yoff = 0;
- unsigned int bias = drvGetZeroLineBias(pPixmap->pScreen);
+ unsigned int bias = drvGetZeroLineBias(pPixmap->pDrvScreen);
BoxPtr pBox = RegionExtents(fbGetCompositeClip (pGC));
FbBits *dst;
diff --git a/drv/fb/fbblt.c b/drv/fb/fbblt.c
index a0402986c..2bd9bd055 100644
--- a/drv/fb/fbblt.c
+++ b/drv/fb/fbblt.c
@@ -25,7 +25,7 @@
#endif
#include <string.h>
-#include "fb.h"
+#include "drvfb.h"
#define InitializeShifts(sx,dx,ls,rs) { \
if (sx != dx) { \
diff --git a/drv/fb/fbbltone.c b/drv/fb/fbbltone.c
index 629b13a0e..b2934326b 100644
--- a/drv/fb/fbbltone.c
+++ b/drv/fb/fbbltone.c
@@ -24,7 +24,7 @@
#include <dix-config.h>
#endif
-#include "fb.h"
+#include "drvfb.h"
/*
* Example: srcX = 13 dstX = 8 (FB unit 32 dstBpp 8)
diff --git a/drv/fb/fbcopy.c b/drv/fb/fbcopy.c
index 4dbba78f5..53e7dd384 100644
--- a/drv/fb/fbcopy.c
+++ b/drv/fb/fbcopy.c
@@ -26,11 +26,11 @@
#include <stdlib.h>
-#include "fb.h"
+#include "drvfb.h"
void
-fbCopyNtoN (PixmapPtr pSrcPixmap,
- PixmapPtr pDstPixmap,
+fbCopyNtoN (DrvPixmapPtr pSrcPixmap,
+ DrvPixmapPtr pDstPixmap,
DrvGCPtr pGC,
BoxPtr pbox,
int nbox,
@@ -101,8 +101,8 @@ fbCopyNtoN (PixmapPtr pSrcPixmap,
}
void
-fbCopy1toN (PixmapPtr pSrcPixmap,
- PixmapPtr pDstPixmap,
+fbCopy1toN (DrvPixmapPtr pSrcPixmap,
+ DrvPixmapPtr pDstPixmap,
DrvGCPtr pGC,
BoxPtr pbox,
int nbox,
@@ -174,8 +174,8 @@ fbCopy1toN (PixmapPtr pSrcPixmap,
}
void
-fbCopyNto1 (PixmapPtr pSrcPixmap,
- PixmapPtr pDstPixmap,
+fbCopyNto1 (DrvPixmapPtr pSrcPixmap,
+ DrvPixmapPtr pDstPixmap,
DrvGCPtr pGC,
BoxPtr pbox,
int nbox,
@@ -290,8 +290,8 @@ fbCopyNto1 (PixmapPtr pSrcPixmap,
}
drvCopyProc
-fbGetCopyAreaFunction(PixmapPtr pSrc,
- PixmapPtr pDst)
+fbGetCopyAreaFunction(DrvPixmapPtr pSrc,
+ DrvPixmapPtr pDst)
{
if (pSrc->bitsPerPixel != pDst->bitsPerPixel)
return fb24_32CopyMtoN;
@@ -300,8 +300,8 @@ fbGetCopyAreaFunction(PixmapPtr pSrc,
}
drvCopyProc
-fbGetCopyPlaneFunction(PixmapPtr pSrc,
- PixmapPtr pDst, int bitplane)
+fbGetCopyPlaneFunction(DrvPixmapPtr pSrc,
+ DrvPixmapPtr pDst, int bitplane)
{
if (pSrc->bitsPerPixel > 1)
return fbCopyNto1;
diff --git a/drv/fb/fbfill.c b/drv/fb/fbfill.c
index e7931829f..1cc25bbc2 100644
--- a/drv/fb/fbfill.c
+++ b/drv/fb/fbfill.c
@@ -24,10 +24,10 @@
#include <dix-config.h>
#endif
-#include "fb.h"
+#include "drvfb.h"
void
-fbFill (PixmapPtr pPixmap,
+fbFill (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int x,
int y,
@@ -60,7 +60,7 @@ fbFill (PixmapPtr pPixmap,
break;
case FillStippled:
case FillOpaqueStippled: {
- PixmapPtr pStip = pGC->stipple;
+ DrvPixmapPtr pStip = pGC->stipple;
int stipWidth = pStip->width;
int stipHeight = pStip->height;
@@ -134,7 +134,7 @@ fbFill (PixmapPtr pPixmap,
break;
}
case FillTiled: {
- PixmapPtr pTile = pGC->tile.pixmap;
+ DrvPixmapPtr pTile = pGC->tile.pixmap;
FbBits *tile;
FbStride tileStride;
int tileBpp;
@@ -167,7 +167,7 @@ fbFill (PixmapPtr pPixmap,
}
void
-fbSolidBoxClipped (PixmapPtr pPixmap,
+fbSolidBoxClipped (DrvPixmapPtr pPixmap,
RegionPtr pClip,
int x1,
int y1,
diff --git a/drv/fb/fbfillrect.c b/drv/fb/fbfillrect.c
index 8b5be6852..8dab837db 100644
--- a/drv/fb/fbfillrect.c
+++ b/drv/fb/fbfillrect.c
@@ -24,10 +24,10 @@
#include <dix-config.h>
#endif
-#include "fb.h"
+#include "drvfb.h"
void
-fbPolyFillRect(PixmapPtr pPixmap,
+fbPolyFillRect(DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int nrect,
xRectangle *prect)
diff --git a/drv/fb/fbfillsp.c b/drv/fb/fbfillsp.c
index b0657d81d..75eccafc7 100644
--- a/drv/fb/fbfillsp.c
+++ b/drv/fb/fbfillsp.c
@@ -24,10 +24,10 @@
#include <dix-config.h>
#endif
-#include "fb.h"
+#include "drvfb.h"
void
-fbFillSpans (PixmapPtr pPixmap,
+fbFillSpans (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int n,
DDXPointPtr ppt,
diff --git a/drv/fb/fbgc.c b/drv/fb/fbgc.c
index 8d1aa0aeb..142541f35 100644
--- a/drv/fb/fbgc.c
+++ b/drv/fb/fbgc.c
@@ -26,11 +26,11 @@
#include <stdlib.h>
-#include "fb.h"
-#include "imped.h"
+#include "drvfb.h"
+//#include "imped.h"
-const GCOps fbGCOps = {
+const DrvGCOps fbGCOps = {
fbFillSpans,
fbSetSpans,
fbPutImage,
@@ -57,7 +57,7 @@ const GCOps fbGCOps = {
Bool
fbCreateGC(DrvGCPtr pGC)
{
- pGC->ops = (GCOps *) &fbGCOps;
+ pGC->ops = (DrvGCOps *) &fbGCOps;
fbGetGCPrivate(pGC)->bpp = BitsPerPixel (pGC->depth);
return TRUE;
}
@@ -66,7 +66,7 @@ fbCreateGC(DrvGCPtr pGC)
* Pad pixmap to FB_UNIT bits wide
*/
void
-fbPadPixmap (PixmapPtr pPixmap)
+fbPadPixmap (DrvPixmapPtr pPixmap)
{
int width;
FbBits *bits;
@@ -144,7 +144,7 @@ fbLineRepeat (FbBits *bits, int len, int width)
* each scanline to represent the entire stipple
*/
static Bool
-fbCanEvenStipple (PixmapPtr pStipple, int bpp)
+fbCanEvenStipple (DrvPixmapPtr pStipple, int bpp)
{
int len = FB_UNIT / bpp;
FbBits *bits;
@@ -175,7 +175,7 @@ fbCanEvenStipple (PixmapPtr pStipple, int bpp)
}
void
-fbValidateGC(DrvGCPtr pGC, unsigned long changes, PixmapPtr pPixmap)
+fbValidateGC(DrvGCPtr pGC, unsigned long changes, DrvPixmapPtr pPixmap)
{
FbGCPrivPtr pPriv = fbGetGCPrivate(pGC);
FbBits mask;
@@ -187,13 +187,13 @@ fbValidateGC(DrvGCPtr pGC, unsigned long changes, PixmapPtr pPixmap)
}
if ((changes & GCTile) && fbGetRotatedPixmap(pGC))
{
- (*pGC->pScreen->gpu.DestroyPixmap) (fbGetRotatedPixmap(pGC));
+ (*pGC->pDrvScreen->DestroyPixmap) (fbGetRotatedPixmap(pGC));
fbGetRotatedPixmap(pGC) = 0;
}
if (pGC->fillStyle == FillTiled)
{
- PixmapPtr pOldTile, pNewTile;
+ DrvPixmapPtr pOldTile, pNewTile;
pOldTile = pGC->tile.pixmap;
if (pOldTile->bitsPerPixel != pPixmap->bitsPerPixel)
@@ -202,7 +202,7 @@ fbValidateGC(DrvGCPtr pGC, unsigned long changes, PixmapPtr pPixmap)
if (!pNewTile || pNewTile ->bitsPerPixel != pPixmap->bitsPerPixel)
{
if (pNewTile)
- (*pGC->pScreen->gpu.DestroyPixmap) (pNewTile);
+ (*pGC->pDrvScreen->DestroyPixmap) (pNewTile);
pNewTile = fb24_32ReformatTile (pOldTile, pPixmap->bitsPerPixel);
}
if (pNewTile)
diff --git a/drv/fb/fbgetsp.c b/drv/fb/fbgetsp.c
index 24bfe330f..ddb25fd09 100644
--- a/drv/fb/fbgetsp.c
+++ b/drv/fb/fbgetsp.c
@@ -24,10 +24,10 @@
#include <dix-config.h>
#endif
-#include "fb.h"
+#include "drvfb.h"
void
-fbGetSpans(PixmapPtr pPixmap,
+fbGetSpans(DrvPixmapPtr pPixmap,
int wMax,
DDXPointPtr ppt,
int *pwidth,
diff --git a/drv/fb/fbglyph.c b/drv/fb/fbglyph.c
index 81a08ba82..6a751002d 100644
--- a/drv/fb/fbglyph.c
+++ b/drv/fb/fbglyph.c
@@ -25,7 +25,7 @@
#include <dix-config.h>
#endif
-#include "fb.h"
+#include "drvfb.h"
#include <X11/fonts/fontstruct.h>
#include "dixfontstr.h"
@@ -248,7 +248,7 @@ fbGlyph24 (FbBits *dstBits,
}
void
-fbPolyGlyphBlt (PixmapPtr pPixmap,
+fbPolyGlyphBlt (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int x,
int y,
@@ -330,7 +330,7 @@ fbPolyGlyphBlt (PixmapPtr pPixmap,
void
-fbImageGlyphBlt (PixmapPtr pPixmap,
+fbImageGlyphBlt (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int x,
int y,
diff --git a/drv/fb/fbimage.c b/drv/fb/fbimage.c
index 8407b6feb..a002dab0a 100644
--- a/drv/fb/fbimage.c
+++ b/drv/fb/fbimage.c
@@ -26,10 +26,10 @@
#include <string.h>
-#include "fb.h"
+#include "drvfb.h"
void
-fbPutImage (PixmapPtr pPixmap,
+fbPutImage (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int depth,
int x,
@@ -108,7 +108,7 @@ fbPutImage (PixmapPtr pPixmap,
}
void
-fbPutZImage (PixmapPtr pPixmap,
+fbPutZImage (DrvPixmapPtr pPixmap,
RegionPtr pClip,
int alu,
FbBits pm,
@@ -168,7 +168,7 @@ fbPutZImage (PixmapPtr pPixmap,
}
void
-fbPutXYImage (PixmapPtr pPixmap,
+fbPutXYImage (DrvPixmapPtr pPixmap,
RegionPtr pClip,
FbBits fg,
FbBits bg,
@@ -277,7 +277,7 @@ fbPutXYImage (PixmapPtr pPixmap,
}
void
-fbGetImage (PixmapPtr pPixmap,
+fbGetImage (DrvPixmapPtr pPixmap,
int x,
int y,
int w,
diff --git a/drv/fb/fbline.c b/drv/fb/fbline.c
index 79ca8f2aa..1d0abcd99 100644
--- a/drv/fb/fbline.c
+++ b/drv/fb/fbline.c
@@ -24,10 +24,10 @@
#include <dix-config.h>
#endif
-#include "fb.h"
+#include "drvfb.h"
void
-fbZeroLine (PixmapPtr pPixmap,
+fbZeroLine (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int mode,
int npt,
@@ -62,7 +62,7 @@ fbZeroLine (PixmapPtr pPixmap,
}
void
-fbZeroSegment (PixmapPtr pPixmap,
+fbZeroSegment (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int nseg,
xSegment *pSegs)
@@ -103,13 +103,13 @@ fbFixCoordModePrevious (int npt,
}
void
-fbPolyLine (PixmapPtr pPixmap,
+fbPolyLine (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int mode,
int npt,
DDXPointPtr ppt)
{
- void (*line) (PixmapPtr, DrvGCPtr, int mode, int npt, DDXPointPtr ppt);
+ void (*line) (DrvPixmapPtr, DrvGCPtr, int mode, int npt, DDXPointPtr ppt);
if (pGC->lineWidth == 0)
{
@@ -137,12 +137,12 @@ fbPolyLine (PixmapPtr pPixmap,
}
void
-fbPolySegment (PixmapPtr pPixmap,
+fbPolySegment (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int nseg,
xSegment *pseg)
{
- void (*seg) (PixmapPtr pPixmap, DrvGCPtr pGC, int nseg, xSegment *pseg);
+ void (*seg) (DrvPixmapPtr pPixmap, DrvGCPtr pGC, int nseg, xSegment *pseg);
if (pGC->lineWidth == 0)
{
diff --git a/drv/fb/fboverlay.c b/drv/fb/fboverlay.c
index 93edffecb..b705648fc 100644
--- a/drv/fb/fboverlay.c
+++ b/drv/fb/fboverlay.c
@@ -29,8 +29,8 @@
#include <stdlib.h>
-#include "fb.h"
-#include "fboverlay.h"
+#include "drvfb.h"
+#include "drvfboverlay.h"
#include "shmint.h"
static DevPrivateKeyRec fbOverlayScreenPrivateKeyRec;
@@ -50,7 +50,7 @@ fbOverlayCreateWindow(WindowPtr pWin)
{
FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pWin->drawable.pScreen);
int i;
- PixmapPtr pPixmap;
+ DrvPixmapPtr pPixmap;
if (pWin->drawable.class != InputOutput)
return TRUE;
@@ -116,7 +116,7 @@ fbOverlayCreateScreenResources(ScreenPtr pScreen)
{
int i;
FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pScreen);
- PixmapPtr pPixmap;
+ DrvPixmapPtr pPixmap;
pointer pbits;
int width;
int depth;
@@ -216,7 +216,7 @@ fbOverlayCopyWindow(WindowPtr pWin,
int dx, dy;
int i;
RegionRec layerRgn[FB_OVERLAY_MAX];
- PixmapPtr pPixmap;
+ DrvPixmapPtr pPixmap;
dx = ptOldOrg.x - pWin->drawable.x;
dy = ptOldOrg.y - pWin->drawable.y;
@@ -305,7 +305,7 @@ fb24_32OverlayCreateScreenResources(ScreenPtr pScreen)
for (i = 0; i < pScrPriv->nlayers; i++)
{
/* fix the screen pixmap */
- PixmapPtr pPix = (PixmapPtr) pScrPriv->layer[i].u.run.pixmap;
+ DrvPixmapPtr pPix = (DrvPixmapPtr) pScrPriv->layer[i].u.run.pixmap;
if (pPix->bitsPerPixel == 32) {
pPix->bitsPerPixel = 24;
pitch = BitmapBytePad(pPix->width * 24);
diff --git a/drv/fb/fbpict.c b/drv/fb/fbpict.c
index d548cff58..79e65fdc0 100644
--- a/drv/fb/fbpict.c
+++ b/drv/fb/fbpict.c
@@ -29,12 +29,12 @@
#include <string.h>
-#include "fb.h"
+#include "drvfb.h"
#include "drv_picturestr.h"
#include "mipict.h"
-#include "fbpict.h"
-#include "impedpict.h"
+#include "drv_fbpict.h"
+//#include "impedpict.h"
void
fbComposite (CARD8 op,
@@ -347,21 +347,20 @@ free_pixman_pict (DrvPicturePtr pict, pixman_image_t *image)
}
Bool
-fbPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats)
+fbPictureInit (DrvScreenPtr pScreen, PictFormatPtr formats, int nformats)
{
+ DrvPictureScreenPtr ps;
- PictureScreenPtr ps;
-
- if (!impedPictureInit (pScreen, formats, nformats))
- return FALSE;
+ // if (!impedPictureInit (pScreen, formats, nformats))
+ // return FALSE;
ps = GetPictureScreen(pScreen);
- ps->gpu.Composite = fbComposite;
- ps->gpu.RasterizeTrapezoid = fbRasterizeTrapezoid;
- ps->gpu.Trapezoids = fbTrapezoids;
- ps->gpu.AddTraps = fbAddTraps;
- ps->gpu.AddTriangles = fbAddTriangles;
- ps->gpu.Triangles = fbTriangles;
- ps->gpu.Glyphs = DrvGlyphs;
+ ps->Composite = fbComposite;
+ ps->RasterizeTrapezoid = fbRasterizeTrapezoid;
+ ps->Trapezoids = fbTrapezoids;
+ ps->AddTraps = fbAddTraps;
+ ps->AddTriangles = fbAddTriangles;
+ ps->Triangles = fbTriangles;
+ ps->Glyphs = DrvGlyphs;
return TRUE;
}
diff --git a/drv/fb/fbpixmap.c b/drv/fb/fbpixmap.c
index bba18553c..7d01bc826 100644
--- a/drv/fb/fbpixmap.c
+++ b/drv/fb/fbpixmap.c
@@ -26,13 +26,13 @@
#include <stdlib.h>
-#include "fb.h"
+#include "drvfb.h"
-PixmapPtr
-fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp,
- unsigned usage_hint, ProtoPixmapPtr parent)
+DrvPixmapPtr
+fbCreatePixmapBpp (DrvScreenPtr pDrvScreen, int width, int height, int depth, int bpp,
+ unsigned usage_hint, PixmapPtr parent)
{
- PixmapPtr pPixmap;
+ DrvPixmapPtr pPixmap;
size_t datasize;
size_t paddedWidth;
int adjust;
@@ -40,9 +40,9 @@ fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp,
paddedWidth = ((width * bpp + FB_MASK) >> FB_SHIFT) * sizeof (FbBits);
if (paddedWidth / 4 > 32767 || height > 32767)
- return NullPixmap;
+ return NullDrvPixmap;
datasize = height * paddedWidth;
- base = pScreen->totalPixmapSize;
+ base = pDrvScreen->pScreen->totalPixmapSize;
adjust = 0;
if (base & 7)
adjust = 8 - (base & 7);
@@ -50,12 +50,12 @@ fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp,
#ifdef FB_DEBUG
datasize += 2 * paddedWidth;
#endif
- pPixmap = AllocatePixmap(pScreen, datasize);
+ pPixmap = DrvAllocatePixmap(pDrvScreen, datasize);
if (!pPixmap)
- return NullPixmap;
+ return NullDrvPixmap;
pPixmap->type = DRAWABLE_PIXMAP;
pPixmap->class = 0;
- pPixmap->pScreen = pScreen;
+ pPixmap->pDrvScreen = pDrvScreen;
pPixmap->depth = depth;
pPixmap->bitsPerPixel = bpp;
// pPixmap->id = 0;
@@ -78,23 +78,23 @@ fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp,
return pPixmap;
}
-PixmapPtr
-fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth,
- unsigned usage_hint, ProtoPixmapPtr parent)
+DrvPixmapPtr
+fbCreatePixmap (DrvScreenPtr pDrvScreen, int width, int height, int depth,
+ unsigned usage_hint, PixmapPtr parent)
{
int bpp;
bpp = BitsPerPixel (depth);
if (bpp == 32 && depth <= 24)
- bpp = fbGetScreenPrivate(pScreen)->pix32bpp;
- return fbCreatePixmapBpp (pScreen, width, height, depth, bpp, usage_hint, parent);
+ bpp = fbGetScreenPrivate(pDrvScreen)->pix32bpp;
+ return fbCreatePixmapBpp (pDrvScreen, width, height, depth, bpp, usage_hint, parent);
}
Bool
-fbDestroyPixmap (PixmapPtr pPixmap)
+fbDestroyPixmap (DrvPixmapPtr pPixmap)
{
if(--pPixmap->refcnt)
return TRUE;
- FreePixmap(pPixmap);
+ DrvFreePixmap(pPixmap);
return TRUE;
}
@@ -131,7 +131,7 @@ if (((rx1) < (rx2)) && ((ry1) < (ry2)) && \
* at the same X coordinates.
*/
RegionPtr
-fbPixmapToRegion(PixmapPtr pPix)
+fbPixmapToRegion(DrvPixmapPtr pPix)
{
register RegionPtr pReg;
FbBits *pw, w;
diff --git a/drv/fb/fbpoint.c b/drv/fb/fbpoint.c
index 4c7183175..32a9f2f76 100644
--- a/drv/fb/fbpoint.c
+++ b/drv/fb/fbpoint.c
@@ -24,7 +24,7 @@
#include <dix-config.h>
#endif
-#include "fb.h"
+#include "drvfb.h"
typedef void (*FbDots) (FbBits *dst,
FbStride dstStride,
@@ -106,7 +106,7 @@ fbDots (FbBits *dstOrig,
}
void
-fbPolyPoint (PixmapPtr pPixmap,
+fbPolyPoint (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int mode,
int nptInit,
diff --git a/drv/fb/fbpush.c b/drv/fb/fbpush.c
index 8d17d1054..bc57013f9 100644
--- a/drv/fb/fbpush.c
+++ b/drv/fb/fbpush.c
@@ -24,10 +24,10 @@
#include <dix-config.h>
#endif
-#include "fb.h"
+#include "drvfb.h"
void
-fbPushPattern (PixmapPtr pPixmap,
+fbPushPattern (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
FbStip *src,
@@ -101,7 +101,7 @@ fbPushPattern (PixmapPtr pPixmap,
}
void
-fbPushFill (PixmapPtr pPixmap,
+fbPushFill (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
FbStip *src,
@@ -173,7 +173,7 @@ fbPushFill (PixmapPtr pPixmap,
}
void
-fbPushImage (PixmapPtr pPixmap,
+fbPushImage (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
FbStip *src,
@@ -225,8 +225,8 @@ fbPushImage (PixmapPtr pPixmap,
void
fbPushPixels (DrvGCPtr pGC,
- PixmapPtr pBitmap,
- PixmapPtr pPixmap,
+ DrvPixmapPtr pBitmap,
+ DrvPixmapPtr pPixmap,
int dx,
int dy,
int xOrg,
diff --git a/drv/fb/fbscreen.c b/drv/fb/fbscreen.c
index 5b5b93a5a..030b3b522 100644
--- a/drv/fb/fbscreen.c
+++ b/drv/fb/fbscreen.c
@@ -24,36 +24,36 @@
#include <dix-config.h>
#endif
-#include "fb.h"
-#include "imped.h"
+#include "drvfb.h"
+//#include "imped.h"
Bool
-fbCloseScreen (int index, ScreenPtr pScreen)
+fbCloseScreen (int index, DrvScreenPtr pScreen)
{
int d;
- DepthPtr depths = pScreen->allowedDepths;
+ // DepthPtr depths = pScreen->allowedDepths;
- for (d = 0; d < pScreen->numDepths; d++)
- free(depths[d].vids);
- free(depths);
- free(pScreen->visuals);
- free(pScreen->devPrivate);
+ // for (d = 0; d < pScreen->numDepths; d++)
+ // free(depths[d].vids);
+ // free(depths);
+ // free(pScreen->visuals);
+ // free(pScreen->devPrivate);
return TRUE;
}
void
fbQueryBestSize (int class,
unsigned short *width, unsigned short *height,
- ScreenPtr pScreen)
+ DrvScreenPtr pScreen)
{
unsigned short w;
switch (class) {
case CursorShape:
- if (*width > pScreen->width)
- *width = pScreen->width;
- if (*height > pScreen->height)
- *height = pScreen->height;
+ if (*width > pScreen->pScreen->width)
+ *width = pScreen->pScreen->width;
+ if (*height > pScreen->pScreen->height)
+ *height = pScreen->pScreen->height;
break;
case TileShape:
case StippleShape:
@@ -68,7 +68,7 @@ fbQueryBestSize (int class,
}
Bool
-fbSetupScreen(ScreenPtr pScreen,
+fbSetupScreen(DrvScreenPtr pScreen,
pointer pbits, /* pointer to screen bitmap */
int xsize, /* in pixels */
int ysize,
@@ -79,26 +79,26 @@ fbSetupScreen(ScreenPtr pScreen,
{
if (!fbAllocatePrivates(pScreen, NULL))
return FALSE;
- pScreen->defColormap = FakeClientID(0);
+ // pScreen->defColormap = FakeClientID(0);
/* let CreateDefColormap do whatever it wants for pixels */
- pScreen->blackPixel = pScreen->whitePixel = (Pixel) 0;
+ // pScreen->blackPixel = pScreen->whitePixel = (Pixel) 0;
/* SaveScreen */
- pScreen->gpu.PixmapToRegion = fbPixmapToRegion;
+ pScreen->PixmapToRegion = fbPixmapToRegion;
- pScreen->gpu.CreateGC = fbCreateGC;
+ pScreen->CreateGC = fbCreateGC;
- pScreen->gpu.QueryBestSize = fbQueryBestSize;
+ pScreen->QueryBestSize = fbQueryBestSize;
- pScreen->gpu.GetCopyAreaFunction = fbGetCopyAreaFunction;
- pScreen->gpu.GetCopyPlaneFunction = fbGetCopyPlaneFunction;
+ pScreen->GetCopyAreaFunction = fbGetCopyAreaFunction;
+ pScreen->GetCopyPlaneFunction = fbGetCopyPlaneFunction;
- pScreen->gpu.PixmapWindowFixup = fbPixmapWindowFixup;
- pScreen->gpu.GetImage = fbGetImage;
- pScreen->gpu.GetSpans = fbGetSpans;
- pScreen->gpu.CreatePixmap = fbCreatePixmap;
- pScreen->gpu.DestroyPixmap = fbDestroyPixmap;
- pScreen->gpu.ModifyPixmapHeader = drvModifyPixmapHeader;
+ pScreen->PixmapWindowFixup = fbPixmapWindowFixup;
+ pScreen->GetImage = fbGetImage;
+ pScreen->GetSpans = fbGetSpans;
+ pScreen->CreatePixmap = fbCreatePixmap;
+ pScreen->DestroyPixmap = fbDestroyPixmap;
+ pScreen->ModifyPixmapHeader = drvModifyPixmapHeader;
if (!impedScreenInit(pScreen))
return FALSE;
@@ -107,7 +107,7 @@ fbSetupScreen(ScreenPtr pScreen,
#ifdef FB_ACCESS_WRAPPER
Bool
-wfbFinishScreenInit(ScreenPtr pScreen,
+wfbFinishScreenInit(DrvScreenPtr pScreen,
pointer pbits,
int xsize,
int ysize,
@@ -119,7 +119,7 @@ wfbFinishScreenInit(ScreenPtr pScreen,
FinishWrapProcPtr finishWrap)
#else
Bool
-fbFinishScreenInit(ScreenPtr pScreen,
+fbFinishScreenInit(DrvScreenPtr pScreen,
pointer pbits,
int xsize,
int ysize,
@@ -200,11 +200,11 @@ fbFinishScreenInit(ScreenPtr pScreen,
defaultVisual, nvisuals, visuals))
return FALSE;
/* overwrite miCloseScreen with our own */
- pScreen->gpu.CloseScreen = fbCloseScreen;
+ pScreen->CloseScreen = fbCloseScreen;
if (bpp == 24 && imagebpp == 32)
{
- pScreen->gpu.ModifyPixmapHeader = fb24_32ModifyPixmapHeader;
- pScreen->CreateScreenResources = fb24_32CreateScreenResources;
+ pScreen->ModifyPixmapHeader = fb24_32ModifyPixmapHeader;
+ // pScreen->CreateScreenResources = fb24_32CreateScreenResources;
}
return TRUE;
}
@@ -212,7 +212,7 @@ fbFinishScreenInit(ScreenPtr pScreen,
/* dts * (inch/dot) * (25.4 mm / inch) = mm */
#ifdef FB_ACCESS_WRAPPER
Bool
-wfbScreenInit(ScreenPtr pScreen,
+wfbScreenInit(DrvScreenPtr pScreen,
pointer pbits,
int xsize,
int ysize,
@@ -232,7 +232,7 @@ wfbScreenInit(ScreenPtr pScreen,
}
#else
Bool
-fbScreenInit(ScreenPtr pScreen,
+fbScreenInit(DrvScreenPtr pScreen,
pointer pbits,
int xsize,
int ysize,
diff --git a/drv/fb/fbseg.c b/drv/fb/fbseg.c
index b82607895..4c65af5e9 100644
--- a/drv/fb/fbseg.c
+++ b/drv/fb/fbseg.c
@@ -26,7 +26,7 @@
#include <stdlib.h>
-#include "fb.h"
+#include "drvfb.h"
#include "drvline.h"
#define fbBresShiftMask(mask,dir,bpp) ((bpp == FB_STIP_UNIT) ? 0 : \
@@ -34,7 +34,7 @@
FbStipRight(mask,bpp)))
void
-fbBresSolid (PixmapPtr pPixmap,
+fbBresSolid (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int dashOffset,
int signdx,
@@ -118,7 +118,7 @@ fbBresSolid (PixmapPtr pPixmap,
}
void
-fbBresDash (PixmapPtr pPixmap,
+fbBresDash (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int dashOffset,
int signdx,
@@ -204,7 +204,7 @@ fbBresDash (PixmapPtr pPixmap,
}
void
-fbBresFill (PixmapPtr pPixmap,
+fbBresFill (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int dashOffset,
int signdx,
@@ -244,7 +244,7 @@ fbBresFill (PixmapPtr pPixmap,
}
static void
-fbSetFg (PixmapPtr pPixmap,
+fbSetFg (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
Pixel fg)
{
@@ -258,7 +258,7 @@ fbSetFg (PixmapPtr pPixmap,
}
void
-fbBresFillDash (PixmapPtr pPixmap,
+fbBresFillDash (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int dashOffset,
int signdx,
@@ -331,7 +331,7 @@ fbBresFillDash (PixmapPtr pPixmap,
}
static void
-fbBresSolid24RRop (PixmapPtr pPixmap,
+fbBresSolid24RRop (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int dashOffset,
int signdx,
@@ -407,7 +407,7 @@ fbBresSolid24RRop (PixmapPtr pPixmap,
}
static void
-fbBresDash24RRop (PixmapPtr pPixmap,
+fbBresDash24RRop (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int dashOffset,
int signdx,
@@ -514,7 +514,7 @@ fbBresDash24RRop (PixmapPtr pPixmap,
*/
FbBres *
-fbSelectBres (PixmapPtr pPixmap,
+fbSelectBres (DrvPixmapPtr pPixmap,
DrvGCPtr pGC)
{
FbGCPrivPtr pPriv = fbGetGCPrivate(pGC);
@@ -564,7 +564,7 @@ fbSelectBres (PixmapPtr pPixmap,
}
void
-fbBres (PixmapPtr pPixmap,
+fbBres (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int dashOffset,
int signdx,
@@ -583,7 +583,7 @@ fbBres (PixmapPtr pPixmap,
}
void
-fbSegment (PixmapPtr pPixmap,
+fbSegment (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
int x1,
int y1,
@@ -606,7 +606,7 @@ fbSegment (PixmapPtr pPixmap,
int octant;
int dashoff;
int doff;
- unsigned int bias = drvGetZeroLineBias(pPixmap->pScreen);
+ unsigned int bias = drvGetZeroLineBias(pPixmap->pDrvScreen);
unsigned int oc1; /* outcode of point 1 */
unsigned int oc2; /* outcode of point 2 */
diff --git a/drv/fb/fbsetsp.c b/drv/fb/fbsetsp.c
index 1d92256ce..1fa9ed588 100644
--- a/drv/fb/fbsetsp.c
+++ b/drv/fb/fbsetsp.c
@@ -24,10 +24,10 @@
#include <dix-config.h>
#endif
-#include "fb.h"
+#include "drvfb.h"
void
-fbSetSpans (PixmapPtr pPixmap,
+fbSetSpans (DrvPixmapPtr pPixmap,
DrvGCPtr pGC,
char *src,
DDXPointPtr ppt,
diff --git a/drv/fb/fbsolid.c b/drv/fb/fbsolid.c
index 414378531..83120ac44 100644
--- a/drv/fb/fbsolid.c
+++ b/drv/fb/fbsolid.c
@@ -26,7 +26,7 @@
#include <dix-config.h>
#endif
-#include "fb.h"
+#include "drvfb.h"
void
fbSolid (FbBits *dst,
diff --git a/drv/fb/fbstipple.c b/drv/fb/fbstipple.c
index dc1fd468f..50c1fe9af 100644
--- a/drv/fb/fbstipple.c
+++ b/drv/fb/fbstipple.c
@@ -24,7 +24,7 @@
#include <dix-config.h>
#endif
-#include "fb.h"
+#include "drvfb.h"
/*
* This is a slight abuse of the preprocessor to generate repetitive
diff --git a/drv/fb/fbtile.c b/drv/fb/fbtile.c
index 05a27a17b..5d6d56917 100644
--- a/drv/fb/fbtile.c
+++ b/drv/fb/fbtile.c
@@ -24,7 +24,7 @@
#include <dix-config.h>
#endif
-#include "fb.h"
+#include "drvfb.h"
/*
* Accelerated tile fill -- tile width is a power of two not greater
diff --git a/drv/fb/fbtrap.c b/drv/fb/fbtrap.c
index 5d6c5fc26..f304465e8 100644
--- a/drv/fb/fbtrap.c
+++ b/drv/fb/fbtrap.c
@@ -24,11 +24,11 @@
#include <dix-config.h>
#endif
-#include "fb.h"
+#include "drvfb.h"
#include "drv_picturestr.h"
#include "mipict.h"
-#include "fbpict.h"
+#include "drv_fbpict.h"
void
fbAddTraps (DrvPicturePtr pPicture,
diff --git a/drv/fb/fbutil.c b/drv/fb/fbutil.c
index 5e232971e..491957998 100644
--- a/drv/fb/fbutil.c
+++ b/drv/fb/fbutil.c
@@ -24,7 +24,7 @@
#include <dix-config.h>
#endif
-#include "fb.h"
+#include "drvfb.h"
FbBits
fbReplicatePixel (Pixel p, int bpp)
diff --git a/drv/fb/fbwindow.c b/drv/fb/fbwindow.c
index 3be506c27..cd5e0a7e0 100644
--- a/drv/fb/fbwindow.c
+++ b/drv/fb/fbwindow.c
@@ -26,7 +26,7 @@
#include <stdlib.h>
-#include "fb.h"
+#include "drvfb.h"
#if 0
Bool
@@ -39,16 +39,16 @@ fbCreateWindow(WindowPtr pWin)
#endif
void
-fbPixmapWindowFixup(PixmapPtr *ppPixmap, int bpp)
+fbPixmapWindowFixup(DrvPixmapPtr *ppPixmap, int bpp)
{
- PixmapPtr pPixmap = *ppPixmap;
+ DrvPixmapPtr pPixmap = *ppPixmap;
if (pPixmap->bitsPerPixel != bpp)
{
pPixmap = fb24_32ReformatTile (pPixmap, bpp);
if (!pPixmap)
return;
- (*pPixmap->pScreen->gpu.DestroyPixmap) (*ppPixmap);
+ (*pPixmap->pDrvScreen->DestroyPixmap) (*ppPixmap);
*ppPixmap = pPixmap;
}
if (FbEvenTile (pPixmap->width *
@@ -57,7 +57,7 @@ fbPixmapWindowFixup(PixmapPtr *ppPixmap, int bpp)
}
void
-fbFillRegionSolid (PixmapPtr pPixmap,
+fbFillRegionSolid (DrvPixmapPtr pPixmap,
RegionPtr pRegion,
FbBits and,
FbBits xor)
diff --git a/include/privates.h b/include/privates.h
index 7f072dbd3..1077e1bda 100644
--- a/include/privates.h
+++ b/include/privates.h
@@ -31,6 +31,7 @@ typedef enum {
*/
/* These can have objects created before all of the keys are registered */
PRIVATE_SCREEN,
+ PRIVATE_DRV_SCREEN,
PRIVATE_EXTENSION,
PRIVATE_COLORMAP,