Drop the glx resize hook and stop chaining PositionWindow.
This commit is contained in:
parent
24dddcd0ef
commit
dff1a609bb
|
@ -639,15 +639,6 @@ DoMakeCurrent(__GLXclientState *cl,
|
|||
return __glXError(GLXBadContext);
|
||||
}
|
||||
|
||||
/* resize the buffers */
|
||||
if (!(*drawPriv->resize)(drawPriv)) {
|
||||
/* could not do initial resize. make current failed */
|
||||
(*glxc->loseCurrent)(glxc);
|
||||
glxc->drawPriv = NULL;
|
||||
glxc->readPriv = NULL;
|
||||
return __glXError(GLXBadContext);
|
||||
}
|
||||
|
||||
glxc->isCurrent = GL_TRUE;
|
||||
__glXRefDrawable(glxc->drawPriv);
|
||||
__glXRefDrawable(glxc->readPriv);
|
||||
|
|
|
@ -51,7 +51,6 @@ enum {
|
|||
|
||||
struct __GLXdrawable {
|
||||
void (*destroy)(__GLXdrawable *private);
|
||||
GLboolean (*resize)(__GLXdrawable *private);
|
||||
GLboolean (*swapBuffers)(__GLXdrawable *);
|
||||
void (*copySubBuffer)(__GLXdrawable *drawable,
|
||||
int x, int y, int w, int h);
|
||||
|
|
10
glx/glxdri.c
10
glx/glxdri.c
|
@ -239,15 +239,6 @@ __glXDRIdrawableDestroy(__GLXdrawable *drawable)
|
|||
xfree(private);
|
||||
}
|
||||
|
||||
static GLboolean
|
||||
__glXDRIdrawableResize(__GLXdrawable *glxPriv)
|
||||
{
|
||||
/* Nothing to do here, the DRI driver asks the server for drawable
|
||||
* geometry when it sess the SAREA timestamps change.*/
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
static GLboolean
|
||||
__glXDRIdrawableSwapBuffers(__GLXdrawable *basePrivate)
|
||||
{
|
||||
|
@ -694,7 +685,6 @@ __glXDRIscreenCreateDrawable(__GLXscreen *screen,
|
|||
}
|
||||
|
||||
private->base.destroy = __glXDRIdrawableDestroy;
|
||||
private->base.resize = __glXDRIdrawableResize;
|
||||
private->base.swapBuffers = __glXDRIdrawableSwapBuffers;
|
||||
private->base.copySubBuffer = __glXDRIdrawableCopySubBuffer;
|
||||
|
||||
|
|
|
@ -103,15 +103,6 @@ __glXDRIdrawableDestroy(__GLXdrawable *drawable)
|
|||
xfree(private);
|
||||
}
|
||||
|
||||
static GLboolean
|
||||
__glXDRIdrawableResize(__GLXdrawable *glxPriv)
|
||||
{
|
||||
/* Nothing to do here, the DRI driver asks the server for drawable
|
||||
* geometry when it sess the SAREA timestamps change.*/
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
static GLboolean
|
||||
__glXDRIdrawableSwapBuffers(__GLXdrawable *drawable)
|
||||
{
|
||||
|
@ -339,7 +330,6 @@ __glXDRIscreenCreateDrawable(__GLXscreen *screen,
|
|||
}
|
||||
|
||||
private->base.destroy = __glXDRIdrawableDestroy;
|
||||
private->base.resize = __glXDRIdrawableResize;
|
||||
private->base.swapBuffers = __glXDRIdrawableSwapBuffers;
|
||||
private->base.copySubBuffer = __glXDRIdrawableCopySubBuffer;
|
||||
|
||||
|
|
|
@ -98,15 +98,6 @@ __glXDRIdrawableDestroy(__GLXdrawable *drawable)
|
|||
xfree(private);
|
||||
}
|
||||
|
||||
static GLboolean
|
||||
__glXDRIdrawableResize(__GLXdrawable *drawable)
|
||||
{
|
||||
/* Nothing to do here, the DRI driver asks the server for drawable
|
||||
* geometry appropriately. */
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
static GLboolean
|
||||
__glXDRIdrawableSwapBuffers(__GLXdrawable *drawable)
|
||||
{
|
||||
|
@ -328,7 +319,6 @@ __glXDRIscreenCreateDrawable(__GLXscreen *screen,
|
|||
}
|
||||
|
||||
private->base.destroy = __glXDRIdrawableDestroy;
|
||||
private->base.resize = __glXDRIdrawableResize;
|
||||
private->base.swapBuffers = __glXDRIdrawableSwapBuffers;
|
||||
private->base.copySubBuffer = __glXDRIdrawableCopySubBuffer;
|
||||
|
||||
|
|
|
@ -184,51 +184,6 @@ static char GLXServerExtensions[] =
|
|||
"GLX_MESA_copy_sub_buffer "
|
||||
;
|
||||
|
||||
/*
|
||||
** This hook gets called when a window moves or changes size.
|
||||
*/
|
||||
static Bool glxPositionWindow(WindowPtr pWin, int x, int y)
|
||||
{
|
||||
ScreenPtr pScreen;
|
||||
__GLXdrawable *glxPriv;
|
||||
Bool ret;
|
||||
__GLXscreen *pGlxScreen;
|
||||
|
||||
/*
|
||||
** Call wrapped position window routine
|
||||
*/
|
||||
pScreen = pWin->drawable.pScreen;
|
||||
pGlxScreen = glxGetScreen(pScreen);
|
||||
pScreen->PositionWindow = pGlxScreen->PositionWindow;
|
||||
ret = (*pScreen->PositionWindow)(pWin, x, y);
|
||||
pScreen->PositionWindow = glxPositionWindow;
|
||||
|
||||
/*
|
||||
** Tell all contexts rendering into this window that the window size
|
||||
** has changed.
|
||||
*/
|
||||
glxPriv = (__GLXdrawable *) LookupIDByType(pWin->drawable.id,
|
||||
__glXDrawableRes);
|
||||
if (glxPriv == NULL) {
|
||||
/*
|
||||
** This window is not being used by the OpenGL.
|
||||
*/
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
** resize the drawable
|
||||
*/
|
||||
/* first change the drawable size */
|
||||
if (glxPriv->resize(glxPriv) == GL_FALSE) {
|
||||
/* resize failed! */
|
||||
/* XXX: what can we possibly do here? */
|
||||
ret = False;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* If your DDX driver wants to register support for swap barriers or hyperpipe
|
||||
* topology, it should call __glXHyperpipeInit() or __glXSwapBarrierInit()
|
||||
|
@ -260,7 +215,6 @@ glxCloseScreen (int index, ScreenPtr pScreen)
|
|||
__GLXscreen *pGlxScreen = glxGetScreen(pScreen);
|
||||
|
||||
pScreen->CloseScreen = pGlxScreen->CloseScreen;
|
||||
pScreen->PositionWindow = pGlxScreen->PositionWindow;
|
||||
|
||||
pGlxScreen->destroy(pGlxScreen);
|
||||
|
||||
|
@ -558,9 +512,6 @@ void __glXScreenInit(__GLXscreen *pGlxScreen, ScreenPtr pScreen)
|
|||
pGlxScreen->GLXversion = xstrdup(GLXServerVersion);
|
||||
pGlxScreen->GLXextensions = xstrdup(GLXServerExtensions);
|
||||
|
||||
pGlxScreen->PositionWindow = pScreen->PositionWindow;
|
||||
pScreen->PositionWindow = glxPositionWindow;
|
||||
|
||||
pGlxScreen->CloseScreen = pScreen->CloseScreen;
|
||||
pScreen->CloseScreen = glxCloseScreen;
|
||||
|
||||
|
|
|
@ -173,7 +173,6 @@ struct __GLXscreen {
|
|||
char *GLXversion;
|
||||
char *GLXextensions;
|
||||
|
||||
Bool (*PositionWindow)(WindowPtr pWin, int x, int y);
|
||||
Bool (*CloseScreen)(int index, ScreenPtr pScreen);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user