Skip to content

Commit

Permalink
Fix onDemand rendering idle loop CPU burning
Browse files Browse the repository at this point in the history
Sleep render aspect if there are no jobs to create.

Task-number: QTBUG-55109
Change-Id: I52ce90ab781d6986321ae0cd72a14cca09098180
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mika Salmela <mika.salmela@qt.io>
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
  • Loading branch information
Janne Koskinen authored and Janne Koskinen committed Feb 6, 2017
1 parent 5cdfef0 commit f865508
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/render/frontend/qrenderaspect.cpp
Expand Up @@ -371,6 +371,7 @@ QVector<Qt3DCore::QAspectJobPtr> QRenderAspect::jobsToExecute(qint64 time)
// don't spawn any jobs, if the renderer decides to skip this frame
if (!d->m_renderer->shouldRender()) {
d->m_renderer->skipNextFrame();
QThread::msleep(1);
return jobs;
}

Expand Down

0 comments on commit f865508

Please sign in to comment.