metal: clear damage before adding full damage
This commit is contained in:
parent
e95e764b46
commit
f8d03c25a9
2 changed files with 8 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue