Files
vectorcraft/crates/ui-egui/Cargo.toml
Jürg Lehni a92f0264c2 Canvas: each update copies the rendered frame whole instead of pixel by pixel
The renderer's pixels and egui's are both premultiplied RGBA8, so color_image copies the bytes in one go. At 3456×2234 that takes 0.9 ms instead of 3.4 ms per update, at 5120×2880 1.6 ms instead of 6.8 ms. Every rendered image the UI shows (canvas, thumbnails, previews) goes through it.
2026-10-22 00:54:44 +07:00

66 lines
2.5 KiB
TOML

[package]
name = "vectorcraft-ui-egui"
version.workspace = true
edition.workspace = true
license.workspace = true
description = "VectorCraft egui frontend (menus, panels, tools and canvas); swappable — nothing below depends on it"
[lints]
workspace = true
[features]
default = ["bundled-fonts"]
# The fonts vectorcraft-text bundles for documents, through the engine's `bundled-fonts`. Off, for
# an embedder that supplies every document font at run time (`vectorcraft_text::FontDb::add_font`);
# the interface's own faces are separate copies in theme.rs and stay either way.
bundled-fonts = ["vectorcraft-engine/bundled-fonts"]
[dependencies]
craft-ui = { workspace = true }
vectorcraft-geom = { workspace = true }
vectorcraft-color = { workspace = true }
vectorcraft-doc = { workspace = true }
vectorcraft-brush = { workspace = true }
vectorcraft-render = { workspace = true }
vectorcraft-text = { workspace = true }
vectorcraft-tools = { workspace = true }
vectorcraft-engine = { workspace = true }
vectorcraft-svg = { workspace = true }
vectorcraft-effects = { workspace = true }
vectorcraft-three-d = { workspace = true }
vectorcraft-plugins = { workspace = true }
vectorcraft-pdf = { workspace = true }
vectorcraft-cad = { workspace = true }
vectorcraft-eps = { workspace = true }
vectorcraft-format = { workspace = true }
egui = { workspace = true, features = ["bytemuck"] }
# With egui's `bytemuck`: copies rendered rasters into egui images whole (`canvas::color_image`).
bytemuck = "1"
egui_extras = { workspace = true }
image = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
log = { workspace = true }
[target.'cfg(target_arch = "wasm32")'.dependencies]
# `now_ms` (src/lib.rs) reads the page's `performance.now()` with this crate in the web build. It is
# MIT OR Apache-2.0 and already in the build through eframe.
web-time = "1"
# The current user's id (`geteuid`): Preview in Browser uses its temporary folder only when that
# user owns it (src/dialogs/save_for_web.rs). Already in Cargo.lock (tempfile), so this adds no
# new crate.
[target.'cfg(unix)'.dependencies]
rustix = { workspace = true, features = ["std", "process"] }
[dev-dependencies]
egui_kittest = { workspace = true, features = ["wgpu", "snapshot"] }
vectorcraft-testkit = { workspace = true }
# A variable font built in code (no font file is committed).
vectorcraft-text = { workspace = true, features = ["test-fonts"] }
wat = { workspace = true }
[build-dependencies]
serde_json = { workspace = true }
toml = "1"