Fix physical_bounds shadowing in wgpu render

This commit is contained in:
Héctor Ramón Jiménez 2025-02-14 23:14:13 +01:00
parent 7526d73ad3
commit 7c54bdef10
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -280,13 +280,16 @@ impl Renderer {
let scale = Transformation::scale(scale_factor); let scale = Transformation::scale(scale_factor);
for layer in self.layers.iter() { for layer in self.layers.iter() {
let Some(scissor_rect) = physical_bounds let Some(physical_bounds) =
.intersection(&(layer.bounds * scale_factor)) physical_bounds.intersection(&(layer.bounds * scale_factor))
.and_then(Rectangle::snap)
else { else {
continue; continue;
}; };
let Some(scissor_rect) = physical_bounds.snap() else {
continue;
};
if !layer.quads.is_empty() { if !layer.quads.is_empty() {
engine.quad_pipeline.render( engine.quad_pipeline.render(
quad_layer, quad_layer,