diff options
author | bobo1on1 <bobo1on1@svn> | 2010-10-10 16:38:44 +0000 |
---|---|---|
committer | bobo1on1 <bobo1on1@svn> | 2010-10-10 16:38:44 +0000 |
commit | fe373a42f5e30e59a52476c91124bd687064b44b (patch) | |
tree | 865d098982ab55b76169610e91191a594611bfac | |
parent | 83b49a2cc8ba7e06381e0fd952849d15c2650ce6 (diff) |
fixed: only lock in CXBMCRenderManager::UpdateResolution() when the renderer has been reconfigured, saves a lock per render
(cherry picked from commit 1620c60d253b0bd91fb8c4915edc193c89f71ee8)
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/Dharma@34626 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
-rw-r--r-- | xbmc/Application.cpp | 3 | ||||
-rw-r--r-- | xbmc/cores/VideoRenderers/RenderManager.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp index 0332fc0beb..788c650dab 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -2039,9 +2039,10 @@ void CApplication::Render() g_graphicsContext.Flip(); CTimeUtils::UpdateFrameTime(); g_infoManager.UpdateFPS(); - g_renderManager.UpdateResolution(); g_graphicsContext.Unlock(); + g_renderManager.UpdateResolution(); + // yield to other threads, so any thread needing // gfx context will get a timeslice. Newer os's // doesn't automatically prempt the unlocking thread diff --git a/xbmc/cores/VideoRenderers/RenderManager.cpp b/xbmc/cores/VideoRenderers/RenderManager.cpp index 7d39a28c8d..15a0be1c06 100644 --- a/xbmc/cores/VideoRenderers/RenderManager.cpp +++ b/xbmc/cores/VideoRenderers/RenderManager.cpp @@ -505,9 +505,9 @@ void CXBMCRenderManager::Recover() void CXBMCRenderManager::UpdateResolution() { - CRetakeLock<CExclusiveLock> lock(m_sharedSection); if (m_bReconfigured) { + CRetakeLock<CExclusiveLock> lock(m_sharedSection); if (g_graphicsContext.IsFullScreenVideo() && g_graphicsContext.IsFullScreenRoot()) { RESOLUTION res = GetResolution(); |