mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
kodi: move PR6090 out of projects folder
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
@@ -1,99 +0,0 @@
|
||||
From 9ed9dcc8a30bbaf9e23dd8a738ec33824e9f7503 Mon Sep 17 00:00:00 2001
|
||||
From: Rainer Hochecker <fernetmenta@online.de>
|
||||
Date: Fri, 2 Jan 2015 10:02:09 +0100
|
||||
Subject: [PATCH 01/16] renderer: drop old tempfix firstflippage, did not work
|
||||
anyway because RendererHandlesPresent returned always true
|
||||
|
||||
---
|
||||
xbmc/Application.cpp | 2 +-
|
||||
xbmc/cores/VideoRenderers/RenderManager.cpp | 9 ---------
|
||||
xbmc/cores/VideoRenderers/RenderManager.h | 5 -----
|
||||
xbmc/guilib/GUIVideoControl.cpp | 3 +--
|
||||
4 files changed, 2 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
|
||||
index 5425322..69760da 100644
|
||||
--- a/xbmc/Application.cpp
|
||||
+++ b/xbmc/Application.cpp
|
||||
@@ -2227,7 +2227,7 @@ void CApplication::Render()
|
||||
bool extPlayerActive = m_pPlayer->GetCurrentPlayer() == EPC_EXTPLAYER && m_pPlayer->IsPlaying() && !m_AppFocused;
|
||||
|
||||
m_bPresentFrame = false;
|
||||
- if (!extPlayerActive && g_graphicsContext.IsFullScreenVideo() && !m_pPlayer->IsPausedPlayback() && g_renderManager.RendererHandlesPresent())
|
||||
+ if (!extPlayerActive && g_graphicsContext.IsFullScreenVideo() && !m_pPlayer->IsPausedPlayback())
|
||||
{
|
||||
m_bPresentFrame = g_renderManager.FrameWait(100);
|
||||
hasRendered = true;
|
||||
diff --git a/xbmc/cores/VideoRenderers/RenderManager.cpp b/xbmc/cores/VideoRenderers/RenderManager.cpp
|
||||
index b31f3c9..ab894ba 100644
|
||||
--- a/xbmc/cores/VideoRenderers/RenderManager.cpp
|
||||
+++ b/xbmc/cores/VideoRenderers/RenderManager.cpp
|
||||
@@ -293,19 +293,12 @@ bool CXBMCRenderManager::Configure(unsigned int width, unsigned int height, unsi
|
||||
m_sleeptime = 1.0;
|
||||
m_presentevent.notifyAll();
|
||||
|
||||
- m_firstFlipPage = false; // tempfix
|
||||
-
|
||||
CLog::Log(LOGDEBUG, "CXBMCRenderManager::Configure - %d", m_QueueSize);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
-bool CXBMCRenderManager::RendererHandlesPresent() const
|
||||
-{
|
||||
- return IsConfigured() && (m_firstFlipPage || m_format != RENDER_FMT_BYPASS);
|
||||
-}
|
||||
-
|
||||
bool CXBMCRenderManager::IsConfigured() const
|
||||
{
|
||||
if (!m_pRenderer)
|
||||
@@ -661,8 +654,6 @@ void CXBMCRenderManager::FlipPage(volatile bool& bStop, double timestamp /* = 0L
|
||||
|
||||
if(!m_pRenderer) return;
|
||||
|
||||
- m_firstFlipPage = true; // tempfix
|
||||
-
|
||||
EPRESENTMETHOD presentmethod;
|
||||
|
||||
EDEINTERLACEMODE deinterlacemode = CMediaSettings::Get().GetCurrentVideoSettings().m_DeinterlaceMode;
|
||||
diff --git a/xbmc/cores/VideoRenderers/RenderManager.h b/xbmc/cores/VideoRenderers/RenderManager.h
|
||||
index d3c2f1d..1086066 100644
|
||||
--- a/xbmc/cores/VideoRenderers/RenderManager.h
|
||||
+++ b/xbmc/cores/VideoRenderers/RenderManager.h
|
||||
@@ -143,8 +143,6 @@ public:
|
||||
|
||||
void UpdateResolution();
|
||||
|
||||
- bool RendererHandlesPresent() const;
|
||||
-
|
||||
#ifdef HAS_GL
|
||||
CLinuxRendererGL *m_pRenderer;
|
||||
#elif defined(HAS_MMAL)
|
||||
@@ -267,9 +265,6 @@ protected:
|
||||
//set to true when adding something to m_captures, set to false when m_captures is made empty
|
||||
//std::list::empty() isn't thread safe, using an extra bool will save a lock per render when no captures are requested
|
||||
bool m_hasCaptures;
|
||||
-
|
||||
- // temporary fix for RendererHandlesPresent after #2811
|
||||
- bool m_firstFlipPage;
|
||||
};
|
||||
|
||||
extern CXBMCRenderManager g_renderManager;
|
||||
diff --git a/xbmc/guilib/GUIVideoControl.cpp b/xbmc/guilib/GUIVideoControl.cpp
|
||||
index 22d0fc8..c47a6d5 100644
|
||||
--- a/xbmc/guilib/GUIVideoControl.cpp
|
||||
+++ b/xbmc/guilib/GUIVideoControl.cpp
|
||||
@@ -43,8 +43,7 @@ CGUIVideoControl::~CGUIVideoControl(void)
|
||||
void CGUIVideoControl::Process(unsigned int currentTime, CDirtyRegionList &dirtyregions)
|
||||
{
|
||||
// TODO Proper processing which marks when its actually changed. Just mark always for now.
|
||||
- if (g_renderManager.RendererHandlesPresent())
|
||||
- MarkDirtyRegion();
|
||||
+ MarkDirtyRegion();
|
||||
|
||||
CGUIControl::Process(currentTime, dirtyregions);
|
||||
}
|
||||
--
|
||||
1.9.3
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
From 5c961dd12ad9e7949777e7140636c173924b3523 Mon Sep 17 00:00:00 2001
|
||||
From: smallint <tahoma@gmx.de>
|
||||
Date: Fri, 2 Jan 2015 15:35:33 +0000
|
||||
Subject: [PATCH 02/16] Set dirty flag in teletext dialog if required
|
||||
|
||||
---
|
||||
xbmc/video/dialogs/GUIDialogTeletext.cpp | 19 +++++++++++++++++++
|
||||
xbmc/video/dialogs/GUIDialogTeletext.h | 1 +
|
||||
2 files changed, 20 insertions(+)
|
||||
|
||||
diff --git a/xbmc/video/dialogs/GUIDialogTeletext.cpp b/xbmc/video/dialogs/GUIDialogTeletext.cpp
|
||||
index c552ae6..9be4548 100644
|
||||
--- a/xbmc/video/dialogs/GUIDialogTeletext.cpp
|
||||
+++ b/xbmc/video/dialogs/GUIDialogTeletext.cpp
|
||||
@@ -46,7 +46,10 @@ CGUIDialogTeletext::~CGUIDialogTeletext()
|
||||
bool CGUIDialogTeletext::OnAction(const CAction& action)
|
||||
{
|
||||
if (m_TextDecoder.HandleAction(action))
|
||||
+ {
|
||||
+ MarkDirtyRegion();
|
||||
return true;
|
||||
+ }
|
||||
|
||||
return CGUIDialog::OnAction(action);
|
||||
}
|
||||
@@ -54,6 +57,7 @@ bool CGUIDialogTeletext::OnAction(const CAction& action)
|
||||
bool CGUIDialogTeletext::OnBack(int actionID)
|
||||
{
|
||||
m_bClose = true;
|
||||
+ MarkDirtyRegion();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -79,6 +83,12 @@ bool CGUIDialogTeletext::OnMessage(CGUIMessage& message)
|
||||
return CGUIDialog::OnMessage(message);
|
||||
}
|
||||
|
||||
+void CGUIDialogTeletext::Process(unsigned int currentTime, CDirtyRegionList &dirtyregions)
|
||||
+{
|
||||
+ CGUIDialog::Process(currentTime, dirtyregions);
|
||||
+ m_renderRegion = m_vertCoords;
|
||||
+}
|
||||
+
|
||||
void CGUIDialogTeletext::Render()
|
||||
{
|
||||
// Do not render if we have no texture
|
||||
@@ -93,12 +103,18 @@ void CGUIDialogTeletext::Render()
|
||||
if (!m_bClose)
|
||||
{
|
||||
if (teletextFadeAmount < 100)
|
||||
+ {
|
||||
teletextFadeAmount = std::min(100, teletextFadeAmount + 5);
|
||||
+ MarkDirtyRegion();
|
||||
+ }
|
||||
}
|
||||
else
|
||||
{
|
||||
if (teletextFadeAmount > 0)
|
||||
+ {
|
||||
teletextFadeAmount = std::max(0, teletextFadeAmount - 10);
|
||||
+ MarkDirtyRegion();
|
||||
+ }
|
||||
|
||||
if (teletextFadeAmount == 0)
|
||||
Close();
|
||||
@@ -109,6 +125,7 @@ void CGUIDialogTeletext::Render()
|
||||
{
|
||||
m_pTxtTexture->Update(m_TextDecoder.GetWidth(), m_TextDecoder.GetHeight(), m_TextDecoder.GetWidth()*4, XB_FMT_A8R8G8B8, textureBuffer, false);
|
||||
m_TextDecoder.RenderingDone();
|
||||
+ MarkDirtyRegion();
|
||||
}
|
||||
|
||||
color_t color = ((color_t)(teletextFadeAmount * 2.55f) & 0xff) << 24 | 0xFFFFFF;
|
||||
@@ -184,4 +201,6 @@ void CGUIDialogTeletext::SetCoordinates()
|
||||
top,
|
||||
right,
|
||||
bottom);
|
||||
+
|
||||
+ MarkDirtyRegion();
|
||||
}
|
||||
diff --git a/xbmc/video/dialogs/GUIDialogTeletext.h b/xbmc/video/dialogs/GUIDialogTeletext.h
|
||||
index 51aced5..e8e11f8 100644
|
||||
--- a/xbmc/video/dialogs/GUIDialogTeletext.h
|
||||
+++ b/xbmc/video/dialogs/GUIDialogTeletext.h
|
||||
@@ -32,6 +32,7 @@ public:
|
||||
virtual bool OnMessage(CGUIMessage& message);
|
||||
virtual bool OnAction(const CAction& action);
|
||||
virtual bool OnBack(int actionID);
|
||||
+ virtual void Process(unsigned int currentTime, CDirtyRegionList &dirtyregions);
|
||||
virtual void Render();
|
||||
virtual void OnInitWindow();
|
||||
virtual void OnDeinitWindow(int nextWindowID);
|
||||
--
|
||||
1.9.3
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,25 +0,0 @@
|
||||
From 0eebba44430bb98521d9ff22478a0893869bda03 Mon Sep 17 00:00:00 2001
|
||||
From: Rainer Hochecker <fernetmenta@online.de>
|
||||
Date: Mon, 5 Jan 2015 11:29:15 +0100
|
||||
Subject: [PATCH 04/16] guilib: mark control dirty when setting to invisible
|
||||
|
||||
---
|
||||
xbmc/guilib/GUIControl.cpp | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/xbmc/guilib/GUIControl.cpp b/xbmc/guilib/GUIControl.cpp
|
||||
index e3d04db..ff2086b 100644
|
||||
--- a/xbmc/guilib/GUIControl.cpp
|
||||
+++ b/xbmc/guilib/GUIControl.cpp
|
||||
@@ -511,6 +511,8 @@ void CGUIControl::SetVisible(bool bVisible, bool setVisState)
|
||||
{
|
||||
m_forceHidden = !bVisible;
|
||||
SetInvalid();
|
||||
+ if (m_forceHidden)
|
||||
+ MarkDirtyRegion();
|
||||
}
|
||||
if (m_forceHidden)
|
||||
{ // reset any visible animations that are in process
|
||||
--
|
||||
1.9.3
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
From 0d91676f4100a43304702c76d737e05cc665cca5 Mon Sep 17 00:00:00 2001
|
||||
From: Rainer Hochecker <fernetmenta@online.de>
|
||||
Date: Tue, 6 Jan 2015 13:13:27 +0100
|
||||
Subject: [PATCH 05/16] renderer: exit gfx lock when waiting for present time
|
||||
|
||||
---
|
||||
xbmc/cores/VideoRenderers/RenderManager.cpp | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/xbmc/cores/VideoRenderers/RenderManager.cpp b/xbmc/cores/VideoRenderers/RenderManager.cpp
|
||||
index 63bbdcc..b394d7b 100644
|
||||
--- a/xbmc/cores/VideoRenderers/RenderManager.cpp
|
||||
+++ b/xbmc/cores/VideoRenderers/RenderManager.cpp
|
||||
@@ -381,7 +381,10 @@ void CXBMCRenderManager::FrameFinish()
|
||||
SPresent& m = m_Queue[m_presentsource];
|
||||
|
||||
if(g_graphicsContext.IsFullScreenVideo())
|
||||
+ {
|
||||
+ CSingleExit lock(g_graphicsContext);
|
||||
WaitPresentTime(m.timestamp);
|
||||
+ }
|
||||
|
||||
m_clock_framefinish = GetPresentTime();
|
||||
|
||||
--
|
||||
1.9.3
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
From 0607a56a5f0eb916d2c27613bcd8db7d3c357aee Mon Sep 17 00:00:00 2001
|
||||
From: Rainer Hochecker <fernetmenta@online.de>
|
||||
Date: Fri, 23 Jan 2015 07:41:46 +0100
|
||||
Subject: [PATCH 06/16] renderer: fix sequence from WaitFrame, Render,
|
||||
FrameMove to WaitFrame, FrameMove, Render
|
||||
|
||||
---
|
||||
xbmc/Application.cpp | 12 +++++++++---
|
||||
xbmc/cores/VideoRenderers/RenderManager.cpp | 12 ++++++++++--
|
||||
xbmc/cores/VideoRenderers/RenderManager.h | 3 ++-
|
||||
3 files changed, 21 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
|
||||
index bc33a79..a79c7dd 100644
|
||||
--- a/xbmc/Application.cpp
|
||||
+++ b/xbmc/Application.cpp
|
||||
@@ -2217,16 +2217,17 @@ void CApplication::Render()
|
||||
bool limitFrames = false;
|
||||
unsigned int singleFrameTime = 10; // default limit 100 fps
|
||||
|
||||
+ // Whether externalplayer is playing and we're unfocused
|
||||
+ bool extPlayerActive = m_pPlayer->GetCurrentPlayer() == EPC_EXTPLAYER && m_pPlayer->IsPlaying() && !m_AppFocused;
|
||||
+
|
||||
{
|
||||
// Less fps in DPMS
|
||||
bool lowfps = m_dpmsIsActive || g_Windowing.EnableFrameLimiter();
|
||||
- // Whether externalplayer is playing and we're unfocused
|
||||
- bool extPlayerActive = m_pPlayer->GetCurrentPlayer() == EPC_EXTPLAYER && m_pPlayer->IsPlaying() && !m_AppFocused;
|
||||
|
||||
m_bPresentFrame = false;
|
||||
if (!extPlayerActive && g_graphicsContext.IsFullScreenVideo() && !m_pPlayer->IsPausedPlayback())
|
||||
{
|
||||
- m_bPresentFrame = g_renderManager.FrameWait(100);
|
||||
+ m_bPresentFrame = g_renderManager.HasFrame();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2327,6 +2328,11 @@ void CApplication::Render()
|
||||
if (flip)
|
||||
g_graphicsContext.Flip(dirtyRegions);
|
||||
|
||||
+ if (!extPlayerActive && g_graphicsContext.IsFullScreenVideo() && !m_pPlayer->IsPausedPlayback())
|
||||
+ {
|
||||
+ g_renderManager.FrameWait(100);
|
||||
+ }
|
||||
+
|
||||
m_lastFrameTime = XbmcThreads::SystemClockMillis();
|
||||
CTimeUtils::UpdateFrameTime(flip);
|
||||
|
||||
diff --git a/xbmc/cores/VideoRenderers/RenderManager.cpp b/xbmc/cores/VideoRenderers/RenderManager.cpp
|
||||
index b394d7b..36c2842 100644
|
||||
--- a/xbmc/cores/VideoRenderers/RenderManager.cpp
|
||||
+++ b/xbmc/cores/VideoRenderers/RenderManager.cpp
|
||||
@@ -316,13 +316,21 @@ void CXBMCRenderManager::Update()
|
||||
m_pRenderer->Update();
|
||||
}
|
||||
|
||||
-bool CXBMCRenderManager::FrameWait(int ms)
|
||||
+void CXBMCRenderManager::FrameWait(int ms)
|
||||
{
|
||||
XbmcThreads::EndTime timeout(ms);
|
||||
CSingleLock lock(m_presentlock);
|
||||
while(m_presentstep == PRESENT_IDLE && !timeout.IsTimePast())
|
||||
m_presentevent.wait(lock, timeout.MillisLeft());
|
||||
- return m_presentstep != PRESENT_IDLE;
|
||||
+}
|
||||
+
|
||||
+bool CXBMCRenderManager::HasFrame()
|
||||
+{
|
||||
+ CSingleLock lock(m_presentlock);
|
||||
+ if (m_presentstep == PRESENT_FRAME || m_presentstep == PRESENT_FRAME2)
|
||||
+ return true;
|
||||
+ else
|
||||
+ return false;
|
||||
}
|
||||
|
||||
void CXBMCRenderManager::FrameMove()
|
||||
diff --git a/xbmc/cores/VideoRenderers/RenderManager.h b/xbmc/cores/VideoRenderers/RenderManager.h
|
||||
index 7280423..b80319a 100644
|
||||
--- a/xbmc/cores/VideoRenderers/RenderManager.h
|
||||
+++ b/xbmc/cores/VideoRenderers/RenderManager.h
|
||||
@@ -59,7 +59,8 @@ public:
|
||||
void Update();
|
||||
void FrameMove();
|
||||
void FrameFinish();
|
||||
- bool FrameWait(int ms);
|
||||
+ void FrameWait(int ms);
|
||||
+ bool HasFrame();
|
||||
void Render(bool clear, DWORD flags = 0, DWORD alpha = 255, bool gui = true);
|
||||
bool IsGuiLayer();
|
||||
bool IsVideoLayer();
|
||||
--
|
||||
1.9.3
|
||||
|
||||
Reference in New Issue
Block a user