1
0
Fork 0
forked from wry/wry

wayland: implement fifo-v1

This commit is contained in:
Julian Orth 2024-09-13 16:01:49 +02:00
parent d8e0375c48
commit fe7175fab2
19 changed files with 416 additions and 23 deletions

View file

@ -1,5 +1,6 @@
mod backend;
mod connector;
mod const_clock;
mod drmdev;
mod hardware_cursor;
mod idle;
@ -12,10 +13,11 @@ use {
state::State,
tasks::{
backend::BackendEventHandler,
const_clock::run_const_clock,
slow_clients::{SlowClientHandler, SlowEiClientHandler},
},
},
std::rc::Rc,
std::{rc::Rc, time::Duration},
};
pub use {hardware_cursor::handle_hardware_cursor_tick, idle::idle};
@ -33,3 +35,12 @@ pub async fn handle_slow_ei_clients(state: Rc<State>) {
let mut sch = SlowEiClientHandler { state };
sch.handle_events().await;
}
pub async fn handle_const_40hz_latch(state: Rc<State>) {
let output = state.dummy_output.get().unwrap();
let duration = Duration::from_nanos(1_000_000_000 / 40);
run_const_clock(duration, &state.ring, &state.const_40hz_latch, |l| {
l.after_latch(&output, false)
})
.await;
}