Navigation Menu

Skip to content

Commit

Permalink
make sure not to hold gfx lock while rendering gui and video
Browse files Browse the repository at this point in the history
  • Loading branch information
FernetMenta authored and popcornmix committed Dec 27, 2015
1 parent fa9a4ec commit 9ef475c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
4 changes: 0 additions & 4 deletions xbmc/Application.cpp
Expand Up @@ -1921,8 +1921,6 @@ void CApplication::Render()
}
}

CSingleLock lock(g_graphicsContext);

if (g_graphicsContext.IsFullScreenVideo() && m_pPlayer->IsPlaying() && vsync_mode == VSYNC_VIDEO)
g_Windowing.SetVSync(true);
else if (vsync_mode == VSYNC_ALWAYS)
Expand Down Expand Up @@ -1983,8 +1981,6 @@ void CApplication::Render()
m_lastRenderTime = now;
}

lock.Leave();

if (g_graphicsContext.IsFullScreenVideo())
{
g_Windowing.FinishPipeline();
Expand Down
5 changes: 2 additions & 3 deletions xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.cpp
Expand Up @@ -1045,6 +1045,8 @@ float CRenderManager::GetMaximumFPS()

void CRenderManager::Render(bool clear, DWORD flags, DWORD alpha, bool gui)
{
CSingleExit exitLock(g_graphicsContext);

CSharedLock lock(m_sharedSection);

if (m_renderState != STATE_CONFIGURED)
Expand Down Expand Up @@ -1105,7 +1107,6 @@ bool CRenderManager::IsVideoLayer()
/* simple present method */
void CRenderManager::PresentSingle(bool clear, DWORD flags, DWORD alpha)
{
CSingleLock lock(g_graphicsContext);
SPresent& m = m_Queue[m_presentsource];

if (m.presentfield == FS_BOT)
Expand All @@ -1120,7 +1121,6 @@ void CRenderManager::PresentSingle(bool clear, DWORD flags, DWORD alpha)
* we just render the two fields right after eachother */
void CRenderManager::PresentFields(bool clear, DWORD flags, DWORD alpha)
{
CSingleLock lock(g_graphicsContext);
SPresent& m = m_Queue[m_presentsource];

if(m_presentstep == PRESENT_FRAME)
Expand All @@ -1141,7 +1141,6 @@ void CRenderManager::PresentFields(bool clear, DWORD flags, DWORD alpha)

void CRenderManager::PresentBlend(bool clear, DWORD flags, DWORD alpha)
{
CSingleLock lock(g_graphicsContext);
SPresent& m = m_Queue[m_presentsource];

if( m.presentfield == FS_BOT )
Expand Down
2 changes: 1 addition & 1 deletion xbmc/guilib/GUIWindowManager.cpp
Expand Up @@ -1060,7 +1060,7 @@ void CGUIWindowManager::RenderEx() const
bool CGUIWindowManager::Render()
{
assert(g_application.IsCurrentThread());
CSingleLock lock(g_graphicsContext);
CSingleExit lock(g_graphicsContext);

CDirtyRegionList dirtyRegions = m_tracker.GetDirtyRegions();

Expand Down

0 comments on commit 9ef475c

Please sign in to comment.