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
wilder/Plasma/6.2
Xaver Hugl 2 years ago
parent 56fc8f83ac
commit d4a3d6689e
  1. 2
      src/backends/drm/drm_commit_thread.cpp

@ -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) {

Loading…
Cancel
Save