From fe373a42f5e30e59a52476c91124bd687064b44b Mon Sep 17 00:00:00 2001 From: bobo1on1 Date: Sun, 10 Oct 2010 16:38:44 +0000 Subject: 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 --- xbmc/Application.cpp | 3 ++- 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 lock(m_sharedSection); if (m_bReconfigured) { + CRetakeLock lock(m_sharedSection); if (g_graphicsContext.IsFullScreenVideo() && g_graphicsContext.IsFullScreenRoot()) { RESOLUTION res = GetResolution(); -- cgit v1.2.3