Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
AustinMReppert committed Dec 2, 2024
1 parent f8a22af commit 07d30e0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/headless/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ png = "0.17.14"
futures-intrusive = { workspace = true }

[features]
cosmic_text = ["scenes/cosmic_text"]
cosmic_text = ["scenes/cosmic_text"]
2 changes: 1 addition & 1 deletion examples/scenes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ web-time = { workspace = true }
getrandom = { version = "0.2.15", features = ["js"] }

[features]
cosmic_text = ["dep:cosmic-text", "dep:unicode-segmentation"]
cosmic_text = ["dep:cosmic-text", "dep:unicode-segmentation"]
10 changes: 4 additions & 6 deletions examples/scenes/src/cosmic_text_scene.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ use std::cmp;
use std::collections::HashMap;
use std::sync::Arc;

pub struct CosmicData {}

impl TestScene for CosmicTextSceneState {
impl TestScene for CosmicTextScene {
fn render(&mut self, scene: &mut Scene, _scene_params: &mut SceneParams) {
let buffer_glyphs = &self.buffer_glyphs;
let vello_fonts = &self.vello_fonts;
Expand Down Expand Up @@ -67,13 +65,13 @@ impl TestScene for CosmicTextSceneState {
}
}

pub struct CosmicTextSceneState {
pub struct CosmicTextScene {
pub font_system: FontSystem,
pub vello_fonts: HashMap<ID, Font>,
pub buffer_glyphs: BufferGlyphs,
}

impl Default for CosmicTextSceneState {
impl Default for CosmicTextScene {
fn default() -> Self {
Self::new()
}
Expand All @@ -96,7 +94,7 @@ impl AsRef<[u8]> for CosmicFontBlobAdapter {
}
}

impl CosmicTextSceneState {
impl CosmicTextScene {
pub fn new() -> Self {
let mut font_system = FontSystem::new();
let mut vello_fonts = HashMap::new();
Expand Down
2 changes: 1 addition & 1 deletion examples/scenes/src/test_scenes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export_scenes!(
blurred_rounded_rect(blurred_rounded_rect),
image_sampling(image_sampling),
image_extend_modes(image_extend_modes),
#[cfg(feature = "cosmic_text")] cosmic_text_scene(crate::cosmic_text_scene::CosmicTextSceneState::default(), "cosmic_text", false)
#[cfg(feature = "cosmic_text")] cosmic_text_scene(crate::cosmic_text_scene::CosmicTextScene::default(), "cosmic_text", false)
);

/// Implementations for the test scenes.
Expand Down
2 changes: 1 addition & 1 deletion vello_tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ image = { workspace = true, features = ["png"] }
scenes = { workspace = true }

[features]
cosmic_text = ["scenes/cosmic_text"]
cosmic_text = ["scenes/cosmic_text"]

0 comments on commit 07d30e0

Please sign in to comment.