diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2008-08-26 22:43:04 -0400 |
---|---|---|
committer | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2008-08-28 16:15:43 -0400 |
commit | 1802e3bb1478de88592594d67121489b7a8db193 (patch) | |
tree | 0f6fd3198a7816cdee2718f5ce77439dcff0519e | |
parent | 832e0cd293f1f1572d70774d4b4254dcc7a3dcd4 (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.h | 6 | ||||
-rw-r--r-- | src/leo_accel.c | 6 |
2 files changed, 4 insertions, 8 deletions
@@ -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 |