aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbobo1on1 <bob-nospam-@xbmc.org>2012-11-12 01:44:35 +0100
committerbobo1on1 <bob-nospam-@xbmc.org>2012-11-12 01:44:49 +0100
commite198a2675d9695935dc5179bce25634e67f075e1 (patch)
tree0fc3089860d2995716f1185dabcf027afafe8b3a
parentd2ecc7c798d86782fe6e1794808997a5595b6690 (diff)
fixed: when rendering a capture on the GL backbuffer, mark the region as dirty, prevents the capture from showing up
-rw-r--r--xbmc/cores/VideoRenderers/BaseRenderer.cpp7
-rw-r--r--xbmc/cores/VideoRenderers/BaseRenderer.h1
-rw-r--r--xbmc/cores/VideoRenderers/LinuxRendererGL.cpp1
-rw-r--r--xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp1
-rw-r--r--xbmc/guilib/GUIWindowManager.cpp5
-rw-r--r--xbmc/guilib/GUIWindowManager.h4
6 files changed, 19 insertions, 0 deletions
diff --git a/xbmc/cores/VideoRenderers/BaseRenderer.cpp b/xbmc/cores/VideoRenderers/BaseRenderer.cpp
index 1e06436b18..68602333d6 100644
--- a/xbmc/cores/VideoRenderers/BaseRenderer.cpp
+++ b/xbmc/cores/VideoRenderers/BaseRenderer.cpp
@@ -25,6 +25,7 @@
#include "settings/Settings.h"
#include "settings/GUISettings.h"
#include "guilib/GraphicContext.h"
+#include "guilib/GUIWindowManager.h"
#include "utils/log.h"
#include "utils/MathUtils.h"
#include "settings/AdvancedSettings.h"
@@ -693,3 +694,9 @@ void CBaseRenderer::SetViewMode(int viewMode)
g_settings.m_currentVideoSettings.m_CustomNonLinStretch = g_settings.m_bNonLinStretch;
g_settings.m_currentVideoSettings.m_CustomVerticalShift = g_settings.m_fVerticalShift;
}
+
+void CBaseRenderer::MarkDirty()
+{
+ g_windowManager.MarkDirty(m_destRect);
+}
+
diff --git a/xbmc/cores/VideoRenderers/BaseRenderer.h b/xbmc/cores/VideoRenderers/BaseRenderer.h
index fdd0ad458d..81d21d8604 100644
--- a/xbmc/cores/VideoRenderers/BaseRenderer.h
+++ b/xbmc/cores/VideoRenderers/BaseRenderer.h
@@ -106,6 +106,7 @@ protected:
void saveRotatedCoords();//saves the current state of m_rotatedDestCoords
void syncDestRectToRotatedPoints();//sync any changes of m_destRect to m_rotatedDestCoords
void restoreRotatedCoords();//restore the current state of m_rotatedDestCoords from saveRotatedCoords
+ void MarkDirty();
RESOLUTION m_resolution; // the resolution we're running in
unsigned int m_sourceWidth;
diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
index 3150b27666..77b74954d9 100644
--- a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
+++ b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
@@ -1745,6 +1745,7 @@ bool CLinuxRendererGL::RenderCapture(CRenderCapture* capture)
// new video rect is capture size
m_destRect.SetRect(0, 0, (float)capture->GetWidth(), (float)capture->GetHeight());
+ MarkDirty();
syncDestRectToRotatedPoints();//syncs the changed destRect to m_rotatedDestCoords
//invert Y axis to get non-inverted image
diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp b/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
index 40c91a53fd..0630f134f8 100644
--- a/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
+++ b/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
@@ -1316,6 +1316,7 @@ bool CLinuxRendererGLES::RenderCapture(CRenderCapture* capture)
// new video rect is thumbnail size
m_destRect.SetRect(0, 0, (float)capture->GetWidth(), (float)capture->GetHeight());
+ MarkDirty();
syncDestRectToRotatedPoints();//syncs the changed destRect to m_rotatedDestCoords
// clear framebuffer and invert Y axis to get non-inverted image
glDisable(GL_BLEND);
diff --git a/xbmc/guilib/GUIWindowManager.cpp b/xbmc/guilib/GUIWindowManager.cpp
index 94951b8ec8..f96c1d9175 100644
--- a/xbmc/guilib/GUIWindowManager.cpp
+++ b/xbmc/guilib/GUIWindowManager.cpp
@@ -520,6 +520,11 @@ void CGUIWindowManager::MarkDirty()
m_tracker.MarkDirtyRegion(CRect(0, 0, (float)g_graphicsContext.GetWidth(), (float)g_graphicsContext.GetHeight()));
}
+void CGUIWindowManager::MarkDirty(const CRect& rect)
+{
+ m_tracker.MarkDirtyRegion(rect);
+}
+
void CGUIWindowManager::RenderPass()
{
CGUIWindow* pWindow = GetWindow(GetActiveWindow());
diff --git a/xbmc/guilib/GUIWindowManager.h b/xbmc/guilib/GUIWindowManager.h
index 42b7766203..015e093d79 100644
--- a/xbmc/guilib/GUIWindowManager.h
+++ b/xbmc/guilib/GUIWindowManager.h
@@ -75,6 +75,10 @@ public:
*/
void MarkDirty();
+ /*! \brief Mark a region as dirty, forcing a redraw at the next Render()
+ */
+ void MarkDirty(const CRect& rect);
+
/*! \brief Get the current dirty region
*/
CDirtyRegionList GetDirty() { return m_tracker.GetDirtyRegions(); }