Disable the {Open,Close}FullScreen DRI protocol. Remove empty FullScreen

stubs from drivers, comment the non-empty ones.
This commit is contained in:
Adam Jackson 2005-09-24 18:45:45 +00:00
parent a5477ae7ac
commit 3192f400c7
3 changed files with 1 additions and 167 deletions

View File

@ -80,12 +80,6 @@ static int DRIWindowPrivIndex = -1;
static unsigned long DRIGeneration = 0;
static unsigned int DRIDrawableValidationStamp = 0;
/* Support cleanup for fullscreen mode,
independent of the DRICreateDrawable
resource management. */
static Bool _DRICloseFullScreen(pointer pResource, XID id);
static RESTYPE DRIFullScreenResType;
static RESTYPE DRIDrawablePrivResType;
static RESTYPE DRIContextPrivResType;
static void DRIDestroyDummyContext(ScreenPtr pScreen, Bool hasCtxPriv);
@ -605,7 +599,6 @@ DRIExtensionInit(void)
DRIDrawablePrivResType = CreateNewResourceType(DRIDrawablePrivDelete);
DRIContextPrivResType = CreateNewResourceType(DRIContextPrivDelete);
DRIFullScreenResType = CreateNewResourceType(_DRICloseFullScreen);
for (i = 0; i < screenInfo.numScreens; i++)
{
@ -2023,96 +2016,6 @@ DRIAdjustFrame(int scrnIndex, int x, int y, int flags)
_DRIAdjustFrame(pScrn, pDRIPriv, x, y);
}
/* WARNING WARNING WARNING: Just like every other function call in this
file, the DRIOpenFullScreen and DRICloseFullScreen calls are for
internal use only! They should be used only by GLX internals and
should NEVER be called from a GL application.
Some time in the future, there will be a (proposed) standard GLX
extension that performs expanded functionality, that is designed for
used by application-level programs, and that should be portable
across multiple GLX implementations. */
Bool
DRIOpenFullScreen(ScreenPtr pScreen, DrawablePtr pDrawable)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
WindowPtr pWin = (WindowPtr)pDrawable;
drm_clip_rect_t * pClipRects = (void *)REGION_RECTS(&pWin->clipList);
_DRIAdjustFrame(pScrn, pDRIPriv, pScrn->frameX0, pScrn->frameY0);
if (pDrawable->type != DRAWABLE_WINDOW) return FALSE;
if (!pScrn->vtSema) return FALSE; /* switched away */
if (pDrawable->x != pScrn->frameX0
|| pDrawable->y != pScrn->frameY0
|| pDrawable->width != pScrn->frameX1 - pScrn->frameX0 + 1
|| pDrawable->height != pScrn->frameY1 - pScrn->frameY0 + 1) {
return FALSE;
}
if (REGION_NUM_RECTS(&pWin->clipList) != 1) return FALSE;
if (pDrawable->x != pClipRects[0].x1
|| pDrawable->y != pClipRects[0].y1
|| pDrawable->width != pClipRects[0].x2 - pClipRects[0].x1
|| pDrawable->height != pClipRects[0].y2 - pClipRects[0].y1) {
return FALSE;
}
AddResource(pDrawable->id, DRIFullScreenResType, (pointer)pWin);
xf86EnableVTSwitch(FALSE);
pScrn->EnableDisableFBAccess(pScreen->myNum, FALSE);
pScrn->vtSema = FALSE;
pDRIPriv->fullscreen = pDrawable;
DRIClipNotify(pWin, 0, 0);
if (pDRIPriv->pDriverInfo->OpenFullScreen)
pDRIPriv->pDriverInfo->OpenFullScreen(pScreen);
pDRIPriv->pSAREA->frame.fullscreen = 1;
return TRUE;
}
static Bool
_DRICloseFullScreen(pointer pResource, XID id)
{
DrawablePtr pDrawable = (DrawablePtr)pResource;
ScreenPtr pScreen = pDrawable->pScreen;
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
WindowPtr pWin = (WindowPtr)pDrawable;
WindowOptPtr optional = pWin->optional;
Mask mask = pWin->eventMask;
if (pDRIPriv->pDriverInfo->CloseFullScreen)
pDRIPriv->pDriverInfo->CloseFullScreen(pScreen);
pDRIPriv->fullscreen = NULL;
pScrn->vtSema = TRUE;
/* Turn off expose events for the top window */
pWin->eventMask &= ~ExposureMask;
pWin->optional = NULL;
pScrn->EnableDisableFBAccess(pScreen->myNum, TRUE);
pWin->eventMask = mask;
pWin->optional = optional;
xf86EnableVTSwitch(TRUE);
pDRIPriv->pSAREA->frame.fullscreen = 0;
return TRUE;
}
Bool
DRICloseFullScreen(ScreenPtr pScreen, DrawablePtr pDrawable)
{
FreeResourceByType(pDrawable->id, DRIFullScreenResType, FALSE);
return TRUE;
}
/*
* DRIMoveBuffersHelper swaps the regions rects in place leaving you
* a region with the rects in the order that you need to blit them,

View File

@ -331,9 +331,6 @@ extern void DRIQueryVersion(int *majorVersion,
extern void DRIAdjustFrame(int scrnIndex, int x, int y, int flags);
extern int DRIOpenFullScreen(ScreenPtr pScreen, DrawablePtr pDrawable);
extern int DRICloseFullScreen(ScreenPtr pScreen, DrawablePtr pDrawable);
extern void DRIMoveBuffersHelper(ScreenPtr pScreen,
int dx,
int dy,

View File

@ -80,8 +80,6 @@ static DISPATCH_PROC(ProcXF86DRIGetDrawableInfo);
static DISPATCH_PROC(ProcXF86DRIGetDeviceInfo);
static DISPATCH_PROC(ProcXF86DRIDispatch);
static DISPATCH_PROC(ProcXF86DRIAuthConnection);
static DISPATCH_PROC(ProcXF86DRIOpenFullScreen);
static DISPATCH_PROC(ProcXF86DRICloseFullScreen);
static DISPATCH_PROC(SProcXF86DRIQueryVersion);
static DISPATCH_PROC(SProcXF86DRIDispatch);
@ -564,67 +562,6 @@ ProcXF86DRIGetDeviceInfo(
return (client->noClientException);
}
static int
ProcXF86DRIOpenFullScreen (
register ClientPtr client
)
{
REQUEST(xXF86DRIOpenFullScreenReq);
xXF86DRIOpenFullScreenReply rep;
DrawablePtr pDrawable;
REQUEST_SIZE_MATCH(xXF86DRIOpenFullScreenReq);
if (stuff->screen >= screenInfo.numScreens) {
client->errorValue = stuff->screen;
return BadValue;
}
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
if (!(pDrawable = SecurityLookupDrawable(stuff->drawable,
client,
SecurityReadAccess)))
return BadValue;
rep.isFullScreen = DRIOpenFullScreen(screenInfo.screens[stuff->screen],
pDrawable);
WriteToClient(client, sizeof(xXF86DRIOpenFullScreenReply), (char *)&rep);
return client->noClientException;
}
static int
ProcXF86DRICloseFullScreen (
register ClientPtr client
)
{
REQUEST(xXF86DRICloseFullScreenReq);
xXF86DRICloseFullScreenReply rep;
DrawablePtr pDrawable;
REQUEST_SIZE_MATCH(xXF86DRICloseFullScreenReq);
if (stuff->screen >= screenInfo.numScreens) {
client->errorValue = stuff->screen;
return BadValue;
}
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
if (!(pDrawable = SecurityLookupDrawable(stuff->drawable,
client,
SecurityReadAccess)))
return BadValue;
DRICloseFullScreen(screenInfo.screens[stuff->screen], pDrawable);
WriteToClient(client, sizeof(xXF86DRICloseFullScreenReply), (char *)&rep);
return (client->noClientException);
}
static int
ProcXF86DRIDispatch (
register ClientPtr client
@ -665,10 +602,7 @@ ProcXF86DRIDispatch (
return ProcXF86DRIGetDeviceInfo(client);
case X_XF86DRIAuthConnection:
return ProcXF86DRIAuthConnection(client);
case X_XF86DRIOpenFullScreen:
return ProcXF86DRIOpenFullScreen(client);
case X_XF86DRICloseFullScreen:
return ProcXF86DRICloseFullScreen(client);
/* {Open,Close}FullScreen are deprecated now */
default:
return BadRequest;
}