compositor: fix race to finish on null buffer (#10970)
if a null buffer is commited and a pending state is awaiting, drop the pending state so we dont end up in race to finish brokeness.
This commit is contained in:
parent
8f948827a6
commit
2f34ef141b
1 changed files with 7 additions and 0 deletions
|
|
@ -128,6 +128,13 @@ CWLSurfaceResource::CWLSurfaceResource(SP<CWlSurface> resource_) : m_resource(re
|
||||||
(!m_pending.buffer && !m_pending.texture) // null buffer attached
|
(!m_pending.buffer && !m_pending.texture) // null buffer attached
|
||||||
) {
|
) {
|
||||||
commitState(m_pending);
|
commitState(m_pending);
|
||||||
|
|
||||||
|
if (!m_pending.buffer && !m_pending.texture) {
|
||||||
|
// null buffer attached, remove any pending states.
|
||||||
|
while (!m_pendingStates.empty()) {
|
||||||
|
m_pendingStates.pop();
|
||||||
|
}
|
||||||
|
}
|
||||||
m_pending.reset();
|
m_pending.reset();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue