From 5d56854ff871ee98dc53cdf8a0e3f7ec628cb90f Mon Sep 17 00:00:00 2001 From: Dennis Kobert Date: Mon, 5 Aug 2024 11:24:26 +0200 Subject: [PATCH] Change type of image override resources (#655) This is related to this discussion on [zulip](https://xi.zulipchat.com/#narrow/stream/197075-gpu/topic/vello.20adding.20wgpu.20texture.20buffers.20to.20scene/near/456478943) and a followup to https://github.com/linebender/vello/pull/636 --- vello/src/lib.rs | 4 ++-- vello/src/wgpu_engine.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vello/src/lib.rs b/vello/src/lib.rs index 4aa072381..e2a7e040b 100644 --- a/vello/src/lib.rs +++ b/vello/src/lib.rs @@ -365,8 +365,8 @@ impl Renderer { pub fn override_image( &mut self, image: &peniko::Image, - texture: Option>>, - ) -> Option>> { + texture: Option>>, + ) -> Option>> { match texture { Some(texture) => self.engine.image_overrides.insert(image.data.id(), texture), None => self.engine.image_overrides.remove(&image.data.id()), diff --git a/vello/src/wgpu_engine.rs b/vello/src/wgpu_engine.rs index 42ab919db..b10cbac5c 100644 --- a/vello/src/wgpu_engine.rs +++ b/vello/src/wgpu_engine.rs @@ -40,7 +40,7 @@ pub(crate) struct WgpuEngine { /// Overrides from a specific `Image`'s [`id`](peniko::Image::id) to a wgpu `Texture`. /// /// The `Texture` should have the same size as the `Image`. - pub(crate) image_overrides: HashMap>>, + pub(crate) image_overrides: HashMap>>, } enum PipelineState {