diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/opengl/qpixmapdata_x11gl_egl.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/opengl/qpixmapdata_x11gl_egl.cpp b/src/opengl/qpixmapdata_x11gl_egl.cpp index e0c274a..2c11a0b 100644 --- a/src/opengl/qpixmapdata_x11gl_egl.cpp +++ b/src/opengl/qpixmapdata_x11gl_egl.cpp @@ -74,7 +74,6 @@ public: EGLint rgbConfigId; EGLint argbConfigId; - do { EGLConfig rgbConfig = QEgl::defaultConfig(QInternal::Pixmap, QEgl::OpenGL, QEgl::Renderable); EGLConfig argbConfig = QEgl::defaultConfig(QInternal::Pixmap, QEgl::OpenGL, @@ -138,6 +137,7 @@ public: valid = argbContext->makeCurrent(argbPixmapSurface); argbContext->doneCurrent(); eglDestroySurface(QEgl::display(), argbPixmapSurface); + argbPixmapData->gl_surface = 0; } if (!valid) { @@ -150,7 +150,6 @@ public: QGLTextureCache::instance(); } while(0); - if (!valid) cleanup(); else @@ -158,6 +157,10 @@ public: } + ~QX11GLSharedContexts() { + cleanup(); + } + void cleanup() { if (sharedQGLContext) { delete sharedQGLContext; @@ -222,8 +225,8 @@ bool QX11GLPixmapData::hasX11GLPixmaps() if (checkedForX11GLPixmaps) return haveX11GLPixmaps; + haveX11GLPixmaps = qt_x11gl_share_contexts()->isValid(); checkedForX11GLPixmaps = true; - haveX11GLPixmaps = sharedContexts()->isValid(); return haveX11GLPixmaps; } |