kms/surface: Define a PendingImageCopyData, instead of using tuple

Adding anything else to this tuple is awkward; defining a simple struct
makes this cleaner.

This also adds a `sync` property, which will come in handy later.
Containing simply the same-named argument that was passed to
`submit_buffer`.
This commit is contained in:
Ian Douglas Scott 2025-08-19 12:45:07 -07:00 committed by Victoria Brekenfeld
parent f0e0084608
commit 28e9024681
4 changed files with 34 additions and 24 deletions

View file

@ -8,7 +8,7 @@ use crate::{
config::{AdaptiveSync, EdidProduct, OutputConfig, OutputState, ScreenFilter},
shell::Shell,
utils::{env::dev_list_var, prelude::*},
wayland::protocols::screencopy::Frame,
wayland::handlers::screencopy::PendingImageCopyData,
};
use anyhow::{Context, Result};
@ -39,9 +39,7 @@ use smithay::{
rustix::fs::OFlags,
wayland_server::{protocol::wl_buffer::WlBuffer, DisplayHandle, Weak},
},
utils::{
Buffer as BufferCoords, Clock, DevPath, DeviceFd, Monotonic, Point, Rectangle, Transform,
},
utils::{Clock, DevPath, DeviceFd, Monotonic, Point, Transform},
wayland::drm_lease::{DrmLease, DrmLeaseState},
};
use tracing::{error, info, warn};
@ -71,7 +69,7 @@ pub type LockedGbmDrmOutputManager<'a> = LockedDrmOutputManager<
GbmFramebufferExporter<DrmDeviceFd>,
Option<(
OutputPresentationFeedback,
Receiver<(Frame, Vec<Rectangle<i32, BufferCoords>>)>,
Receiver<PendingImageCopyData>,
Duration,
)>,
DrmDeviceFd,
@ -82,7 +80,7 @@ pub type GbmDrmOutputManager = DrmOutputManager<
GbmFramebufferExporter<DrmDeviceFd>,
Option<(
OutputPresentationFeedback,
Receiver<(Frame, Vec<Rectangle<i32, BufferCoords>>)>,
Receiver<PendingImageCopyData>,
Duration,
)>,
DrmDeviceFd,