FR-DSP-8's acquisition half. `dr_plat::display` surveys the session's
displays and reduces each one's profile to an output space the pipeline
can encode into, stating the mechanism per display server as
FR-PLAT-LIN-2 requires:
- X11 reads the `_ICC_PROFILE` / `_ICC_PROFILE_<n>` root-window
properties, enumerating and numbering the outputs through RandR,
which also yields the rectangles a window move is measured against.
- Wayland binds `wp_color_manager_v1` and asks each `wl_output` for
its image description, accepting either an ICC profile on a file
descriptor or primaries stated as chromaticities.
- Where neither answers, sRGB is assumed and the reason travels with
it as data rather than into a log, so the About page can say which
path the session is on.
A display profile is a measurement of one panel and is none of the four
spaces the pipeline knows. Rather than grow an ICC engine, the profile
is reduced to D50-adapted colorants and matched against the four; a
match that is merely nearest is marked as such and shown as such.
Verified on this machine: mutter 50 advertises the colour-management
global and reports eDP-1 as sRGB, and the same session forced onto X11
enumerates the output through RandR and correctly finds no atom.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
24 lines
707 B
Rust
24 lines
707 B
Rust
//! Platform abstraction for DarkRoom.
|
|
//!
|
|
//! Traits are defined here and implemented per platform, then injected at
|
|
//! construction, so `core/` contains no `#[cfg(target_os)]` (NFR-PORT-1,
|
|
//! ARCH §10).
|
|
|
|
pub mod display;
|
|
pub mod secrets;
|
|
pub mod storage;
|
|
pub mod volumes;
|
|
|
|
pub use display::{
|
|
Bounds, DisplayInfo, DisplayProfile, DisplayServer, DisplaySurvey, FallbackReason,
|
|
ProfileSource,
|
|
};
|
|
pub use secrets::{
|
|
EphemeralSecretStore, PlatformSecretStore, SecretError, SecretKind, SecretRef, SecretStore,
|
|
};
|
|
pub use storage::{
|
|
DirRef, Entry, LocalStorage, NewFile, Node, SeekableRead, Storage, StorageError,
|
|
WritableStorage,
|
|
};
|
|
pub use volumes::{imports_supported, volumes, Volume};
|