vello_hybrid: Let `destroy_image` methods take `Resources` directly instead of `ImageCache`
diff --git a/sparse_strips/vello_hybrid/src/render/webgl.rs b/sparse_strips/vello_hybrid/src/render/webgl.rs index ff5f8b8..5fd8532 100644 --- a/sparse_strips/vello_hybrid/src/render/webgl.rs +++ b/sparse_strips/vello_hybrid/src/render/webgl.rs
@@ -469,10 +469,10 @@ /// Destroy an image from the cache and clear the allocated slot in the atlas. pub fn destroy_image( &mut self, - image_cache: &mut ImageCache, + resources: &mut Resources, image_id: vello_common::paint::ImageId, ) { - if let Some(image_resource) = image_cache.deallocate(image_id) { + if let Some(image_resource) = resources.image_cache.deallocate(image_id) { let padding = image_resource.padding as u32; self.clear_atlas_region( image_resource.atlas_id,
diff --git a/sparse_strips/vello_hybrid/src/render/wgpu.rs b/sparse_strips/vello_hybrid/src/render/wgpu.rs index 47c86db..718fc47 100644 --- a/sparse_strips/vello_hybrid/src/render/wgpu.rs +++ b/sparse_strips/vello_hybrid/src/render/wgpu.rs
@@ -570,13 +570,13 @@ /// Destroy an image from the cache and clear the allocated slot in the atlas. pub fn destroy_image( &mut self, - image_cache: &mut ImageCache, + resources: &mut Resources, device: &Device, queue: &Queue, encoder: &mut CommandEncoder, image_id: vello_common::paint::ImageId, ) { - if let Some(image_resource) = image_cache.deallocate(image_id) { + if let Some(image_resource) = resources.image_cache.deallocate(image_id) { let padding = image_resource.padding as u32; self.clear_atlas_region(