Merge pull request #1893 from iced-rs/fix/mesh-empty-scissor-rect

Fix empty scissor rectangle in `iced_wgpu::triangle` pipeline
This commit is contained in:
Héctor Ramón 2023-06-01 17:24:59 +02:00 committed by GitHub
commit 44748664c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -155,6 +155,10 @@ impl Layer {
for (index, mesh) in meshes.iter().enumerate() {
let clip_bounds = (mesh.clip_bounds() * scale_factor).snap();
if clip_bounds.width < 1 || clip_bounds.height < 1 {
continue;
}
render_pass.set_scissor_rect(
clip_bounds.x,
clip_bounds.y,