Skip to content

Commit

Permalink
screencopy: log renderer_begin_with_buffer failures
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Sep 21, 2023
1 parent b662215 commit 2e1842b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/protocols/Screencopy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ bool CScreencopyProtocolManager::copyFrameShm(SScreencopyFrame* frame, timespec*
return false;

if (!wlr_renderer_begin_with_buffer(g_pCompositor->m_sWLRRenderer, m_pLastMonitorBackBuffer)) {
Debug::log(ERR, "[sc] shm: Client requested a copy to a buffer that failed to pass wlr_renderer_begin_with_buffer");
wlr_buffer_end_data_ptr_access(frame->buffer);
return false;
}
Expand All @@ -445,6 +446,7 @@ bool CScreencopyProtocolManager::copyFrameDmabuf(SScreencopyFrame* frame) {
wlr_matrix_scale(glMatrix, frame->pMonitor->vecPixelSize.x, frame->pMonitor->vecPixelSize.y);

if (!wlr_renderer_begin_with_buffer(g_pCompositor->m_sWLRRenderer, frame->buffer)) {
Debug::log(ERR, "[sc] dmabuf: Client requested a copy to a buffer that failed to pass wlr_renderer_begin_with_buffer");
wlr_texture_destroy(sourceTex);
return false;
}
Expand Down

0 comments on commit 2e1842b

Please sign in to comment.