mirror of
https://github.com/hyprwm/Hyprland
synced 2025-12-25 01:10:15 +01:00
buffer: check if buffer fd already readable (#10894)
check if buffer fd is already readable, to avoid a lot of unnecessery systemcalls and churn.
This commit is contained in:
parent
f464dfbefa
commit
9adacef70b
1 changed files with 3 additions and 0 deletions
|
|
@ -118,6 +118,9 @@ CFileDescriptor CDMABuffer::exportSyncFile() {
|
|||
if (fd == -1)
|
||||
continue;
|
||||
|
||||
if (CFileDescriptor::isReadable(fd))
|
||||
continue;
|
||||
|
||||
dma_buf_export_sync_file request{
|
||||
.flags = DMA_BUF_SYNC_READ,
|
||||
.fd = -1,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue