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
//! URX Engine — cross-backend façade with per-region dirty tracking.
//!
//! ## What it owns
//!
//! - `regions: HashMap<RegionId, RegionState>` — one entry per
//! independently-renderable region (consumer-declared).
//! - Per-region `DirtyState` (`Clean | TransformOnly | Content`) +
//! `Affine` transform (so transform-only changes never trigger
//! rasterisation).
//! - `dirty_union: DirtyRect` — union of all regions' dirty bboxes
//! since last clear. Driver calls `needs_paint()` to read it.
//! - `RenderCadence` per region (Static / LowHz / HighHz / Forced).
//!
//! ## What it doesn't own
//!
//! - Cadence policy (Always / OnInput / Fps{N} / Manual) — that lives
//! in the driver/kernel layer (consumer's `winit::ApplicationHandler`
//! or equivalent). The engine just exposes `needs_paint()` so the
//! driver can short-circuit idle frames.
//! - Backend choice — passed in at construction (`Cpu` / `Wgpu` /
//! `Hybrid` after Phase 7).
//!
//! ## Contract
//!
//! ```ignore
//! let mut engine = UrxEngine::new_cpu(width, height);
//! engine.upsert_region(region_id, scene, bounds, Cadence::Static);
//! // ... consumer state changes ...
//! engine.mark_dirty(region_id);
//!
//! // driver per frame:
//! if let Some(rect) = engine.needs_paint() {
//! engine.render_cpu(&mut pixmap);
//! // present pixmap; engine resets dirty state internally.
//! }
//! ```
pub use DEFAULT_CACHE_BUDGET_BYTES;
pub use RenderCadence;
pub use ;
pub use RegionState;