1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
//! **`facett-core::render`** — the L0 shared render kernel both map skins and
//! `facett-graphview` draw through (the CONS-CORE seam).
//!
//! Phase A landed the pure additions ([`camera`], [`layer`], the moved scissor, the
//! GPU scaffold). **Phase B** adds the net-new L0 SDF kernel + the backend-swap
//! seam:
//!
//! - [`prim`] — the SDF instance vocabulary
//! ([`QuadInstance`](prim::QuadInstance)/[`LineInstance`](prim::LineInstance) +
//! the `Circle`/`Ring`/`Marker` constructors), `bytemuck`-able for the GPU path.
//! - [`cpu`] — the CPU lane: the SDF coverage math ([`cpu::sdf`]) + [`CpuCanvas`]
//! rasterizing onto a `vello_cpu` pixmap, plus the moved rect scissor.
//! - [`gpu`] (feature `wgpu`) — the [`GpuSdfRenderer`](gpu::sdf_pipeline::GpuSdfRenderer):
//! instanced quads with a fragment-shader SDF (circle/ring/marker) + thick AA
//! instanced lines, on the Phase-A install lifecycle + bytemuck plumbing.
//! - [`backend`] — the [`decide`](backend::decide)`(probe) -> `[`Backend`] policy
//! (lifted from graphview).
//! - [`Canvas`] / [`Renderer`] — the backend-swap seam traits. Both
//! [`CpuRenderer`](cpu::CpuRenderer) and (feature `wgpu`)
//! [`GpuSdfRenderer`](gpu::sdf_pipeline::GpuSdfRenderer) satisfy them.
/// **GPU ADAPTER SELECTION** — the pure, feature-free policy that decides which
/// physical device facett renders on (discrete GPU first; ASPEED/Matrox BMC
/// management displays and llvmpipe/lavapipe software rasterisers LAST), plus the
/// `FACETT_GPU_ADAPTER` override and the `state_json`-publishable decision record.
/// The wgpu glue lives in `gpu::adapter_wgpu`. See [`adapter`].
/// The **"cyber-toon" decoration kernel** — domain-agnostic, pure-CPU L0 beauty
/// helpers (glow halos, AO drop-shadows, animated dash-array strokes, particle
/// tracers, shockwave rings, CPU bloom, gradient-by-scalar). Zero GPU/vello, so
/// they light up identically native AND on wasm; all animation is injected-clock
/// driven so snapshots stay deterministic. See [`decor`].
/// **GPU LANE ATTRIBUTION** — the pure, feature-free registry that answers the
/// *other* half of the GPU question [`adapter`] cannot: is a facett GPU lane
/// actually painting, or is the app silently on the CPU painter? Folds to
/// [`lane::GpuLaneUse`] (`in_use` / `installed_unused` / `not_installed` /
/// **`unknown`**), and carries the whole story — adapter + lane — as
/// [`lane::GpuStatus`] for an About card, a status bar and a robot to share. See
/// [`lane`].
/// **THE unified view core (GFX_V2 item 6)** — a 2D map IS a 3D view under
/// constraints (tilt 0, bearing 0, orthographic, `Z(x,y) ≡ 0`, post-FX bypassed).
/// One projection writer for `facett-map` and `facett-map3d`, so an AA / miter /
/// typography / precision fix lands in both modes at once. See [`view`].
/// **THE shader text** — every `.wgsl` source string, `include_str!`ed exactly once,
/// plus the `wgsl` prelude composer and the shader-CONTRACT guards. NOT behind
/// feature `wgpu`, on purpose: text needs no adapter, and gating it is what kept
/// `cull_shader_keeps_its_per_way_contract` from ever running on a default build.
/// See [`wgsl`].
/// The **L1 vello beauty overlay** (feature `l1-vello`) — gradients, antialiased
/// curves, gaussian blur / effects composited on top of the L0 SDF base. Desktop
/// GPU only; never required (L0 stands alone). See [`l1`].
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
/// A rendered frame: straight (un-premultiplied) RGBA8, row-major, `width × height`.
/// The CPU lane composites into this; the GPU lane reads it back for a parity test.
/// Mirrors graphview's `Rendered` so a skin can move over without a shape change.
/// **The drawing surface** — the galileo-style backend-swap seam. A host pushes
/// SDF instance batches; the concrete canvas (CPU pixmap or wgpu callback) decides
/// how they become pixels. Domain-agnostic: a map point, a graph node, and a POI
/// are all just quads; a road and an edge are all lines.
/// **The renderer** — opens a [`Canvas`] for a frame, then presents it. The
/// 2-category swap (CPU / CPU+GPU) is expressed entirely as which `Renderer` the
/// host holds; the draw code is written once against [`Canvas`].
pub use ;