mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-11 23:43:06 +00:00
devPrivates rework: since API is already broken, switch everything
over to new system. Need to update documentation and address some remaining vestiges of old system such as CursorRec structure, fb "offman" structure, and FontRec privates.
This commit is contained in:
parent
8554707326
commit
4017d31902
261 changed files with 1642 additions and 3957 deletions
|
|
@ -90,10 +90,8 @@ typedef struct {
|
|||
int depth;
|
||||
} xaaWrapperScrPrivRec, *xaaWrapperScrPrivPtr;
|
||||
|
||||
#define xaaWrapperGetScrPriv(s) ((xaaWrapperScrPrivPtr)( \
|
||||
(xaaWrapperScrPrivateIndex != -1) \
|
||||
? (s)->devPrivates[xaaWrapperScrPrivateIndex].ptr\
|
||||
: NULL))
|
||||
#define xaaWrapperGetScrPriv(s) ((xaaWrapperScrPrivPtr) \
|
||||
dixLookupPrivate(&(s)->devPrivates, xaaWrapperScrPrivateKey))
|
||||
#define xaaWrapperScrPriv(s) xaaWrapperScrPrivPtr pScrPriv = xaaWrapperGetScrPriv(s)
|
||||
|
||||
#define wrap(priv,real,mem,func) {\
|
||||
|
|
@ -131,13 +129,12 @@ typedef struct _xaaWrapperGCPriv {
|
|||
} xaaWrapperGCPrivRec, *xaaWrapperGCPrivPtr;
|
||||
|
||||
#define xaaWrapperGetGCPriv(pGC) ((xaaWrapperGCPrivPtr) \
|
||||
(pGC)->devPrivates[xaaWrapperGCPrivateIndex].ptr)
|
||||
dixLookupPrivate(&(pGC)->devPrivates, xaaWrapperGCPrivateKey))
|
||||
#define xaaWrapperGCPriv(pGC) xaaWrapperGCPrivPtr pGCPriv = xaaWrapperGetGCPriv(pGC)
|
||||
|
||||
|
||||
static int xaaWrapperScrPrivateIndex = -1;
|
||||
static int xaaWrapperGCPrivateIndex = -1;
|
||||
static int xaaWrapperGeneration = -1;
|
||||
static DevPrivateKey xaaWrapperScrPrivateKey = &xaaWrapperScrPrivateKey;
|
||||
static DevPrivateKey xaaWrapperGCPrivateKey = &xaaWrapperGCPrivateKey;
|
||||
|
||||
static Bool
|
||||
xaaWrapperCreateScreenResources(ScreenPtr pScreen)
|
||||
|
|
@ -305,18 +302,8 @@ xaaSetupWrapper(ScreenPtr pScreen, XAAInfoRecPtr infoPtr, int depth, SyncFunc *f
|
|||
#ifdef RENDER
|
||||
PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
|
||||
#endif
|
||||
if (xaaWrapperGeneration != serverGeneration) {
|
||||
xaaWrapperScrPrivateIndex = AllocateScreenPrivateIndex ();
|
||||
if (xaaWrapperScrPrivateIndex == -1)
|
||||
return FALSE;
|
||||
xaaWrapperGCPrivateIndex = AllocateGCPrivateIndex ();
|
||||
if (xaaWrapperGCPrivateIndex == -1)
|
||||
return FALSE;
|
||||
xaaWrapperGeneration = serverGeneration;
|
||||
}
|
||||
|
||||
if (!AllocateGCPrivate (pScreen, xaaWrapperGCPrivateIndex,
|
||||
sizeof (xaaWrapperGCPrivRec)))
|
||||
if (!dixRequestPrivate(xaaWrapperGCPrivateKey, sizeof(xaaWrapperGCPrivRec)))
|
||||
return FALSE;
|
||||
|
||||
pScrPriv = (xaaWrapperScrPrivPtr) xalloc (sizeof (xaaWrapperScrPrivRec));
|
||||
|
|
@ -370,7 +357,7 @@ xaaSetupWrapper(ScreenPtr pScreen, XAAInfoRecPtr infoPtr, int depth, SyncFunc *f
|
|||
}
|
||||
#endif
|
||||
pScrPriv->depth = depth;
|
||||
pScreen->devPrivates[xaaWrapperScrPrivateIndex].ptr = (pointer) pScrPriv;
|
||||
dixSetPrivate(&pScreen->devPrivates, xaaWrapperScrPrivateKey, pScrPriv);
|
||||
|
||||
*func = XAASync;
|
||||
|
||||
|
|
@ -521,8 +508,8 @@ xaaWrapperGlyphs (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
|
|||
void
|
||||
XAASync(ScreenPtr pScreen)
|
||||
{
|
||||
XAAScreenPtr pScreenPriv =
|
||||
(XAAScreenPtr) pScreen->devPrivates[XAAGetScreenIndex()].ptr;
|
||||
XAAScreenPtr pScreenPriv = (XAAScreenPtr)
|
||||
dixLookupPrivate(&pScreen->devPrivates, XAAGetScreenKey());
|
||||
XAAInfoRecPtr infoRec = pScreenPriv->AccelInfoRec;
|
||||
|
||||
if(infoRec->NeedToSync) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue