backends/drm: wait for the pageflip to be done with the condition variable

...instead of busy looping, which is causing several percent CPU usage in some cases

BUG: 479126
This commit is contained in:
Xaver Hugl 2024-01-12 17:00:41 +01:00
parent 56fc8f83ac
commit d4a3d6689e

View file

@ -31,7 +31,7 @@ DrmCommitThread::DrmCommitThread(const QString &name)
return;
}
std::unique_lock lock(m_mutex);
if (m_commits.empty()) {
if (m_commits.empty() || m_committed) {
m_commitPending.wait(lock);
}
if (m_committed) {