1
0
Fork 0
forked from wry/wry

wl_surface: handle explicit sync release automatically

This commit is contained in:
Julian Orth 2026-02-28 02:47:22 +01:00
parent 8f576f498e
commit 382c0b6c71
3 changed files with 64 additions and 63 deletions

View file

@ -1,7 +1,7 @@
use {
crate::{
client::{Client, ClientError},
ifs::wl_surface::WlSurface,
ifs::wl_surface::{SyncObjRelease, WlSurface},
leaks::Tracker,
object::{Object, Version},
video::drm::sync_obj::SyncObjPoint,
@ -66,7 +66,12 @@ impl WpLinuxDrmSyncobjSurfaceV1RequestHandler for WpLinuxDrmSyncobjSurfaceV1 {
fn set_release_point(&self, req: SetReleasePoint, _slf: &Rc<Self>) -> Result<(), Self::Error> {
let point = SyncObjPoint(req.point);
let timeline = self.client.lookup(req.timeline)?;
self.surface.pending.borrow_mut().release_point = Some((timeline.sync_obj.clone(), point));
self.surface.pending.borrow_mut().release_point = Some(SyncObjRelease {
state: self.client.state.clone(),
committed: false,
syncobj: Some(timeline.sync_obj.clone()),
point,
});
Ok(())
}
}