.
diff --git a/sparse_strips/vello_hybrid/examples/wgpu_webgl/tests/webgl.rs b/sparse_strips/vello_hybrid/examples/wgpu_webgl/tests/webgl.rs index 1d815c0..63b47d7 100644 --- a/sparse_strips/vello_hybrid/examples/wgpu_webgl/tests/webgl.rs +++ b/sparse_strips/vello_hybrid/examples/wgpu_webgl/tests/webgl.rs
@@ -6,7 +6,7 @@ mod wasm { use vello_common::peniko::{color::palette, kurbo::BezPath}; - use vello_hybrid::{ImageCache, Scene}; + use vello_hybrid::Scene; use wasm_bindgen_test::*; use wgpu_webgl::render_scene; @@ -18,7 +18,6 @@ console_log::init_with_level(log::Level::Debug).unwrap(); let mut scene = Scene::new(100, 100); - let image_cache = ImageCache::default(); // Draw a blue triangle let mut path = BezPath::new(); @@ -29,6 +28,6 @@ scene.set_paint(palette::css::BLUE); scene.fill_path(&path); - render_scene(scene, 100, 100, image_cache).await; + render_scene(scene, 100, 100).await; } }
diff --git a/sparse_strips/vello_hybrid/src/image_cache.rs b/sparse_strips/vello_hybrid/src/image_cache.rs index eebb7a6..4b94c23 100644 --- a/sparse_strips/vello_hybrid/src/image_cache.rs +++ b/sparse_strips/vello_hybrid/src/image_cache.rs
@@ -1,6 +1,8 @@ // Copyright 2025 the Vello Authors // SPDX-License-Identifier: Apache-2.0 OR MIT +#![allow(dead_code, reason = "Clippy fails when --no-default-features")] + use alloc::vec::Vec; use guillotiere::{AllocId, AtlasAllocator, size2}; use vello_common::paint::ImageId; @@ -11,14 +13,13 @@ #[derive(Debug)] pub(crate) struct ImageResource { /// The ID of the image - #[allow(dead_code, reason = "This is not used in the main code for now")] - pub id: ImageId, + pub(crate) id: ImageId, /// The width of the image - pub width: u16, + pub(crate) width: u16, /// The height of the image - pub height: u16, + pub(crate) height: u16, /// The offset of the image in the atlas - pub offset: [u16; 2], + pub(crate) offset: [u16; 2], /// The atlas allocation ID for deallocation atlas_alloc_id: AllocId, } @@ -110,7 +111,6 @@ } /// Deallocate an image from the cache, returning true if it existed - #[allow(dead_code, reason = "This is not used in the main code for now")] pub(crate) fn deallocate(&mut self, id: ImageId) -> bool { let index = id.as_u32() as usize; if let Some(image_resource) = self.slots.get_mut(index).and_then(Option::take) { @@ -124,7 +124,6 @@ } /// Clear all images from the cache - #[allow(dead_code, reason = "This is not used in the main code for now")] pub(crate) fn clear(&mut self) { self.slots.clear(); self.free_idxs.clear();
diff --git a/sparse_strips/vello_hybrid/src/render/common.rs b/sparse_strips/vello_hybrid/src/render/common.rs index 447b4f5..0feda7b 100644 --- a/sparse_strips/vello_hybrid/src/render/common.rs +++ b/sparse_strips/vello_hybrid/src/render/common.rs
@@ -57,10 +57,7 @@ // Align to 16 bytes for RGBA32Uint alignment #[repr(C, align(16))] #[derive(Debug, Clone, Copy, Zeroable, Pod)] -#[allow( - dead_code, - reason = "Clippy fails when --no-default-features because webgl impl doesn't use this struct" -)] +#[allow(dead_code, reason = "Clippy fails when --no-default-features")] pub(crate) struct GpuEncodedImage { // 1st 16 bytes /// The rendering quality of the image.