summaryrefslogtreecommitdiffstats
path: root/wgpu/src/renderer.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2019-12-04 04:28:07 +0100
committerLibravatar GitHub <noreply@github.com>2019-12-04 04:28:07 +0100
commitd1eb187e2673150b6c3f9fed0c15a1804ce0d75b (patch)
tree18ba66323f0aa2f3b8c25b80d1d74acfa41c13a2 /wgpu/src/renderer.rs
parent6c145bbb239e87569bf4aa797ea7f8d34e25cf62 (diff)
parent2144109dd7f9ab811393d3d725ba1cb7371aa672 (diff)
downloadiced-d1eb187e2673150b6c3f9fed0c15a1804ce0d75b.tar.gz
iced-d1eb187e2673150b6c3f9fed0c15a1804ce0d75b.tar.bz2
iced-d1eb187e2673150b6c3f9fed0c15a1804ce0d75b.zip
Merge pull request #90 from hecrj/feature/image-from-bytes
Load images from memory and image viewer example
Diffstat (limited to 'wgpu/src/renderer.rs')
-rw-r--r--wgpu/src/renderer.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/wgpu/src/renderer.rs b/wgpu/src/renderer.rs
index 268a3630..fa52bd96 100644
--- a/wgpu/src/renderer.rs
+++ b/wgpu/src/renderer.rs
@@ -127,6 +127,7 @@ impl Renderer {
}
self.queue.submit(&[encoder.finish()]);
+ self.image_pipeline.trim_cache();
*mouse_cursor
}
@@ -229,9 +230,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],
});