diff options
authorMark Kendall <>2010-11-18 08:12:38 (GMT)
committer Mark Kendall <>2010-11-18 08:12:38 (GMT)
commit262966d31be2d60fe0657d7d4bdb082a48d74f47 (patch)
parent0e26821642d2ae9dabb50249e9b2bb898ad6bfc6 (diff)
Don't call QGLContext::doneCurrent() in MythRenderOpenGL.
- it should be unnecessary given that makeCurrent always checks the correct context is current to the current thread and following the threading changes, all of our OpenGL usage should be in the same thread. - it breaks playback on certain Windows builds. - it has a sizeable performance impact on at least one system tested (Intel GPU) Based on a patch from Lawrence Rust. git-svn-id: 7dbf422c-18fa-0310-86e9-fd20926502f2
1 files changed, 4 insertions, 2 deletions
diff --git a/mythtv/libs/libmythui/mythrender_opengl.cpp b/mythtv/libs/libmythui/mythrender_opengl.cpp
index e84a723..1790a64 100644
--- a/mythtv/libs/libmythui/mythrender_opengl.cpp
+++ b/mythtv/libs/libmythui/mythrender_opengl.cpp
@@ -179,9 +179,11 @@ void MythRenderOpenGL::makeCurrent()
void MythRenderOpenGL::doneCurrent()
+ // we don't explicitly call QGlContext::doneCurrent() as it should be
+ // unnecessary (makeCurrent() will switch contexts as necessary), it
+ // appears to cause performance issues and breaks rendering in certain
+ // situations
- if (m_lock_level == 0)
- QGLContext::doneCurrent();
if (m_lock_level < 0)
VERBOSE(VB_IMPORTANT, LOC_ERR + "Mis-matched calls to makeCurrent()");