From dff1a609bb4c0171e2abb92b54c16e739aec9ca2 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Mon, 21 Jul 2008 18:29:08 -0400 Subject: Drop the glx resize hook and stop chaining PositionWindow. --- glx/glxcmds.c | 9 --------- glx/glxdrawable.h | 1 - glx/glxdri.c | 10 ---------- glx/glxdri2.c | 10 ---------- glx/glxdriswrast.c | 10 ---------- glx/glxscreens.c | 49 ------------------------------------------------- glx/glxscreens.h | 1 - 7 files changed, 90 deletions(-) (limited to 'glx') diff --git a/glx/glxcmds.c b/glx/glxcmds.c index ea70ca478..f4fc03159 100644 --- a/glx/glxcmds.c +++ b/glx/glxcmds.c @@ -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); diff --git a/glx/glxdrawable.h b/glx/glxdrawable.h index 5b4338272..6cf2e502f 100644 --- a/glx/glxdrawable.h +++ b/glx/glxdrawable.h @@ -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); diff --git a/glx/glxdri.c b/glx/glxdri.c index a87ff13ce..41c47a8c8 100644 --- a/glx/glxdri.c +++ b/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; diff --git a/glx/glxdri2.c b/glx/glxdri2.c index 9a3bc1fdb..7c1f00e79 100644 --- a/glx/glxdri2.c +++ b/glx/glxdri2.c @@ -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; diff --git a/glx/glxdriswrast.c b/glx/glxdriswrast.c index cf4827e5c..199f5f842 100644 --- a/glx/glxdriswrast.c +++ b/glx/glxdriswrast.c @@ -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; diff --git a/glx/glxscreens.c b/glx/glxscreens.c index cc7054a64..505f79754 100644 --- a/glx/glxscreens.c +++ b/glx/glxscreens.c @@ -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; diff --git a/glx/glxscreens.h b/glx/glxscreens.h index 39d162d76..dfe7c9d0a 100644 --- a/glx/glxscreens.h +++ b/glx/glxscreens.h @@ -173,7 +173,6 @@ struct __GLXscreen { char *GLXversion; char *GLXextensions; - Bool (*PositionWindow)(WindowPtr pWin, int x, int y); Bool (*CloseScreen)(int index, ScreenPtr pScreen); }; -- cgit v1.2.3