metal: track per-framebuffer damage
This commit is contained in:
parent
f80ac20220
commit
07fb198eb4
17 changed files with 334 additions and 151 deletions
|
|
@ -18,6 +18,8 @@ pub trait TransformExt: Sized {
|
|||
fn from_wl(wl: i32) -> Option<Self>;
|
||||
|
||||
fn apply_point(self, width: i32, height: i32, point: (i32, i32)) -> (i32, i32);
|
||||
|
||||
fn inverse(self) -> Self;
|
||||
}
|
||||
|
||||
impl TransformExt for Transform {
|
||||
|
|
@ -68,4 +70,12 @@ impl TransformExt for Transform {
|
|||
FlipRotate270 => (width - y, height - x),
|
||||
}
|
||||
}
|
||||
|
||||
fn inverse(self) -> Self {
|
||||
match self {
|
||||
Rotate90 => Rotate270,
|
||||
Rotate270 => Rotate90,
|
||||
_ => self,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue