RenderQueues of RenderView
authorPaul Lemire <paul.lemire@kdab.com>
Tue, 1 Apr 2014 08:12:16 +0000 (10:12 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Sat, 19 Apr 2014 11:56:10 +0000 (13:56 +0200)
commit5062273a2fd313301cf9c6796b2cb176a66e5f80
treeb47467125fccee9a4eaa40d6f726dc9d7307f49a
parentd26c40d62656f804b6b35ef3b3e945b2917f3f92
RenderQueues of RenderView

RenderQueues class uses a QBounderCircularBuffer to store computed
RenderViews of a subset of the following few frames. This allows
for RenderViewJobs to compute future frames while the current frame
is being rendered. In case the RenderView submission takes too long,
the RenderView jobs will eventually be locked to allow the Renderer
to catch up and not miss any important state change.

This implementation tries to minimize the time needed to synchronize
the job threads with the rendering thread while providing thread safe
access to the queues if used correctly.

In RenderThread, the exec loop is replaced by a rendering loop and
the RenderQueue has been properly added to the Renderer.

Change-Id: I44f1f4065cdc7f39a8957a26114a905ea437834b
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
14 files changed:
src/render/backend/jobs/renderviewjob.cpp
src/render/backend/jobs/renderviewjob.h
src/render/backend/render-backend.pri
src/render/backend/renderer.cpp
src/render/backend/renderer.h
src/render/backend/renderqueues.cpp [new file with mode: 0644]
src/render/backend/renderqueues.h [new file with mode: 0644]
src/render/backend/renderthread.cpp
src/render/backend/renderthread.h
src/render/backend/renderview.cpp
src/render/backend/renderview.h
tests/auto/render/render.pro
tests/auto/render/renderqueues/renderqueues.pro [new file with mode: 0644]
tests/auto/render/renderqueues/tst_renderqueues.cpp [new file with mode: 0644]