Migrate away from Rectangle::from_loc_and_size

Deprecated in `smithay` by https://github.com/Smithay/smithay/pull/1621.
This commit is contained in:
Ian Douglas Scott 2024-12-26 18:18:35 -08:00 committed by Victoria Brekenfeld
parent 9074447c4f
commit b685512127
26 changed files with 184 additions and 201 deletions

View file

@ -379,7 +379,7 @@ impl Element for DamageElement {
}
fn src(&self) -> Rectangle<f64, BufferCoords> {
Rectangle::from_loc_and_size((0.0, 0.0), (1.0, 1.0))
Rectangle::from_size((1.0, 1.0).into())
}
fn geometry(&self, scale: Scale<f64>) -> Rectangle<i32, Physical> {
@ -391,10 +391,7 @@ impl Element for DamageElement {
scale: Scale<f64>,
_commit: Option<CommitCounter>,
) -> DamageSet<i32, Physical> {
DamageSet::from_slice(&[Rectangle::from_loc_and_size(
(0, 0),
self.geometry(scale).size,
)])
DamageSet::from_slice(&[Rectangle::from_size(self.geometry(scale).size).into()])
}
}