void nsGLPbufferGLX::Destroy() { sCurrentContextToken = nsnull; mThebesSurface = nsnull; if (mPbuffer) { gGLXWrap.fDestroyPbuffer(mDisplay, mPbuffer); mPbuffer = nsnull; } }
nsGLPbufferGLX::~nsGLPbufferGLX() { MakeContextCurrent(); #ifndef GL_FRAMEBUFFER #define GL_FRAMEBUFFER 0x8D40 #endif // workaround for segfault on glXDestroyContext mGLWrap.fBindFramebuffer(GL_FRAMEBUFFER, 0); Destroy(); if (mPbuffer) gGLXWrap.fDestroyPbuffer(mDisplay, mPbuffer); if (mPbufferContext) gGLXWrap.fDestroyContext(mDisplay, mPbufferContext); #if !(defined(MOZ_WIDGET_GTK2) && defined(MOZ_X11)) if (mDisplay) XCloseDisplay(mDisplay); #endif gActiveBuffers--; fprintf (stderr, "nsGLPbufferGLX: gActiveBuffers: %d\n", gActiveBuffers); fflush (stderr); }