Revert "Don't flush in SurfaceInterface::frameRendered()"

This reverts commit 3cf004b68e.

Unfortunately, 3cf004b broke a couple of tests in kwin due to Qt not
emitting QAbstractEventDispatcher::aboutToBlock() signal when macros
such as QTRY_VERIFY() or QTRY_COMPARE() spin the event loop.
This commit is contained in:
Vlad Zahorodnii 2020-08-18 13:18:58 +03:00
parent 3cf004b68e
commit a930e59fcf

View file

@ -426,6 +426,7 @@ QList<SurfaceInterface *> SurfaceInterface::surfaces()
void SurfaceInterface::frameRendered(quint32 msec)
{
// notify all callbacks
const bool needsFlush = !d->current.frameCallbacks.isEmpty();
while (!d->current.frameCallbacks.isEmpty()) {
KWaylandFrameCallback *frameCallback = d->current.frameCallbacks.takeFirst();
frameCallback->send_done(msec);
@ -438,6 +439,9 @@ void SurfaceInterface::frameRendered(quint32 msec)
}
subSurface->d_func()->surface->frameRendered(msec);
}
if (needsFlush) {
client()->flush();
}
}
QMatrix4x4 SurfaceInterfacePrivate::buildSurfaceToBufferMatrix(const State *state)