output: add flip-margin setter
This commit is contained in:
parent
48852f45ff
commit
89c8692c94
2 changed files with 6 additions and 2 deletions
|
|
@ -315,7 +315,7 @@ impl BackendDrmDevice for MetalDrmDevice {
|
|||
c.post_commit_margin.set(margin);
|
||||
c.post_commit_margin_decay.reset(margin);
|
||||
if let Some(output) = self.backend.state.root.outputs.get(&c.connector_id) {
|
||||
output.flip_margin_ns.set(Some(margin));
|
||||
output.set_flip_margin(margin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2467,7 +2467,7 @@ impl MetalBackend {
|
|||
};
|
||||
connector.post_commit_margin.set(new_margin);
|
||||
if let Some(global) = &global {
|
||||
global.flip_margin_ns.set(Some(new_margin));
|
||||
global.set_flip_margin(new_margin);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1540,6 +1540,10 @@ impl OutputNode {
|
|||
log::error!("Could not set gamma_lut: {}", ErrorFmt(e));
|
||||
})
|
||||
}
|
||||
|
||||
pub fn set_flip_margin(&self, margin_ns: u64) {
|
||||
self.flip_margin_ns.set(Some(margin_ns));
|
||||
}
|
||||
}
|
||||
|
||||
pub struct OutputTitle {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue