backend: add getters
This commit is contained in:
parent
042070ee99
commit
acec4c7f09
3 changed files with 19 additions and 9 deletions
|
|
@ -186,6 +186,12 @@ impl BackendDrmDevice for MetalDrmDevice {
|
|||
Some(self.id) == self.backend.ctx.get().map(|c| c.dev_id)
|
||||
}
|
||||
|
||||
fn direct_scanout_enabled(&self) -> bool {
|
||||
self.direct_scanout_enabled
|
||||
.get()
|
||||
.unwrap_or(self.backend.state.direct_scanout_enabled.get())
|
||||
}
|
||||
|
||||
fn create_lease(
|
||||
self: Rc<Self>,
|
||||
lessee: Rc<dyn BackendDrmLessee>,
|
||||
|
|
@ -314,6 +320,10 @@ impl BackendDrmDevice for MetalDrmDevice {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn flip_margin(&self) -> Option<u64> {
|
||||
Some(self.min_post_commit_margin.get())
|
||||
}
|
||||
}
|
||||
|
||||
pub struct HandleEvents {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue