summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2007-04-14 08:06:54 -0600
committerBrian <brian@yutani.localnet.net>2007-04-14 08:06:54 -0600
commit4fc46a6c82419ec379896a9b9992c3cb6721904f (patch)
treefb10809ca25d7b30b164275e34485c0b2fbc66a8 /src/mesa
parente19cfabb6ec091982cc92ec59aa5dedf3cdf2302 (diff)
more _mesa_unreference_framebuffer() calls, remove dead code
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/context.c26
1 files changed, 2 insertions, 24 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 59170716f1..2041d26299 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1450,30 +1450,6 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,
}
}
-#if 0 /** XXX enable this someday */
- if (oldCtx && oldCtx != newCtx) {
- /* unbind old context's draw/read buffers */
- if (oldCtx->DrawBuffer && oldCtx->DrawBuffer->Name == 0) {
- oldCtx->DrawBuffer->RefCount--;
- oldCtx->DrawBuffer = NULL;
- }
- if (oldCtx->ReadBuffer && oldCtx->ReadBuffer->Name == 0) {
- oldCtx->ReadBuffer->RefCount--;
- oldCtx->ReadBuffer = NULL;
- }
- if (oldCtx->WinSysDrawBuffer) {
- ASSERT(oldCtx->WinSysDrawBuffer->Name == 0);
- oldCtx->WinSysDrawBuffer->RefCount--;
- oldCtx->WinSysDrawBuffer = NULL;
- }
- if (oldCtx->WinSysReadBuffer) {
- ASSERT(oldCtx->WinSysReadBuffer->Name == 0);
- oldCtx->WinSysReadBuffer->RefCount--;
- oldCtx->WinSysReadBuffer = NULL;
- }
- }
-#endif
-
/* We used to call _glapi_check_multithread() here. Now do it in drivers */
_glapi_set_context((void *) newCtx);
ASSERT(_mesa_get_current_context() == newCtx);
@@ -1481,6 +1457,8 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,
if (oldCtx) {
_mesa_unreference_framebuffer(&oldCtx->WinSysDrawBuffer);
_mesa_unreference_framebuffer(&oldCtx->WinSysReadBuffer);
+ _mesa_unreference_framebuffer(&oldCtx->DrawBuffer);
+ _mesa_unreference_framebuffer(&oldCtx->ReadBuffer);
}
if (!newCtx) {