From 69991136560b613a81f1191f983064f5e30254c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Fri, 9 Apr 2010 14:13:41 -0400 Subject: [PATCH] glx: Drop DestroyWindow hook MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that glx doesn't call DRI2DestroyDrawable anymore, we don't need to force a specific resource destruction order in the DestroyWindow hook. Signed-off-by: Kristian Høgsberg https://bugs.freedesktop.org/show_bug.cgi?id=26394 --- glx/glxscreens.c | 28 ---------------------------- glx/glxscreens.h | 1 - 2 files changed, 0 insertions(+), 29 deletions(-) diff --git a/glx/glxscreens.c b/glx/glxscreens.c index 58d8ee0..b75aea6 100644 --- a/glx/glxscreens.c +++ b/glx/glxscreens.c @@ -215,7 +215,6 @@ glxCloseScreen (int index, ScreenPtr pScreen) __GLXscreen *pGlxScreen = glxGetScreen(pScreen); pScreen->CloseScreen = pGlxScreen->CloseScreen; - pScreen->DestroyWindow = pGlxScreen->DestroyWindow; pGlxScreen->destroy(pGlxScreen); @@ -347,31 +346,6 @@ pickFBConfig(__GLXscreen *pGlxScreen, VisualPtr visual) return best; } -static Bool -glxDestroyWindow(WindowPtr pWin) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - __GLXscreen *pGlxScreen = glxGetScreen(pScreen); - Bool retval = TRUE; - - FreeResource(pWin->drawable.id, FALSE); - - /* call lower wrapped functions */ - if (pGlxScreen->DestroyWindow) { - /* unwrap */ - pScreen->DestroyWindow = pGlxScreen->DestroyWindow; - - /* call lower layers */ - retval = (*pScreen->DestroyWindow)(pWin); - - /* rewrap */ - pGlxScreen->DestroyWindow = pScreen->DestroyWindow; - pScreen->DestroyWindow = glxDestroyWindow; - } - - return retval; -} - void __glXScreenInit(__GLXscreen *pGlxScreen, ScreenPtr pScreen) { __GLXconfig *m; @@ -394,8 +368,6 @@ void __glXScreenInit(__GLXscreen *pGlxScreen, ScreenPtr pScreen) pGlxScreen->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = glxCloseScreen; - pGlxScreen->DestroyWindow = pScreen->DestroyWindow; - pScreen->DestroyWindow = glxDestroyWindow; i = 0; for (m = pGlxScreen->fbconfigs; m != NULL; m = m->next) { diff --git a/glx/glxscreens.h b/glx/glxscreens.h index bff4363..d52099f 100644 --- a/glx/glxscreens.h +++ b/glx/glxscreens.h @@ -173,7 +173,6 @@ struct __GLXscreen { /*@}*/ Bool (*CloseScreen)(int index, ScreenPtr pScreen); - Bool (*DestroyWindow)(WindowPtr pWindow); }; -- 1.7.0.1