From f92e2f3ada8e6cb2b13bb012ba7c339e772f8282 Mon Sep 17 00:00:00 2001 From: "Austin M. Reppert" Date: Sun, 1 Dec 2024 11:12:04 -0500 Subject: [PATCH] Use scene state. --- Cargo.lock | 262 ++++++++++++++++++++++- examples/headless/src/main.rs | 5 - examples/scenes/src/cosmic_text_scene.rs | 110 +++++----- examples/scenes/src/lib.rs | 6 - examples/scenes/src/test_scenes.rs | 7 +- examples/with_winit/src/lib.rs | 10 - vello_tests/src/lib.rs | 5 - 7 files changed, 317 insertions(+), 88 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7ced01f5..95a15c39 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -525,6 +525,29 @@ dependencies = [ "libc", ] +[[package]] +name = "cosmic-text" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59fd57d82eb4bfe7ffa9b1cec0c05e2fd378155b47f255a67983cb4afe0e80c2" +dependencies = [ + "bitflags 2.6.0", + "fontdb", + "log", + "rangemap", + "rayon", + "rustc-hash", + "rustybuzz", + "self_cell", + "swash", + "sys-locale", + "ttf-parser 0.21.1", + "unicode-bidi", + "unicode-linebreak", + "unicode-script", + "unicode-segmentation", +] + [[package]] name = "crc32fast" version = "1.4.2" @@ -534,6 +557,25 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.20" @@ -594,6 +636,12 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + [[package]] name = "env_filter" version = "0.1.2" @@ -685,6 +733,15 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "font-types" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3971f9a5ca983419cdc386941ba3b9e1feba01a0ab888adf78739feb2798492" +dependencies = [ + "bytemuck", +] + [[package]] name = "font-types" version = "0.8.1" @@ -694,6 +751,29 @@ dependencies = [ "bytemuck", ] +[[package]] +name = "fontconfig-parser" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1fcfcd44ca6e90c921fee9fa665d530b21ef1327a4c1a6c5250ea44b776ada7" +dependencies = [ + "roxmltree", +] + +[[package]] +name = "fontdb" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0299020c3ef3f60f526a4f64ab4a3d4ce116b1acbf24cdd22da0068e5d81dc3" +dependencies = [ + "fontconfig-parser", + "log", + "memmap2", + "slotmap", + "tinyvec", + "ttf-parser 0.20.0", +] + [[package]] name = "foreign-types" version = "0.5.0" @@ -1139,6 +1219,12 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "libm" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" + [[package]] name = "libredox" version = "0.1.3" @@ -1621,7 +1707,7 @@ version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22ec719bbf3b2a81c109a4e20b1f129b5566b7dce654bc3872f6a05abf82b2c4" dependencies = [ - "ttf-parser", + "ttf-parser 0.25.0", ] [[package]] @@ -1848,12 +1934,48 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8a99fddc9f0ba0a85884b8d14e3592853e787d581ca1816c91349b10e4eeab" +[[package]] +name = "rangemap" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f60fcc7d6849342eff22c4350c8b9a989ee8ceabc4b481253e8946b9fe83d684" + [[package]] name = "raw-window-handle" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "read-fonts" +version = "0.22.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a04b892cb6f91951f144c33321843790c8574c825aafdb16d815fd7183b5229" +dependencies = [ + "bytemuck", + "font-types 0.7.3", +] + [[package]] name = "read-fonts" version = "0.25.0" @@ -1861,7 +1983,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57ffb59d3f1cc19f87906ce8018a97af2635bb35a2e2fa98ded30e027445ea7a" dependencies = [ "bytemuck", - "font-types", + "font-types 0.8.1", ] [[package]] @@ -1955,6 +2077,23 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "rustybuzz" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfb9cf8877777222e4a3bc7eb247e398b56baba500c38c1c46842431adc8b55c" +dependencies = [ + "bitflags 2.6.0", + "bytemuck", + "libm", + "smallvec", + "ttf-parser 0.21.1", + "unicode-bidi-mirroring", + "unicode-ccc", + "unicode-properties", + "unicode-script", +] + [[package]] name = "ryu" version = "1.0.18" @@ -1976,10 +2115,12 @@ version = "0.0.0" dependencies = [ "anyhow", "clap", + "cosmic-text", "getrandom", "image", "rand", "roxmltree", + "unicode-segmentation", "vello", "web-time", ] @@ -2059,6 +2200,12 @@ dependencies = [ "version-compare", ] +[[package]] +name = "self_cell" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d369a96f978623eb3dc28807c4852d6cc617fed53da5d3c400feff1ef34a714a" + [[package]] name = "semver" version = "1.0.23" @@ -2148,6 +2295,16 @@ dependencies = [ "vello", ] +[[package]] +name = "skrifa" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1c44ad1f6c5bdd4eefed8326711b7dbda9ea45dfd36068c427d332aa382cbe" +dependencies = [ + "bytemuck", + "read-fonts 0.22.5", +] + [[package]] name = "skrifa" version = "0.26.0" @@ -2155,7 +2312,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e07d75701517557a2e6d8747741043b4649f6252503401b59a16b2e1b0b16289" dependencies = [ "bytemuck", - "read-fonts", + "read-fonts 0.25.0", ] [[package]] @@ -2255,6 +2412,17 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce5d813d71d82c4cbc1742135004e4a79fd870214c155443451c139c9470a0aa" +[[package]] +name = "swash" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbd59f3f359ddd2c95af4758c18270eddd9c730dde98598023cdabff472c2ca2" +dependencies = [ + "skrifa 0.22.3", + "yazi", + "zeno", +] + [[package]] name = "syn" version = "2.0.89" @@ -2266,6 +2434,15 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "sys-locale" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eab9a99a024a169fe8a903cf9d4a3b3601109bcc13bd9e3c6fff259138626c4" +dependencies = [ + "libc", +] + [[package]] name = "tempfile" version = "3.14.0" @@ -2363,6 +2540,21 @@ dependencies = [ "strict-num", ] +[[package]] +name = "tinyvec" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + [[package]] name = "toml_datetime" version = "0.6.8" @@ -2439,18 +2631,66 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "ttf-parser" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4" + +[[package]] +name = "ttf-parser" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c591d83f69777866b9126b24c6dd9a18351f177e49d625920d19f989fd31cf8" + [[package]] name = "ttf-parser" version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5902c5d130972a0000f60860bfbf46f7ca3db5391eddfedd1b8728bd9dc96c0e" +[[package]] +name = "unicode-bidi" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" + +[[package]] +name = "unicode-bidi-mirroring" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23cb788ffebc92c5948d0e997106233eeb1d8b9512f93f41651f52b6c5f5af86" + +[[package]] +name = "unicode-ccc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df77b101bcc4ea3d78dafc5ad7e4f58ceffe0b2b16bf446aeb50b6cb4157656" + [[package]] name = "unicode-ident" version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" +[[package]] +name = "unicode-linebreak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" + +[[package]] +name = "unicode-properties" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" + +[[package]] +name = "unicode-script" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb421b350c9aff471779e262955939f565ec18b86c15364e6bdf0d662ca7c1f" + [[package]] name = "unicode-segmentation" version = "1.12.0" @@ -2490,7 +2730,7 @@ dependencies = [ "log", "peniko", "png", - "skrifa", + "skrifa 0.26.0", "static_assertions", "thiserror 2.0.3", "vello_encoding", @@ -2506,7 +2746,7 @@ dependencies = [ "bytemuck", "guillotiere", "peniko", - "skrifa", + "skrifa 0.26.0", "smallvec", ] @@ -3439,6 +3679,18 @@ version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af310deaae937e48a26602b730250b4949e125f468f11e6990be3e5304ddd96f" +[[package]] +name = "yazi" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c94451ac9513335b5e23d7a8a2b61a7102398b8cca5160829d313e84c9d98be1" + +[[package]] +name = "zeno" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd15f8e0dbb966fd9245e7498c7e9e5055d9e5c8b676b95bd67091cd11a1e697" + [[package]] name = "zerocopy" version = "0.7.35" diff --git a/examples/headless/src/main.rs b/examples/headless/src/main.rs index 7e47672e..d6d791e2 100644 --- a/examples/headless/src/main.rs +++ b/examples/headless/src/main.rs @@ -27,9 +27,6 @@ use vello::wgpu::{ }; use vello::{util::block_on_wgpu, RendererOptions, Scene}; -#[cfg(feature = "cosmic_text")] -use scenes::cosmic_text_scene::CosmicTextSceneState; - fn main() -> Result<()> { #[cfg(not(target_arch = "wasm32"))] env_logger::init(); @@ -119,8 +116,6 @@ async fn render(mut scenes: SceneSet, index: usize, args: &Args) -> Result<()> { base_color: None, interactive: false, complexity: 0, - #[cfg(feature = "cosmic_text")] - cosmic_text_scene_state: &CosmicTextSceneState::default(), }; example_scene .function diff --git a/examples/scenes/src/cosmic_text_scene.rs b/examples/scenes/src/cosmic_text_scene.rs index 1a89ae95..cffbf9ac 100644 --- a/examples/scenes/src/cosmic_text_scene.rs +++ b/examples/scenes/src/cosmic_text_scene.rs @@ -1,7 +1,7 @@ // Copyright 2024 the Vello Authors // SPDX-License-Identifier: Apache-2.0 OR MIT -use crate::SceneParams; +use crate::{SceneParams, TestScene}; use vello::kurbo::{Affine, Point, Rect, Size}; use vello::peniko::{Blob, Color, Fill, Font}; @@ -18,6 +18,54 @@ use std::cmp; use std::collections::HashMap; use std::sync::Arc; +pub struct CosmicData { + +} + +impl TestScene for CosmicTextSceneState { + fn render(&mut self, scene: &mut Scene, _scene_params: &mut SceneParams) { + let buffer_glyphs = &self.buffer_glyphs; + let vello_fonts = &self.vello_fonts; + + let text_transform = Affine::translate((500.0, 300.0)); + + // Draw the Glyphs + for buffer_line in &buffer_glyphs.buffer_lines { + for glyph_highlight in &buffer_line.glyph_highlights { + scene.fill( + Fill::NonZero, + text_transform, + buffer_glyphs.glyph_highlight_color, + None, + glyph_highlight, + ); + } + + if let Some(cursor) = &buffer_line.cursor { + scene.fill( + Fill::NonZero, + text_transform, + buffer_glyphs.cursor_color, + None, + cursor, + ); + } + + for glyph_run in &buffer_line.glyph_runs { + let font = vello_fonts.get(&glyph_run.font).unwrap(); + let glyph_color = glyph_run.glyph_color; + let glyphs = glyph_run.glyphs.clone(); + scene + .draw_glyphs(font) + .font_size(buffer_glyphs.font_size) + .brush(glyph_color) + .transform(text_transform) + .draw(Fill::NonZero, glyphs.into_iter()); + } + } + } +} + pub struct CosmicTextSceneState { pub font_system: FontSystem, pub vello_fonts: HashMap, @@ -88,10 +136,10 @@ impl CosmicTextSceneState { vello_fonts, buffer_glyphs: create_glyphs_for_editor( &editor, - Color::rgba8(255, 255, 255, 255), - Color::rgba8(255, 0, 0, 255), - Color::rgba8(0, 0, 255, 255), - Color::rgba8(255, 255, 255, 255), + Color::from_rgba8(255, 255, 255, 255), + Color::from_rgba8(255, 0, 0, 255), + Color::from_rgba8(0, 0, 255, 255), + Color::from_rgba8(255, 255, 255, 255), ), } } @@ -116,48 +164,6 @@ struct BufferGlyphRun { glyph_color: Color, } -pub(super) fn cosmic_text(scene: &mut Scene, scene_params: &mut SceneParams) { - let buffer_glyphs = &scene_params.cosmic_text_scene_state.buffer_glyphs; - let vello_fonts = &scene_params.cosmic_text_scene_state.vello_fonts; - - let text_transform = Affine::translate((500.0, 300.0)); - - // Draw the Glyphs - for buffer_line in &buffer_glyphs.buffer_lines { - for glyph_highlight in &buffer_line.glyph_highlights { - scene.fill( - Fill::NonZero, - text_transform, - buffer_glyphs.glyph_highlight_color, - None, - glyph_highlight, - ); - } - - if let Some(cursor) = &buffer_line.cursor { - scene.fill( - Fill::NonZero, - text_transform, - buffer_glyphs.cursor_color, - None, - cursor, - ); - } - - for glyph_run in &buffer_line.glyph_runs { - let font = vello_fonts.get(&glyph_run.font).unwrap(); - let glyph_color = glyph_run.glyph_color; - let glyphs = glyph_run.glyphs.clone(); - scene - .draw_glyphs(font) - .font_size(buffer_glyphs.font_size) - .brush(glyph_color) - .transform(text_transform) - .draw(Fill::NonZero, glyphs.into_iter()); - } - } -} - struct EditorInfo { cursor_color: Color, selection_color: Color, @@ -215,8 +221,8 @@ fn create_glyphs( let mut buffer_glyphs = BufferGlyphs { font_size: buffer.metrics().font_size, - glyph_highlight_color: Default::default(), - cursor_color: Default::default(), + glyph_highlight_color: Color::WHITE, + cursor_color: Color::WHITE, buffer_lines: vec![], }; @@ -305,12 +311,12 @@ fn create_glyphs( for glyph in layout_run.glyphs { let mut glyph_color = match glyph.color_opt { - Some(color) => Color::rgba8(color.r(), color.g(), color.b(), color.a()), + Some(color) => Color::from_rgba8(color.r(), color.g(), color.b(), color.a()), None => text_color, }; if let Some(editor_info) = &editor_info { - if text_color != editor_info.selected_text_color { + if text_color.components != editor_info.selected_text_color.components { if let Some((start, end)) = editor_info.selection_bounds { if line_i >= start.line && line_i <= end.line @@ -324,7 +330,7 @@ fn create_glyphs( } if let Some((last_font, last_glyph_color)) = last_font { - if last_font != glyph.font_id || last_glyph_color != glyph_color { + if last_font != glyph.font_id || last_glyph_color.components != glyph_color.components { buffer_line.glyph_runs.push(BufferGlyphRun { font: last_font, glyphs: current_glyphs, diff --git a/examples/scenes/src/lib.rs b/examples/scenes/src/lib.rs index 0e4f986a..ccf29031 100644 --- a/examples/scenes/src/lib.rs +++ b/examples/scenes/src/lib.rs @@ -35,7 +35,6 @@ pub mod test_scenes; #[cfg(feature = "cosmic_text")] pub mod cosmic_text_scene; -use anyhow::{anyhow, Result}; use clap::Args; pub use images::ImageCache; pub use simple_text::SimpleText; @@ -47,9 +46,6 @@ use vello::kurbo::Vec2; use vello::peniko::{color, Color}; use vello::Scene; -#[cfg(feature = "cosmic_text")] -use crate::cosmic_text_scene::CosmicTextSceneState; - pub struct SceneParams<'a> { pub time: f64, /// Whether blocking should be limited @@ -61,8 +57,6 @@ pub struct SceneParams<'a> { pub resolution: Option, pub base_color: Option, pub complexity: usize, - #[cfg(feature = "cosmic_text")] - pub cosmic_text_scene_state: &'a CosmicTextSceneState, } pub struct SceneConfig { diff --git a/examples/scenes/src/test_scenes.rs b/examples/scenes/src/test_scenes.rs index 39703ebb..ec8564ba 100644 --- a/examples/scenes/src/test_scenes.rs +++ b/examples/scenes/src/test_scenes.rs @@ -61,7 +61,6 @@ macro_rules! scene { } export_scenes!( - #[cfg(feature = "cosmic_text")] cosmic_text_scene(cosmic_text), splash_with_tiger(impls::splash_with_tiger(), "splash_with_tiger", false), funky_paths(funky_paths), stroke_styles(impls::stroke_styles(Affine::IDENTITY), "stroke_styles", false), @@ -89,7 +88,8 @@ export_scenes!( many_draw_objects(many_draw_objects), blurred_rounded_rect(blurred_rounded_rect), image_sampling(image_sampling), - image_extend_modes(image_extend_modes) + image_extend_modes(image_extend_modes), + #[cfg(feature = "cosmic_text")] cosmic_text_scene(crate::cosmic_text_scene::CosmicTextSceneState::default(), "cosmic_text", false) ); /// Implementations for the test scenes. @@ -111,9 +111,6 @@ mod impls { const FLOWER_IMAGE: &[u8] = include_bytes!("../../assets/splash-flower.jpg"); - #[cfg(feature = "cosmic_text")] - pub(super) use crate::cosmic_text_scene::cosmic_text; - pub(super) fn emoji(scene: &mut Scene, params: &mut SceneParams) { let text_size = 120. + 20. * (params.time * 2.).sin() as f32; let s = "🎉🤠✅"; diff --git a/examples/with_winit/src/lib.rs b/examples/with_winit/src/lib.rs index e4fdcd27..05a44351 100644 --- a/examples/with_winit/src/lib.rs +++ b/examples/with_winit/src/lib.rs @@ -41,9 +41,6 @@ use vello::peniko::{color::palette, Color}; use vello::util::{RenderContext, RenderSurface}; use vello::{low_level::BumpAllocators, AaConfig, Renderer, RendererOptions, Scene}; -#[cfg(feature = "cosmic_text")] -use scenes::cosmic_text_scene::CosmicTextSceneState; - use winit::dpi::LogicalSize; use winit::event_loop::EventLoop; use winit::window::{Window, WindowAttributes}; @@ -179,9 +176,6 @@ struct VelloApp<'s> { modifiers: ModifiersState, debug: DebugLayers, - - #[cfg(feature = "cosmic_text")] - cosmic_text_scene_state: CosmicTextSceneState, } impl ApplicationHandler for VelloApp<'_> { @@ -488,8 +482,6 @@ impl ApplicationHandler for VelloApp<'_> { base_color: None, interactive: true, complexity: self.complexity, - #[cfg(feature = "cosmic_text")] - cosmic_text_scene_state: &self.cosmic_text_scene_state, }; example_scene .function @@ -766,8 +758,6 @@ fn run( prev_scene_ix: 0, modifiers: ModifiersState::default(), debug, - #[cfg(feature = "cosmic_text")] - cosmic_text_scene_state: CosmicTextSceneState::new(), }; event_loop.run_app(&mut app).expect("run to completion"); diff --git a/vello_tests/src/lib.rs b/vello_tests/src/lib.rs index fd20a8a2..30a1151f 100644 --- a/vello_tests/src/lib.rs +++ b/vello_tests/src/lib.rs @@ -57,9 +57,6 @@ pub use snapshot::{ smoke_snapshot_test_sync, snapshot_test, snapshot_test_sync, Snapshot, SnapshotDirectory, }; -#[cfg(feature = "cosmic_text")] -use scenes::cosmic_text_scene::CosmicTextSceneState; - pub struct TestParams { pub width: u32, pub height: u32, @@ -269,8 +266,6 @@ pub fn encode_test_scene(mut test_scene: ExampleScene, test_params: &mut TestPar interactive: false, resolution: None, text: &mut text, - #[cfg(feature = "cosmic_text")] - cosmic_text_scene_state: &CosmicTextSceneState::default(), }; test_scene .function