Revert "Reset buffer swap state on stop"
This reverts commit ba2c0324d2
.
See: https://mail.kde.org/pipermail/kwin/2020-January/002999.html
This commit is contained in:
parent
2dabd0b112
commit
63898fc569
1 changed files with 6 additions and 5 deletions
|
@ -404,7 +404,7 @@ void Compositor::scheduleRepaint()
|
|||
// in AnimationEffect::postPaintScreen. Why?
|
||||
// Theory is that effects call addRepaintFull in there and then performCompositing
|
||||
// is called again while still in the first paint. So queing it here makes sense!
|
||||
compositeTimer.start(0, this);
|
||||
QTimer::singleShot(0, this, [this]() { performCompositing(); });
|
||||
} else {
|
||||
setCompositeTimer();
|
||||
}
|
||||
|
@ -471,8 +471,6 @@ void Compositor::stop()
|
|||
|
||||
delete m_scene;
|
||||
m_scene = nullptr;
|
||||
m_bufferSwapPending = false;
|
||||
m_composeAtSwapCompletion = false;
|
||||
compositeTimer.stop();
|
||||
repaints_region = QRegion();
|
||||
|
||||
|
@ -741,8 +739,11 @@ void Compositor::performCompositing()
|
|||
// is called the next time. If there would be nothing pending, it will not restart the timer and
|
||||
// scheduleRepaint() would restart it again somewhen later, called from functions that
|
||||
// would again add something pending.
|
||||
Q_ASSERT(!m_bufferSwapPending);
|
||||
scheduleRepaint();
|
||||
if (m_bufferSwapPending) {
|
||||
m_composeAtSwapCompletion = true;
|
||||
} else {
|
||||
scheduleRepaint();
|
||||
}
|
||||
}
|
||||
|
||||
template <class T>
|
||||
|
|
Loading…
Reference in a new issue