1
0
Fork 0
forked from wry/wry

metal: track per-framebuffer damage

This commit is contained in:
Julian Orth 2025-02-18 16:43:30 +01:00
parent f80ac20220
commit 07fb198eb4
17 changed files with 334 additions and 151 deletions

View file

@ -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,
}
}
}