client: Drop the concept of a queued buffer before the first expose

Added in 46aece51330b6f9b5b4bfd68a5b3b183dc5b1c38 this was part of a
guard to handle clients committing before the window was configured.

Since then there has been work in ensuring expose events are delivered
to the client correctly only when the window is configured. Including  e6d55239c454d454978edb7d8b17f6c993e7ba07.

Even if a client does manually explicitly flush a paint before the first expose, we should be able to simply discard the buffer. It's part of the contract that a client should redraw contents when it gets an expose event. This is better as any queued buffer cannot be of the right size and it simplifies the code.

Pick-to: 6.8
Fixes: QTBUG-126262
Change-Id: Ia4829ca75a55819b5e8ab366baedcdf83dfc14ec
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
David Edmundson 2024-06-24 09:58:54 +01:00 committed by Eskil Abrahamsen Blomfeldt
parent dba3e364c9
commit 949bcf8712
2 changed files with 1 additions and 14 deletions

View File

@ -333,12 +333,6 @@ void QWaylandWindow::reset()
mInputRegion = QRegion();
mTransparentInputRegion = false;
if (mQueuedBuffer) {
mQueuedBuffer->setBusy(false);
}
mQueuedBuffer = nullptr;
mQueuedBufferDamage = QRegion();
mDisplay->handleWindowDestroyed(this);
}
@ -763,12 +757,7 @@ void QWaylandWindow::safeCommit(QWaylandBuffer *buffer, const QRegion &damage)
if (isExposed()) {
commit(buffer, damage);
} else {
if (mQueuedBuffer) {
mQueuedBuffer->setBusy(false);
}
mQueuedBuffer = buffer;
mQueuedBuffer->setBusy(true);
mQueuedBufferDamage = damage;
buffer->setBusy(false);
}
}

View File

@ -327,8 +327,6 @@ protected:
ToplevelWindowTilingStates mLastReportedToplevelWindowTilingStates = WindowNoState;
QWaylandShmBackingStore *mBackingStore = nullptr;
QWaylandBuffer *mQueuedBuffer = nullptr;
QRegion mQueuedBufferDamage;
QMargins mCustomMargins;