wl_surface: handle explicit sync release automatically
This commit is contained in:
parent
8f576f498e
commit
382c0b6c71
3 changed files with 64 additions and 63 deletions
20
src/state.rs
20
src/state.rs
|
|
@ -121,11 +121,7 @@ use {
|
|||
},
|
||||
video::{
|
||||
dmabuf::DmaBufIds,
|
||||
drm::{
|
||||
Drm,
|
||||
sync_obj::{SyncObj, SyncObjPoint},
|
||||
wait_for_sync_obj::WaitForSyncObj,
|
||||
},
|
||||
drm::{Drm, wait_for_sync_obj::WaitForSyncObj},
|
||||
},
|
||||
wheel::Wheel,
|
||||
wire::{
|
||||
|
|
@ -1360,20 +1356,6 @@ impl State {
|
|||
seat
|
||||
}
|
||||
|
||||
pub fn signal_point(&self, sync_obj: &SyncObj, point: SyncObjPoint) {
|
||||
let Some(ctx) = self.render_ctx.get() else {
|
||||
log::error!("Cannot signal sync obj point because there is no render context");
|
||||
return;
|
||||
};
|
||||
let Some(ctx) = ctx.sync_obj_ctx() else {
|
||||
log::error!("Cannot signal sync obj point because there is no syncobj context");
|
||||
return;
|
||||
};
|
||||
if let Err(e) = ctx.signal(sync_obj, point) {
|
||||
log::error!("Could not signal sync obj: {}", ErrorFmt(e));
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_backend_idle(&self, idle: bool) {
|
||||
if self.idle.backend_idle.replace(idle) != idle {
|
||||
self.root.update_visible(self);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue