1
0
Fork 0
forked from wry/wry

metal: clear damage before adding full damage

This commit is contained in:
Julian Orth 2025-07-10 11:13:53 +02:00
parent e95e764b46
commit f8d03c25a9
2 changed files with 8 additions and 0 deletions

View file

@ -327,6 +327,13 @@ impl DamageQueue {
data.clear();
}
pub fn clear_all(&self) {
let datas = unsafe { self.datas.get().deref_mut() };
for data in datas {
data.clear();
}
}
pub fn get(&self) -> Region {
let data = unsafe { &self.datas.get().deref()[self.this] };
Region::from_rects2(data)