diff options
author | Adam Jackson <ajax@nwnk.net> | 2005-09-24 18:45:45 +0000 |
---|---|---|
committer | Adam Jackson <ajax@nwnk.net> | 2005-09-24 18:45:45 +0000 |
commit | 3192f400c72b3b606fcc1798d577737502897b43 (patch) | |
tree | 69125ca07e07211dbdc2b6537a2523c4528f6b53 | |
parent | a5477ae7ac9a56c1a586950db1dee6661bff149d (diff) |
Disable the {Open,Close}FullScreen DRI protocol. Remove empty FullScreen
stubs from drivers, comment the non-empty ones.
-rw-r--r-- | hw/xfree86/dri/dri.c | 97 | ||||
-rw-r--r-- | hw/xfree86/dri/dri.h | 3 | ||||
-rw-r--r-- | hw/xfree86/dri/xf86dri.c | 68 |
3 files changed, 1 insertions, 167 deletions
diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c index 3e7d93e87..424a21c68 100644 --- a/hw/xfree86/dri/dri.c +++ b/hw/xfree86/dri/dri.c @@ -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, diff --git a/hw/xfree86/dri/dri.h b/hw/xfree86/dri/dri.h index bfb0d64a8..312e8a8bb 100644 --- a/hw/xfree86/dri/dri.h +++ b/hw/xfree86/dri/dri.h @@ -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, diff --git a/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c index 8ee540130..7f4d2835b 100644 --- a/hw/xfree86/dri/xf86dri.c +++ b/hw/xfree86/dri/xf86dri.c @@ -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); @@ -565,67 +563,6 @@ ProcXF86DRIGetDeviceInfo( } 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; } |