diff options
author | 2019-11-29 21:44:39 +0100 | |
---|---|---|
committer | 2019-11-29 21:44:39 +0100 | |
commit | 505588d5851fed8a3bb334edacfa6d96c545d562 (patch) | |
tree | 1fb107d7c5f9bae0b6fe0c9ff106d7b9bd483b52 /wgpu/src/renderer.rs | |
parent | 811d8b90d71c26100f0933217f5474e090fbf17c (diff) | |
download | iced-505588d5851fed8a3bb334edacfa6d96c545d562.tar.gz iced-505588d5851fed8a3bb334edacfa6d96c545d562.tar.bz2 iced-505588d5851fed8a3bb334edacfa6d96c545d562.zip |
Allow to load an image from memory
New `image::Handle` opaque type uniquely identifying some `image::Data`,
allowing reliable caching.
Diffstat (limited to '')
-rw-r--r-- | wgpu/src/renderer.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wgpu/src/renderer.rs b/wgpu/src/renderer.rs index f27a4b8a..ad081383 100644 --- a/wgpu/src/renderer.rs +++ b/wgpu/src/renderer.rs @@ -229,9 +229,9 @@ impl Renderer { border_radius: *border_radius as f32, }); } - Primitive::Image { path, bounds } => { + Primitive::Image { handle, bounds } => { layer.images.push(Image { - path: path.clone(), + handle: handle.clone(), position: [bounds.x, bounds.y], scale: [bounds.width, bounds.height], }); |