diff options
Diffstat (limited to 'xorg-server/exa/exa.c')
-rw-r--r-- | xorg-server/exa/exa.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/xorg-server/exa/exa.c b/xorg-server/exa/exa.c index a7bb5a29f..823c9a23f 100644 --- a/xorg-server/exa/exa.c +++ b/xorg-server/exa/exa.c @@ -37,12 +37,9 @@ #include "exa_priv.h"
#include "exa.h"
-static int exaScreenPrivateKeyIndex;
-DevPrivateKey exaScreenPrivateKey = &exaScreenPrivateKeyIndex;
-static int exaPixmapPrivateKeyIndex;
-DevPrivateKey exaPixmapPrivateKey = &exaPixmapPrivateKeyIndex;
-static int exaGCPrivateKeyIndex;
-DevPrivateKey exaGCPrivateKey = &exaGCPrivateKeyIndex;
+DevPrivateKeyRec exaScreenPrivateKeyRec;
+DevPrivateKeyRec exaPixmapPrivateKeyRec;
+DevPrivateKeyRec exaGCPrivateKeyRec;
#ifdef MITSHM
static ShmFuncs exaShmFuncs = { NULL, NULL };
@@ -161,10 +158,10 @@ exaPixmapDirty (PixmapPtr pPix, int x1, int y1, int x2, int y2) if (box.x1 >= box.x2 || box.y1 >= box.y2)
return;
- REGION_INIT(pScreen, ®ion, &box, 1);
+ RegionInit(®ion, &box, 1);
DamageRegionAppend(&pPix->drawable, ®ion);
DamageRegionProcessPending(&pPix->drawable);
- REGION_UNINIT(pScreen, ®ion);
+ RegionUninit(®ion);
}
static int
@@ -658,7 +655,7 @@ exaBitmapToRegion(PixmapPtr pPix) exaPrepareAccess(&pPix->drawable, EXA_PREPARE_SRC);
swap(pExaScr, pScreen, BitmapToRegion);
- ret = pScreen->BitmapToRegion(pPix);
+ ret = (*pScreen->BitmapToRegion)(pPix);
swap(pExaScr, pScreen, BitmapToRegion);
exaFinishAccess(&pPix->drawable, EXA_PREPARE_SRC);
@@ -889,7 +886,13 @@ exaDriverInit (ScreenPtr pScreen, ps = GetPictureScreenIfSet(pScreen);
- pExaScr = calloc(sizeof (ExaScreenPrivRec), 1);
+ if (!dixRegisterPrivateKey(&exaScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) {
+ LogMessage(X_WARNING, "EXA(%d): Failed to register screen private\n",
+ pScreen->myNum);
+ return FALSE;
+ }
+
+ pExaScr = calloc (sizeof (ExaScreenPrivRec), 1);
if (!pExaScr) {
LogMessage(X_WARNING, "EXA(%d): Failed to allocate screen private\n",
pScreen->myNum);
@@ -904,7 +907,7 @@ exaDriverInit (ScreenPtr pScreen, exaDDXDriverInit(pScreen);
- if (!dixRequestPrivate(exaGCPrivateKey, sizeof(ExaGCPrivRec))) {
+ if (!dixRegisterPrivateKey(&exaGCPrivateKeyRec, PRIVATE_GC, sizeof(ExaGCPrivRec))) {
LogMessage(X_WARNING,
"EXA(%d): Failed to allocate GC private\n",
pScreen->myNum);
@@ -953,7 +956,7 @@ exaDriverInit (ScreenPtr pScreen, */
if (pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS)
{
- if (!dixRequestPrivate(exaPixmapPrivateKey, sizeof(ExaPixmapPrivRec))) {
+ if (!dixRegisterPrivateKey(&exaPixmapPrivateKeyRec, PRIVATE_PIXMAP, sizeof(ExaPixmapPrivRec))) {
LogMessage(X_WARNING,
"EXA(%d): Failed to allocate pixmap private\n",
pScreen->myNum);
|