Skip to content

Commit

Permalink
output-schedule: fix hardware cursor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mahkoh committed Oct 29, 2024
1 parent 163bb2c commit 7e40e90
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions release-notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Unreleased

- Various bugfixes.
- Add support fo ext-data-control-v1.

# 1.7.0 (2024-10-25)
Expand Down
3 changes: 3 additions & 0 deletions src/backends/metal/present.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ impl MetalConnector {
_ => return Ok(()),
};

if self.has_damage.get() > 0 || self.cursor_damage.get() {
node.schedule.commit_cursor();
}
self.latch_cursor(&node)?;
let cursor_programming = self.compute_cursor_programming();
let latched = self.latch(&node);
Expand Down
4 changes: 4 additions & 0 deletions src/output_schedule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ impl OutputSchedule {
break;
}
}
self.commit_cursor();
}

pub fn commit_cursor(&self) {
if self.needs_hardware_cursor_commit.take() {
if let Some(hc) = self.hardware_cursor.get() {
hc.damage();
Expand Down

0 comments on commit 7e40e90

Please sign in to comment.