core/compositor: immediately do readable if adding waiter fails for scheduling state
This commit is contained in:
parent
686eda9d48
commit
e165f84184
1 changed files with 4 additions and 1 deletions
|
|
@ -500,7 +500,10 @@ void CWLSurfaceResource::scheduleState(WP<SSurfaceState> state) {
|
|||
|
||||
if (state->updated.bits.acquire) {
|
||||
// wait on acquire point for this surface, from explicit sync protocol
|
||||
state->acquire.addWaiter([state, whenReadable]() { whenReadable(state, LOCK_REASON_FENCE); });
|
||||
if (!state->acquire.addWaiter([state, whenReadable]() { whenReadable(state, LOCK_REASON_FENCE); })) {
|
||||
Log::logger->log(Log::ERR, "Failed to addWaiter in CWLSurfaceResource::scheduleState");
|
||||
whenReadable(state, LOCK_REASON_FENCE);
|
||||
}
|
||||
} else if (state->buffer && state->buffer->isSynchronous()) {
|
||||
// synchronous (shm) buffers can be read immediately
|
||||
m_stateQueue.unlock(state);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue