Skip to content

Commit

Permalink
Revert "ActiveAE: Enable display lost callbacks for EGL"
Browse files Browse the repository at this point in the history
This reverts commit 00d0828.
  • Loading branch information
popcornmix committed Jan 31, 2016
1 parent b74df44 commit 19e22cf
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 31 deletions.
4 changes: 4 additions & 0 deletions xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,9 @@ CActiveAE::~CActiveAE()

void CActiveAE::Dispose()
{
#if defined(HAS_GLX) || defined(TARGET_DARWIN)
g_Windowing.Unregister(this);
#endif

m_bStop = true;
m_outMsgEvent.Set();
Expand Down Expand Up @@ -2613,7 +2615,9 @@ bool CActiveAE::Initialize()
}

// hook into windowing for receiving display reset events
#if defined(HAS_GLX) || defined(TARGET_DARWIN)
g_Windowing.Register(this);
#endif

m_inMsgEvent.Reset();
return true;
Expand Down
4 changes: 4 additions & 0 deletions xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,11 @@ class CEngineStats
std::vector<StreamStats> m_streamStats;
};

#if defined(HAS_GLX) || defined(TARGET_DARWIN)
class CActiveAE : public IAE, public IDispResource, private CThread
#else
class CActiveAE : public IAE, private CThread
#endif
{
protected:
friend class ::CAEFactory;
Expand Down
32 changes: 4 additions & 28 deletions xbmc/windowing/egl/WinSystemEGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ CWinSystemEGL::CWinSystemEGL() : CWinSystemBase()

m_egl = NULL;
m_iVSyncMode = 0;
m_delayDispReset = false;
}

CWinSystemEGL::~CWinSystemEGL()
Expand Down Expand Up @@ -287,18 +286,6 @@ bool CWinSystemEGL::CreateNewWindow(const std::string& name, bool fullScreen, RE
return true;
}

int delay = CSettings::GetInstance().GetInt("videoscreen.delayrefreshchange");
if (delay > 0)
{
m_delayDispReset = true;
m_dispResetTimer.Set(delay * 100);
}

{ CSingleLock lock(m_resourceSection);
for (std::vector<IDispResource *>::iterator i = m_resources.begin(); i != m_resources.end(); ++i)
(*i)->OnLostDisplay();
}

m_stereo_mode = stereo_mode;
m_bFullScreen = fullScreen;
// Destroy any existing window
Expand All @@ -314,13 +301,10 @@ bool CWinSystemEGL::CreateNewWindow(const std::string& name, bool fullScreen, RE
}
Show();

if (!m_delayDispReset)
{
CSingleLock lock(m_resourceSection);
// tell any shared resources
for (std::vector<IDispResource *>::iterator i = m_resources.begin(); i != m_resources.end(); ++i)
(*i)->OnResetDisplay();
}
CSingleLock lock(m_resourceSection);
// tell any shared resources
for (std::vector<IDispResource *>::iterator i = m_resources.begin(); i != m_resources.end(); ++i)
(*i)->OnResetDisplay();

return true;
}
Expand Down Expand Up @@ -459,14 +443,6 @@ bool CWinSystemEGL::IsExtSupported(const char* extension)

bool CWinSystemEGL::PresentRenderImpl(const CDirtyRegionList &dirty)
{
if (m_delayDispReset && m_dispResetTimer.IsTimePast())
{
m_delayDispReset = false;
CSingleLock lock(m_resourceSection);
// tell any shared resources
for (std::vector<IDispResource *>::iterator i = m_resources.begin(); i != m_resources.end(); ++i)
(*i)->OnResetDisplay();
}
m_egl->SwapBuffers(m_display, m_surface);
return true;
}
Expand Down
3 changes: 0 additions & 3 deletions xbmc/windowing/egl/WinSystemEGL.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "utils/GlobalsHandling.h"
#include <EGL/egl.h>
#include "windowing/WinSystem.h"
#include "threads/SystemClock.h"

class CEGLWrapper;
class IDispResource;
Expand Down Expand Up @@ -85,8 +84,6 @@ class CWinSystemEGL : public CWinSystemBase, public CRenderSystemGLES
std::string m_extensions;
CCriticalSection m_resourceSection;
std::vector<IDispResource*> m_resources;
bool m_delayDispReset;
XbmcThreads::EndTime m_dispResetTimer;
};

XBMC_GLOBAL_REF(CWinSystemEGL,g_Windowing);
Expand Down

0 comments on commit 19e22cf

Please sign in to comment.