backend: store damaged state in ConnectorData
This commit is contained in:
parent
7ff7edaa8f
commit
ada4e5a5f0
7 changed files with 33 additions and 16 deletions
11
src/state.rs
11
src/state.rs
|
|
@ -300,6 +300,7 @@ pub struct ConnectorData {
|
|||
pub name: String,
|
||||
pub drm_dev: Option<Rc<DrmDevData>>,
|
||||
pub async_event: Rc<AsyncEvent>,
|
||||
pub damaged: Cell<bool>,
|
||||
}
|
||||
|
||||
pub struct OutputData {
|
||||
|
|
@ -321,6 +322,14 @@ pub struct DrmDevData {
|
|||
pub lease_global: Rc<WpDrmLeaseDeviceV1Global>,
|
||||
}
|
||||
|
||||
impl ConnectorData {
|
||||
pub fn damage(&self) {
|
||||
if !self.damaged.replace(true) {
|
||||
self.connector.damage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl DrmDevData {
|
||||
pub fn make_render_device(&self) {
|
||||
log::info!(
|
||||
|
|
@ -761,7 +770,7 @@ impl State {
|
|||
if cursor && output.schedule.defer_cursor_updates() {
|
||||
output.schedule.software_cursor_changed();
|
||||
} else {
|
||||
output.global.connector.connector.damage();
|
||||
output.global.connector.damage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue