mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-26 16:55:56 +00:00
DRI2: Add DRI2AuthConnection().
DRI2 uses the same authentication scheme as XF86DRI, so implement this entry point so DRI2 protocol code can access it.
This commit is contained in:
@@ -342,6 +342,17 @@ DRI2Connect(ScreenPtr pScreen, int *fd, const char **driverName,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Bool
|
||||
DRI2AuthConnection(ScreenPtr pScreen, drm_magic_t magic)
|
||||
{
|
||||
DRI2ScreenPtr ds = DRI2GetScreen(pScreen);
|
||||
|
||||
if (ds == NULL || drmAuthMagic(ds->fd, magic))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
unsigned int
|
||||
DRI2GetPixmapHandle(PixmapPtr pPixmap, unsigned int *flags)
|
||||
{
|
||||
|
||||
@@ -58,6 +58,8 @@ Bool DRI2Connect(ScreenPtr pScreen,
|
||||
const char **driverName,
|
||||
unsigned int *sareaHandle);
|
||||
|
||||
Bool DRI2AuthConnection(ScreenPtr pScreen, drm_magic_t magic);
|
||||
|
||||
unsigned int DRI2GetPixmapHandle(PixmapPtr pPixmap,
|
||||
unsigned int *flags);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user