Move the XAA private indices to be static.

Technically this is an ABI break, if you aren't smart enough to be using the
getter functions.  Cope.
This commit is contained in:
Adam Jackson 2007-03-28 15:17:02 -04:00
parent 8c7f56d92d
commit 82a8b99a6c
7 changed files with 8 additions and 16 deletions

View File

@ -35,7 +35,7 @@ XAAPolyLinesDashed(
#endif
){
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC);
XAAGCPtr pGCPriv = (XAAGCPtr) (pGC)->devPrivates[XAAGCIndex].ptr;
XAAGCPtr pGCPriv = (XAAGCPtr) (pGC)->devPrivates[XAAGetGCIndex()].ptr;
BoxPtr pboxInit = REGION_RECTS(pGC->pCompositeClip);
int nboxInit = REGION_NUM_RECTS(pGC->pCompositeClip);
unsigned int bias = miGetZeroLineBias(pDrawable->pScreen);

View File

@ -38,7 +38,7 @@ Bool
XAACreateGC(GCPtr pGC)
{
ScreenPtr pScreen = pGC->pScreen;
XAAGCPtr pGCPriv = (XAAGCPtr)(pGC->devPrivates[XAAGCIndex].ptr);
XAAGCPtr pGCPriv = (XAAGCPtr)(pGC->devPrivates[XAAGetGCIndex()].ptr);
Bool ret;
XAA_SCREEN_PROLOGUE(pScreen,CreateGC);

View File

@ -305,7 +305,7 @@ XAAValidatePolylines(
DrawablePtr pDraw )
{
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC);
XAAGCPtr pGCPriv = (XAAGCPtr) (pGC)->devPrivates[XAAGCIndex].ptr;
XAAGCPtr pGCPriv = (XAAGCPtr) (pGC)->devPrivates[XAAGetGCIndex()].ptr;
if(pGC->lineStyle == LineSolid) changes &= ~GCDashList;
if(!changes) return;

View File

@ -42,14 +42,9 @@ static int XAASetDGAMode(int index, int num, DGADevicePtr devRet);
static void XAAEnableDisableFBAccess (int index, Bool enable);
static Bool XAAChangeWindowAttributes (WindowPtr pWin, unsigned long mask);
/*
* XXX These three should be static, but that breaks ABI compat with XF4.4
* and Xorg 6.7.0 modules. DO NOT use them in new code, you should never
* be setting them, and you've got Get functions below.
*/
int XAAScreenIndex = -1;
int XAAGCIndex = -1;
int XAAPixmapIndex = -1;
static int XAAScreenIndex = -1;
static int XAAGCIndex = -1;
static int XAAPixmapIndex = -1;
static unsigned long XAAGeneration = 0;

View File

@ -64,7 +64,7 @@ void
XAAComputeDash(GCPtr pGC)
{
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC);
XAAGCPtr pGCPriv = (XAAGCPtr) (pGC)->devPrivates[XAAGCIndex].ptr;
XAAGCPtr pGCPriv = (XAAGCPtr) (pGC)->devPrivates[XAAGetGCIndex()].ptr;
Bool EvenDash = (pGC->numInDashList & 0x01) ? FALSE : TRUE;
int PatternLength = 0;
unsigned char* DashPtr = (unsigned char*)pGC->dash;

View File

@ -522,7 +522,7 @@ void
XAASync(ScreenPtr pScreen)
{
XAAScreenPtr pScreenPriv =
(XAAScreenPtr) pScreen->devPrivates[XAAScreenIndex].ptr;
(XAAScreenPtr) pScreen->devPrivates[XAAGetScreenIndex()].ptr;
XAAInfoRecPtr infoRec = pScreenPriv->AccelInfoRec;
if(infoRec->NeedToSync) {

View File

@ -1640,9 +1640,6 @@ XAAGetPixelFromRGBA (
extern GCOps XAAFallbackOps;
extern GCOps *XAAGetFallbackOps(void);
extern GCFuncs XAAGCFuncs;
extern int XAAScreenIndex; /* XXX DONTUSE */
extern int XAAGCIndex; /* XXX DONTUSE */
extern int XAAPixmapIndex; /* XXX DONTUSE */
extern int XAAGetScreenIndex(void);
extern int XAAGetGCIndex(void);
extern int XAAGetPixmapIndex(void);