diff options
author | 2019-12-21 08:16:36 +0100 | |
---|---|---|
committer | 2019-12-21 08:16:36 +0100 | |
commit | d78ae3c85250f775e723cc6be1d304825dff89b9 (patch) | |
tree | 88e1ac8b8d6d09f34df454fb7c5af692db8c0afe /wgpu/src/image | |
parent | 2ec0a43c4a208e5d4f6f331193032d8d4fe53fb7 (diff) | |
download | iced-d78ae3c85250f775e723cc6be1d304825dff89b9.tar.gz iced-d78ae3c85250f775e723cc6be1d304825dff89b9.tar.bz2 iced-d78ae3c85250f775e723cc6be1d304825dff89b9.zip |
Avoid rasterizing SVG when a dimension is 0
Diffstat (limited to 'wgpu/src/image')
-rw-r--r-- | wgpu/src/image/vector.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/wgpu/src/image/vector.rs b/wgpu/src/image/vector.rs index aa712372..713978f5 100644 --- a/wgpu/src/image/vector.rs +++ b/wgpu/src/image/vector.rs @@ -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, |