Phase 6.1 — compositor-core skeleton + 12 tests unitaires
Crate redox-wl-compositor-core (lib pure Rust, sans deps externes) : - SurfaceId : newtype u64 opaque - SurfaceBuffer : Arc<Vec<u32>> ARGB8888 + width/height - SurfaceState : x, y, buffer, visible - Surface : id + current + pending + commit() - SurfaceRegistry : HashMap<SurfaceId, Surface> + z_order Vec - create() / destroy() / raise() - get() / get_mut() / commit() / modify_pending() - iter_z_order_back_to_front() pour la composition Sémantique Wayland (pending → current via commit) prévue dans l'API mais implémentation triviale (clone). Pas de damage tracking, pas de double-buffer atomique : reportés à 6.4 quand wl_shm/xdg-shell arriveront. 12 tests unitaires : - création/destruction/idempotence - z-order par défaut + raise sur top/non-top/unknown - pending vs current state séparés - commit propage pending → current - destroyed surface skipped during iteration - workflow compositor typique end-to-end (3 fenêtres + raise) Tous passent en cargo test natif (0.77s release). La crate compile aussi pour x86_64-unknown-redox via redoxer (pure Rust, aucune dep system). Phase 6.1 close. Suite : 6.2 (compose_into RedoxOutput). Leyoda 2026 – GPLv3
This commit is contained in:
parent
a9bb88d9f3
commit
e3e554ac92
2 changed files with 451 additions and 0 deletions
9
crates/redox-wl-compositor-core/Cargo.toml
Normal file
9
crates/redox-wl-compositor-core/Cargo.toml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[package]
|
||||
name = "redox-wl-compositor-core"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
description = "Compositor core: surfaces, registry, z-order. OS-agnostic."
|
||||
|
||||
[dependencies]
|
||||
# Pure Rust, no external deps for the core types.
|
||||
# Backends (display/input) and frontends (wayland) live in separate crates.
|
||||
Loading…
Add table
Add a link
Reference in a new issue