mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-07-25 17:21:54 -07: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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user