mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-08 23:12:27 +00:00
Change the devPrivates API to require dixRegisterPrivateKey
This patch only changes the API, not the implementation of the devPrivates infrastructure. This will permit a new devPrivates implementation to be layed into the server without requiring simultaneous changes in every devPrivates user. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com>
This commit is contained in:
parent
c865a24401
commit
faeebead7b
139 changed files with 1105 additions and 711 deletions
|
|
@ -51,12 +51,15 @@
|
|||
CARD8 dri2_major; /* version of DRI2 supported by DDX */
|
||||
CARD8 dri2_minor;
|
||||
|
||||
static int dri2ScreenPrivateKeyIndex;
|
||||
static DevPrivateKey dri2ScreenPrivateKey = &dri2ScreenPrivateKeyIndex;
|
||||
static int dri2WindowPrivateKeyIndex;
|
||||
static DevPrivateKey dri2WindowPrivateKey = &dri2WindowPrivateKeyIndex;
|
||||
static int dri2PixmapPrivateKeyIndex;
|
||||
static DevPrivateKey dri2PixmapPrivateKey = &dri2PixmapPrivateKeyIndex;
|
||||
static DevPrivateKeyRec dri2ScreenPrivateKeyRec;
|
||||
#define dri2ScreenPrivateKey (&dri2ScreenPrivateKeyRec)
|
||||
|
||||
static DevPrivateKeyRec dri2WindowPrivateKeyRec;
|
||||
#define dri2WindowPrivateKey (&dri2WindowPrivateKeyRec)
|
||||
|
||||
static DevPrivateKeyRec dri2PixmapPrivateKeyRec;
|
||||
#define dri2PixmapPrivateKey (&dri2PixmapPrivateKeyRec)
|
||||
|
||||
static RESTYPE dri2DrawableRes;
|
||||
|
||||
typedef struct _DRI2Screen *DRI2ScreenPtr;
|
||||
|
|
@ -1025,6 +1028,15 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if (!dixRegisterPrivateKey(&dri2ScreenPrivateKeyRec, PRIVATE_SCREEN, 0))
|
||||
return FALSE;
|
||||
|
||||
if (!dixRegisterPrivateKey(&dri2WindowPrivateKeyRec, PRIVATE_WINDOW, 0))
|
||||
return FALSE;
|
||||
|
||||
if (!dixRegisterPrivateKey(&dri2PixmapPrivateKeyRec, PRIVATE_PIXMAP, 0))
|
||||
return FALSE;
|
||||
|
||||
ds = calloc(1, sizeof *ds);
|
||||
if (!ds)
|
||||
return FALSE;
|
||||
|
|
|
|||
Loading…
Reference in a new issue