diff options
Diffstat (limited to 'wgpu/src/image/vector.rs')
-rw-r--r-- | wgpu/src/image/vector.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/wgpu/src/image/vector.rs b/wgpu/src/image/vector.rs index b6776827..7648aa7e 100644 --- a/wgpu/src/image/vector.rs +++ b/wgpu/src/image/vector.rs @@ -2,6 +2,8 @@ use crate::image::atlas::{self, Atlas}; use iced_native::svg; use std::collections::{HashMap, HashSet}; +use zerocopy::AsBytes; + pub enum Svg { Loaded(resvg::usvg::Tree), NotFound, @@ -117,7 +119,7 @@ impl Cache { let allocation = texture_atlas.upload( width, height, - canvas.get_data(), + canvas.get_data().as_bytes(), device, encoder, )?; |