summaryrefslogtreecommitdiffstats
path: root/src/render/backend/renderqueue.cpp
diff options
context:
space:
mode:
authorSvenn-Arne Dragly <svenn-arne.dragly@qt.io>2018-01-22 10:42:55 +0100
committerSvenn-Arne Dragly <svenn-arne.dragly@qt.io>2018-02-02 10:20:11 +0000
commit46319648436814afb5a77755dde6681e304befaf (patch)
tree9a608913dd9be2ac99bb8e5ebf446dddd69c4c4f /src/render/backend/renderqueue.cpp
parent30abe028f9a95fa32fbb77cb60063d062e13f7ff (diff)
Keep rendering in sync with aspect jobs by adding barriers
This makes sure that jobs that depend on a specific state of the renderer (such as context being initialized) never run before this is the case. This reduces the number of possible race conditions and checks we need to do to ensure the jobs and the renderer are in the correct state. This way we no longer swap buffers when nothing has been rendered, which in turn makes sure that we only draw one frame when the render policy is OnDemand and there are no changes. This change also adds a number of assertions on pointers to resources to make it easier to detect missing job dependencies. Finally, this change overhauls the job dependencies in Renderer and RenderViewBuilder. Task-number: QTBUG-66024 Change-Id: I3e4e9dd0dd53b5c88f5c1b17d68df42f28eae794 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render/backend/renderqueue.cpp')
-rw-r--r--src/render/backend/renderqueue.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/render/backend/renderqueue.cpp b/src/render/backend/renderqueue.cpp
index 2fa1cb7d2..db75558a4 100644
--- a/src/render/backend/renderqueue.cpp
+++ b/src/render/backend/renderqueue.cpp
@@ -90,7 +90,6 @@ bool RenderQueue::queueRenderView(RenderView *renderView, uint submissionOrderIn
Q_ASSERT(!m_noRender);
m_currentWorkQueue[submissionOrderIndex] = renderView;
++m_currentRenderViewCount;
- Q_ASSERT(m_currentRenderViewCount <= m_targetRenderViewCount);
return isFrameQueueComplete();
}