aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/xaa/xaaInit.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-06-11 12:14:52 +0000
committermarha <marha@users.sourceforge.net>2010-06-11 12:14:52 +0000
commit4c61bf84b11e26e6f22648668c95ea760a379163 (patch)
tree0ac762ab2815eae283dded7447ad7cb5a54b926a /xorg-server/hw/xfree86/xaa/xaaInit.c
parente1dabd2ce8be0d70c6c15353b58de256129dfd1f (diff)
downloadvcxsrv-4c61bf84b11e26e6f22648668c95ea760a379163.tar.gz
vcxsrv-4c61bf84b11e26e6f22648668c95ea760a379163.tar.bz2
vcxsrv-4c61bf84b11e26e6f22648668c95ea760a379163.zip
xserver git update 11/6/2010
Diffstat (limited to 'xorg-server/hw/xfree86/xaa/xaaInit.c')
-rw-r--r--xorg-server/hw/xfree86/xaa/xaaInit.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/xorg-server/hw/xfree86/xaa/xaaInit.c b/xorg-server/hw/xfree86/xaa/xaaInit.c
index 58efb6a82..a4b235acf 100644
--- a/xorg-server/hw/xfree86/xaa/xaaInit.c
+++ b/xorg-server/hw/xfree86/xaa/xaaInit.c
@@ -42,12 +42,12 @@ static int XAASetDGAMode(int index, int num, DGADevicePtr devRet);
static void XAAEnableDisableFBAccess (int index, Bool enable);
static Bool XAAChangeWindowAttributes (WindowPtr pWin, unsigned long mask);
-static int XAAScreenKeyIndex;
-static DevPrivateKey XAAScreenKey = &XAAScreenKeyIndex;
-static int XAAGCKeyIndex;
-static DevPrivateKey XAAGCKey = &XAAGCKeyIndex;
-static int XAAPixmapKeyIndex;
-static DevPrivateKey XAAPixmapKey = &XAAPixmapKeyIndex;
+static DevPrivateKeyRec XAAScreenKeyRec;
+#define XAAScreenKey (&XAAScreenKeyRec)
+static DevPrivateKeyRec XAAGCKeyRec;
+#define XAAGCKey (&XAAGCKeyRec)
+static DevPrivateKeyRec XAAPixmapKeyRec;
+#define XAAPixmapKey (&XAAPixmapKeyRec)
DevPrivateKey XAAGetScreenKey(void) {
return XAAScreenKey;
@@ -84,11 +84,9 @@ XAADestroyInfoRec(XAAInfoRecPtr infoRec)
if(infoRec->ClosePixmapCache)
(*infoRec->ClosePixmapCache)(infoRec->pScrn->pScreen);
- if(infoRec->PreAllocMem)
- free(infoRec->PreAllocMem);
+ free(infoRec->PreAllocMem);
- if(infoRec->PixmapCachePrivate)
- free(infoRec->PixmapCachePrivate);
+ free(infoRec->PixmapCachePrivate);
free(infoRec);
}
@@ -106,10 +104,13 @@ XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
if (!infoRec)
return TRUE;
- if (!dixRequestPrivate(XAAGCKey, sizeof(XAAGCRec)))
+ if (!dixRegisterPrivateKey(&XAAGCKeyRec, PRIVATE_GC, sizeof(XAAGCRec)))
+ return FALSE;
+
+ if (!dixRegisterPrivateKey(&XAAPixmapKeyRec, PRIVATE_PIXMAP, sizeof(XAAPixmapRec)))
return FALSE;
- if (!dixRequestPrivate(XAAPixmapKey, sizeof(XAAPixmapRec)))
+ if (!dixRegisterPrivateKey(&XAAScreenKeyRec, PRIVATE_SCREEN, 0))
return FALSE;
if (!(pScreenPriv = malloc(sizeof(XAAScreenRec))))