summaryrefslogtreecommitdiffstats
path: root/wgpu/src/renderer.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-11-29 21:44:39 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-11-29 21:44:39 +0100
commit505588d5851fed8a3bb334edacfa6d96c545d562 (patch)
tree1fb107d7c5f9bae0b6fe0c9ff106d7b9bd483b52 /wgpu/src/renderer.rs
parent811d8b90d71c26100f0933217f5474e090fbf17c (diff)
downloadiced-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.rs4
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],
});