Commit 8f5cc410 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

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

This reverts commit 0069d881.

Unfortunately, 0069d881 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.
parent 0069d881
...@@ -426,6 +426,7 @@ QList<SurfaceInterface *> SurfaceInterface::surfaces() ...@@ -426,6 +426,7 @@ QList<SurfaceInterface *> SurfaceInterface::surfaces()
void SurfaceInterface::frameRendered(quint32 msec) void SurfaceInterface::frameRendered(quint32 msec)
{ {
// notify all callbacks // notify all callbacks
const bool needsFlush = !d->current.frameCallbacks.isEmpty();
while (!d->current.frameCallbacks.isEmpty()) { while (!d->current.frameCallbacks.isEmpty()) {
KWaylandFrameCallback *frameCallback = d->current.frameCallbacks.takeFirst(); KWaylandFrameCallback *frameCallback = d->current.frameCallbacks.takeFirst();
frameCallback->send_done(msec); frameCallback->send_done(msec);
...@@ -438,6 +439,9 @@ void SurfaceInterface::frameRendered(quint32 msec) ...@@ -438,6 +439,9 @@ void SurfaceInterface::frameRendered(quint32 msec)
} }
subSurface->d_func()->surface->frameRendered(msec); subSurface->d_func()->surface->frameRendered(msec);
} }
if (needsFlush) {
client()->flush();
}
} }
QMatrix4x4 SurfaceInterfacePrivate::buildSurfaceToBufferMatrix(const State *state) QMatrix4x4 SurfaceInterfacePrivate::buildSurfaceToBufferMatrix(const State *state)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment