From 505588d5851fed8a3bb334edacfa6d96c545d562 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 29 Nov 2019 21:44:39 +0100 Subject: Allow to load an image from memory New `image::Handle` opaque type uniquely identifying some `image::Data`, allowing reliable caching. --- wgpu/src/primitive.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'wgpu/src/primitive.rs') diff --git a/wgpu/src/primitive.rs b/wgpu/src/primitive.rs index 9efd74f6..04264e5d 100644 --- a/wgpu/src/primitive.rs +++ b/wgpu/src/primitive.rs @@ -1,5 +1,5 @@ use iced_native::{ - Background, Color, Font, HorizontalAlignment, Rectangle, Vector, + image, Background, Color, Font, HorizontalAlignment, Rectangle, Vector, VerticalAlignment, }; @@ -41,8 +41,8 @@ pub enum Primitive { }, /// An image primitive Image { - /// The path of the image - path: String, + /// The handle of the image + handle: image::Handle, /// The bounds of the image bounds: Rectangle, }, -- cgit