Bug #16302: Fix GLX drawable refcounting in DMX.

(cherry picked from commit 3b58782692)
This commit is contained in:
Jesse Ruffin 2008-06-23 14:35:20 -04:00 committed by Adam Jackson
parent 89d73d7595
commit 4c8a84acf5

View File

@ -1004,8 +1004,7 @@ static int MakeCurrent(__GLXclientState *cl,
prevglxc->pGlxPixmap = 0; prevglxc->pGlxPixmap = 0;
} }
if (prevglxc->pGlxReadPixmap && if (prevglxc->pGlxReadPixmap) {
prevglxc->pGlxReadPixmap != prevglxc->pGlxPixmap ) {
/* /*
** The previous drawable was a glx pixmap, release it. ** The previous drawable was a glx pixmap, release it.
*/ */
@ -1023,8 +1022,7 @@ static int MakeCurrent(__GLXclientState *cl,
prevglxc->pGlxWindow = 0; prevglxc->pGlxWindow = 0;
} }
if (prevglxc->pGlxReadWindow && if (prevglxc->pGlxReadWindow) {
prevglxc->pGlxReadWindow != prevglxc->pGlxWindow) {
/* /*
** The previous drawable was a glx window, release it. ** The previous drawable was a glx window, release it.
*/ */
@ -1042,8 +1040,7 @@ static int MakeCurrent(__GLXclientState *cl,
prevglxc->pGlxPbuffer = 0; prevglxc->pGlxPbuffer = 0;
} }
if (prevglxc->pGlxReadPbuffer && if (prevglxc->pGlxReadPbuffer) {
prevglxc->pGlxReadPbuffer != prevglxc->pGlxPbuffer ) {
/* /*
** The previous drawable was a glx Pbuffer, release it. ** The previous drawable was a glx Pbuffer, release it.
*/ */
@ -1071,7 +1068,7 @@ static int MakeCurrent(__GLXclientState *cl,
pGlxPixmap->refcnt++; pGlxPixmap->refcnt++;
} }
if (pReadGlxPixmap && pReadGlxPixmap != pGlxPixmap) { if (pReadGlxPixmap) {
pReadGlxPixmap->refcnt++; pReadGlxPixmap->refcnt++;
} }
@ -1079,7 +1076,7 @@ static int MakeCurrent(__GLXclientState *cl,
pGlxWindow->refcnt++; pGlxWindow->refcnt++;
} }
if (pGlxReadWindow && pGlxReadWindow != pGlxWindow) { if (pGlxReadWindow) {
pGlxReadWindow->refcnt++; pGlxReadWindow->refcnt++;
} }
@ -1087,7 +1084,7 @@ static int MakeCurrent(__GLXclientState *cl,
pGlxPbuffer->refcnt++; pGlxPbuffer->refcnt++;
} }
if (pGlxReadPbuffer && pGlxReadPbuffer != pGlxPbuffer) { if (pGlxReadPbuffer) {
pGlxReadPbuffer->refcnt++; pGlxReadPbuffer->refcnt++;
} }