From 1868ccaadd9e50ad929a72666956f6b01e2e219c Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Mon, 20 May 2019 17:28:34 -0700 Subject: [PATCH] Qt: Only close GL context on thread when shutting down --- src/platform/qt/DisplayGL.cpp | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/src/platform/qt/DisplayGL.cpp b/src/platform/qt/DisplayGL.cpp index dc360cdb0..3bba105e3 100644 --- a/src/platform/qt/DisplayGL.cpp +++ b/src/platform/qt/DisplayGL.cpp @@ -315,18 +315,8 @@ void PainterGL::resizeContext() { return; } - if (!m_active) { - m_gl->makeCurrent(m_surface); -#if defined(_WIN32) && defined(USE_EPOXY) - epoxy_handle_external_wglMakeCurrent(); -#endif - } - QSize size = m_context->screenDimensions(); m_backend->setDimensions(m_backend, size.width(), size.height()); - if (!m_active) { - m_gl->doneCurrent(); - } } void PainterGL::setMessagePainter(MessagePainter* messagePainter) { @@ -493,12 +483,6 @@ void PainterGL::setShaders(struct VDir* dir) { return; } #ifdef BUILD_GLES2 - if (!m_active) { - m_gl->makeCurrent(m_surface); -#if defined(_WIN32) && defined(USE_EPOXY) - epoxy_handle_external_wglMakeCurrent(); -#endif - } if (m_shader.passes) { mGLES2ShaderDetach(reinterpret_cast(m_backend)); mGLES2ShaderFree(&m_shader); @@ -507,9 +491,6 @@ void PainterGL::setShaders(struct VDir* dir) { if (m_started) { mGLES2ShaderAttach(reinterpret_cast(m_backend), static_cast(m_shader.passes), m_shader.nPasses); } - if (!m_active) { - m_gl->doneCurrent(); - } #endif } @@ -518,19 +499,10 @@ void PainterGL::clearShaders() { return; } #ifdef BUILD_GLES2 - if (!m_active) { - m_gl->makeCurrent(m_surface); -#if defined(_WIN32) && defined(USE_EPOXY) - epoxy_handle_external_wglMakeCurrent(); -#endif - } if (m_shader.passes) { mGLES2ShaderDetach(reinterpret_cast(m_backend)); mGLES2ShaderFree(&m_shader); } - if (!m_active) { - m_gl->doneCurrent(); - } #endif }