summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Kendall <mkendall@mythtv.org>2010-11-19 00:45:42 (GMT)
committer Mark Kendall <mkendall@mythtv.org>2010-11-19 00:45:42 (GMT)
commit969ded3a42c05f6558fd6b3dfd8e54e23f270a5d (patch)
treeec47a8ed42af72fc3456b3816cddcc3109a4df1d
parent5e4e58f2a981c2465476df3df426a2cc1e02dea2 (diff)
Backport r27281 from trunk to release-0-24-fixes
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 Intel system. Closes #9242 git-svn-id: http://svn.mythtv.org/svn/branches/release-0-24-fixes@27292 7dbf422c-18fa-0310-86e9-fd20926502f2
-rw-r--r--mythtv/libs/libmythui/mythrender_opengl.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/mythtv/libs/libmythui/mythrender_opengl.cpp b/mythtv/libs/libmythui/mythrender_opengl.cpp
index 677a15d..b32a06f 100644
--- a/mythtv/libs/libmythui/mythrender_opengl.cpp
+++ b/mythtv/libs/libmythui/mythrender_opengl.cpp
@@ -138,9 +138,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
m_lock_level--;
- if (m_lock_level == 0)
- QGLContext::doneCurrent();
if (m_lock_level < 0)
VERBOSE(VB_IMPORTANT, LOC_ERR + "Mis-matched calls to makeCurrent()");
m_lock->unlock();