1
0
Fork 0
forked from wry/wry

metal: make post_commit_margin configurable

This commit is contained in:
Julian Orth 2024-09-14 13:56:22 +02:00
parent 76b0f2f734
commit 02ece60909
24 changed files with 224 additions and 55 deletions

View file

@ -35,7 +35,7 @@ use {
set_vrr_mode, Connector, DrmDevice,
},
},
std::{cell::RefCell, io::ErrorKind, path::PathBuf, rc::Rc},
std::{cell::RefCell, io::ErrorKind, path::PathBuf, rc::Rc, time::Duration},
};
fn default_seat() -> Seat {
@ -245,6 +245,9 @@ impl ConfigDrmDevice {
if let Some(dse) = self.direct_scanout_enabled {
d.set_direct_scanout_enabled(dse);
}
if let Some(fm) = self.flip_margin_ms {
d.set_flip_margin(Duration::from_nanos((fm * 1_000_000.0) as _));
}
}
}