summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2008-08-26 22:43:04 -0400
committerEamon Walsh <ewalsh@tycho.nsa.gov>2008-08-28 16:15:43 -0400
commit1802e3bb1478de88592594d67121489b7a8db193 (patch)
tree0f6fd3198a7816cdee2718f5ce77439dcff0519e
parent832e0cd293f1f1572d70774d4b4254dcc7a3dcd4 (diff)
Change GC private key back to an integer variable.
Prepares for a devPrivates system that will store an index.
-rw-r--r--src/leo.h6
-rw-r--r--src/leo_accel.c6
2 files changed, 4 insertions, 8 deletions
diff --git a/src/leo.h b/src/leo.h
index eec21ba..46955a6 100644
--- a/src/leo.h
+++ b/src/leo.h
@@ -86,13 +86,13 @@ typedef struct {
#define GET_LEO_FROM_SCRN(p) ((LeoPtr)((p)->driverPrivate))
+extern int LeoGCPrivateIndex;
+
#define LEO_OLDPRIV (GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 4)
#if LEO_OLDPRIV
-extern int LeoGCPrivateIndex;
#define LeoGetGCPrivate(g) (g)->devPrivates[LeoGCPrivateIndex].ptr
#else
-extern DevPrivateKey LeoGCPrivateKey;
-#define LeoGetGCPrivate(g) dixLookupPrivate(&(g)->devPrivates, LeoGCPrivateKey)
+#define LeoGetGCPrivate(g) dixLookupPrivate(&(g)->devPrivates, &LeoGCPrivateIndex)
#endif
extern int leoRopTable[];
diff --git a/src/leo_accel.c b/src/leo_accel.c
index 4408b24..9bfbc4a 100644
--- a/src/leo_accel.c
+++ b/src/leo_accel.c
@@ -42,11 +42,7 @@
#include "leo.h"
-#if LEO_OLDPRIV
int LeoGCPrivateIndex;
-#else
-DevPrivateKey LeoGCPrivateKey = &LeoGCPrivateKey;
-#endif
int leoRopTable[16] = {
LEO_ATTR_RGBE_ENABLE|LEO_ROP_ZERO, /* GXclear */
@@ -110,7 +106,7 @@ Bool LeoAccelInit (ScreenPtr pScreen, LeoPtr pLeo)
if (!AllocateGCPrivate(pScreen, LeoGCPrivateIndex, sizeof(LeoPrivGCRec)))
return FALSE;
#else
- if (!dixRequestPrivate(LeoGCPrivateKey, sizeof(LeoPrivGCRec)))
+ if (!dixRequestPrivate(&LeoGCPrivateIndex, sizeof(LeoPrivGCRec)))
return FALSE;
#endif