1
0
Fork 0
forked from wry/wry

output: add flip-margin setter

This commit is contained in:
Julian Orth 2026-03-07 13:52:07 +01:00
parent 48852f45ff
commit 89c8692c94
2 changed files with 6 additions and 2 deletions

View file

@ -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);
}
}

View file

@ -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 {