Avoid rasterizing SVG when a dimension is 0

This commit is contained in:
Héctor Ramón Jiménez 2019-12-21 08:16:36 +01:00
parent 2ec0a43c4a
commit d78ae3c852

View file

@ -91,6 +91,10 @@ impl Cache {
match self.load(handle) {
Svg::Loaded { tree } => {
if width == 0 || height == 0 {
return None;
}
let extent = wgpu::Extent3d {
width,
height,