Skip to content

Commit

Permalink
drop method RenderNoPresent, it only has a singel function call
Browse files Browse the repository at this point in the history
  • Loading branch information
FernetMenta authored and popcornmix committed Dec 28, 2015
1 parent 1d3832d commit aca7cab
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 25 deletions.
25 changes: 3 additions & 22 deletions xbmc/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1850,22 +1850,6 @@ bool CApplication::LoadUserWindows()
return true;
}

bool CApplication::RenderNoPresent()
{
MEASURE_FUNCTION;

// DXMERGE: This may have been important?
// g_graphicsContext.AcquireCurrentContext();

g_graphicsContext.Lock();

bool hasRendered = g_windowManager.Render();

g_graphicsContext.Unlock();

return hasRendered;
}

float CApplication::GetDimScreenSaverLevel() const
{
if (!m_bScreenSave || !m_screenSaver ||
Expand Down Expand Up @@ -1963,21 +1947,18 @@ void CApplication::Render()
if (g_graphicsContext.GetStereoMode())
{
g_graphicsContext.SetStereoView(RENDER_STEREO_VIEW_LEFT);
if (RenderNoPresent())
hasRendered = true;
hasRendered |= g_windowManager.Render();

if (g_graphicsContext.GetStereoMode() != RENDER_STEREO_MODE_MONO)
{
g_graphicsContext.SetStereoView(RENDER_STEREO_VIEW_RIGHT);
if (RenderNoPresent())
hasRendered = true;
hasRendered |= g_windowManager.Render();
}
g_graphicsContext.SetStereoView(RENDER_STEREO_VIEW_OFF);
}
else
{
if (RenderNoPresent())
hasRendered = true;
hasRendered |= g_windowManager.Render();
}
// execute post rendering actions (finalize window closing)
g_windowManager.AfterRender();
Expand Down
1 change: 0 additions & 1 deletion xbmc/Application.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ class CApplication : public CXBApplicationEx, public IPlayerCallback, public IMs
virtual bool Initialize() override;
virtual void FrameMove(bool processEvents, bool processGUI = true) override;
virtual void Render() override;
virtual bool RenderNoPresent();
virtual void Preflight();
virtual bool Create() override;
virtual bool Cleanup() override;
Expand Down
5 changes: 3 additions & 2 deletions xbmc/utils/Screenshot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

#include "filesystem/File.h"
#include "guilib/GraphicContext.h"
#include "guilib/GUIWindowManager.h"

#include "utils/JobManager.h"
#include "utils/URIUtils.h"
Expand Down Expand Up @@ -77,7 +78,7 @@ bool CScreenshotSurface::capture()
#elif defined(HAS_DX)
g_graphicsContext.Lock();

g_application.RenderNoPresent();
g_windowManager.Render();
g_Windowing.FinishCommandList();

ID3D11DeviceContext* pImdContext = g_Windowing.GetImmediateContext();
Expand Down Expand Up @@ -133,7 +134,7 @@ bool CScreenshotSurface::capture()
#elif defined(HAS_GL) || defined(HAS_GLES)

g_graphicsContext.BeginPaint();
g_application.RenderNoPresent();
g_windowManager.Render();
#ifndef HAS_GLES
glReadBuffer(GL_BACK);
#endif
Expand Down

0 comments on commit aca7cab

Please sign in to comment.