This commit is contained in:
Vaxry 2024-03-18 23:27:22 +00:00
parent 31bfe2f78a
commit cdef97ca2c
2 changed files with 8 additions and 2 deletions

View file

@ -28,7 +28,8 @@ static int fdHandleWrite(int fd, uint32_t mask, void* data) {
const auto RB = (CRenderbuffer*)data;
g_pFrameSchedulingManager->gpuDone(RB->m_pWlrBuffer);
if (RB->hasFence())
g_pFrameSchedulingManager->gpuDone(RB->m_pWlrBuffer);
RB->removeFence();
@ -120,3 +121,7 @@ void CRenderbuffer::removeFence() {
wl_event_source_remove(m_pFDWrite);
m_pFDWrite = nullptr;
}
bool CRenderbuffer::hasFence() {
return m_pFDWrite;
}

View file

@ -15,6 +15,7 @@ class CRenderbuffer {
CFramebuffer* getFB();
void plantFence();
void removeFence();
bool hasFence();
wlr_buffer* m_pWlrBuffer = nullptr;