desktop: Fixup intersection calls
This commit is contained in:
parent
a948ff8829
commit
827a3c8c2a
|
@ -165,8 +165,7 @@ where
|
|||
let new_damage = damage
|
||||
.iter()
|
||||
.cloned()
|
||||
.filter(|geo| geo.overlaps(rect))
|
||||
.map(|geo| geo.intersection(rect))
|
||||
.flat_map(|geo| geo.intersection(rect))
|
||||
.map(|mut geo| {
|
||||
geo.loc -= rect.loc;
|
||||
geo
|
||||
|
|
|
@ -570,8 +570,7 @@ impl Space {
|
|||
if damage.iter().any(|geo| lgeo.overlaps(*geo)) {
|
||||
let layer_damage = damage
|
||||
.iter()
|
||||
.filter(|geo| geo.overlaps(lgeo))
|
||||
.map(|geo| geo.intersection(lgeo))
|
||||
.flat_map(|geo| geo.intersection(lgeo))
|
||||
.map(|geo| Rectangle::from_loc_and_size(geo.loc - lgeo.loc, geo.size))
|
||||
.collect::<Vec<_>>();
|
||||
slog::trace!(
|
||||
|
@ -600,8 +599,7 @@ impl Space {
|
|||
loc -= output_geo.loc;
|
||||
let win_damage = damage
|
||||
.iter()
|
||||
.filter(|geo| geo.overlaps(wgeo))
|
||||
.map(|geo| geo.intersection(wgeo))
|
||||
.flat_map(|geo| geo.intersection(wgeo))
|
||||
.map(|geo| Rectangle::from_loc_and_size(geo.loc - loc, geo.size))
|
||||
.collect::<Vec<_>>();
|
||||
slog::trace!(
|
||||
|
@ -631,8 +629,7 @@ impl Space {
|
|||
if damage.iter().any(|geo| lgeo.overlaps(*geo)) {
|
||||
let layer_damage = damage
|
||||
.iter()
|
||||
.filter(|geo| geo.overlaps(lgeo))
|
||||
.map(|geo| geo.intersection(lgeo))
|
||||
.flat_map(|geo| geo.intersection(lgeo))
|
||||
.map(|geo| Rectangle::from_loc_and_size(geo.loc - lgeo.loc, geo.size))
|
||||
.collect::<Vec<_>>();
|
||||
slog::trace!(
|
||||
|
|
Loading…
Reference in New Issue