Fix empty scissor rectangle in iced_wgpu::triangle pipeline

This commit is contained in:
Héctor Ramón Jiménez 2023-06-01 17:12:28 +02:00
parent ce64dcbfd4
commit 166d350dfc
No known key found for this signature in database
GPG key ID: 140CC052C94F138E

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,