Skip to content

Commit

Permalink
syncobj: drop current buffer when done
Browse files Browse the repository at this point in the history
FIFO presentation modes requires us to drop current buffer when done
with it so we send our release points and client will send us new
acquire/release points. if waiting for next commit it will never arrive.
  • Loading branch information
gulafaran committed Feb 24, 2025
1 parent 40df1f7 commit 25e5e5c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/protocols/core/Compositor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,15 @@ void CWLSurfaceResource::commitPendingState() {
nullptr);
}

// #TODO
// fifo mode requires us to drop the current buffer before next commit
// otherwise release points arent being sent and we dont recieve new acquire
// and release points.
if (current.buffer->buffer->isSynchronous() && syncobj) {
dropCurrentBuffer();
return;
}

// for async buffers, we can only release the buffer once we are unrefing it from current.
// if the backend took it, ref it with the lambda. Otherwise, the end of this scope will release it.
if (previousBuffer && previousBuffer->buffer && !previousBuffer->buffer->isSynchronous()) {
Expand Down

0 comments on commit 25e5e5c

Please sign in to comment.