all: implement damage tracking
This commit is contained in:
parent
76a3c50560
commit
bb66abb817
28 changed files with 473 additions and 82 deletions
|
|
@ -60,6 +60,16 @@ impl CursorSurface {
|
|||
pub fn update_hardware_cursor(&self) {
|
||||
self.user.update_hardware_cursor();
|
||||
}
|
||||
|
||||
pub fn needs_damage_tracking(&self) -> bool {
|
||||
self.user.software_cursor()
|
||||
}
|
||||
|
||||
pub fn surface_position(&self) -> (i32, i32) {
|
||||
let (x, y) = self.user.position();
|
||||
let (dx, dy) = self.hotspot.get();
|
||||
(x.to_int() - dx, y.to_int() - dy)
|
||||
}
|
||||
}
|
||||
|
||||
impl Cursor for CursorSurface {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue