render: add a damage visualizer
This commit is contained in:
parent
3f4a677d0c
commit
76a3c50560
18 changed files with 625 additions and 90 deletions
|
|
@ -78,6 +78,10 @@ impl Region {
|
|||
self.extents
|
||||
}
|
||||
|
||||
pub fn rects(&self) -> &[Rect] {
|
||||
unsafe { mem::transmute::<&[RectRaw], &[Rect]>(&self.rects[..]) }
|
||||
}
|
||||
|
||||
pub fn contains(&self, x: i32, y: i32) -> bool {
|
||||
if !self.extents.contains(x, y) {
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue