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
/// Exact ABI byte size of one `GpuLayoutNodeInput` storage record (`64` bytes).
pub const GPU_LAYOUT_NODE_INPUT_BYTES: usize = 64;
/// Exact ABI byte size of one `GpuLayoutNodeOutput` storage record (`32` bytes).
pub const GPU_LAYOUT_NODE_OUTPUT_BYTES: usize = 32;
/// Exact ABI byte size of one `GpuVisualStyleInput` storage record (`48` bytes).
pub const GPU_VISUAL_STYLE_INPUT_BYTES: usize = 48;
/// Sentinel index representing an absent parent, child, or unreachable arena slot inside `FlatBfsTopology`.
pub const GPU_LAYOUT_INDEX_NONE: u32 = u32MAX;
/// Maximum byte gap between two dirty buffer spans merged into a single GPU upload range (`256` bytes).
pub const DIRTY_SPAN_MERGE_GAP_BYTES: usize = 256;
/// `GpuLayoutNodeInput::flags_kind` bit shift storing the 2-bit width sizing mode (`Auto`/`Px`/`Percent`/`Viewport`).
pub const GPU_LAYOUT_WIDTH_MODE_SHIFT: u32 = 20;
/// `GpuLayoutNodeInput::flags_kind` bit shift storing the 2-bit height sizing mode (`Auto`/`Px`/`Percent`/`Viewport`).
pub const GPU_LAYOUT_HEIGHT_MODE_SHIFT: u32 = 22;
/// `GpuLayoutNodeInput::flags_kind` bit indicating the SoA node requires layout recomputation this frame.
pub const GPU_SOA_FLAG_DIRTY: u32 = 1 << 24;
/// `GpuLayoutNodeInput::flags_kind` bit indicating `extra_or_intrinsic[2..4]` holds pre-measured leaf intrinsic dimensions.
pub const GPU_LAYOUT_FLAG_PREMEASURED_LEAF: u32 = 1 << 25;
/// `GpuLayoutNodeInput::flags_kind` bit indicating this node is a text leaf that may wrap under narrower widths.
pub const GPU_LAYOUT_FLAG_WRAPPING_TEXT: u32 = 1 << 26;
/// `GpuLayoutNodeInput::flags_kind` bit indicating this node is a top-layer portal or `Position::Fixed` overlay.
pub const GPU_LAYOUT_FLAG_IS_PORTAL: u32 = 1 << 27;
/// `GpuLayoutNodeInput::flags_kind` bit indicating this node is a clipped scroll container.
pub const GPU_LAYOUT_FLAG_IS_SCROLL: u32 = 1 << 28;
/// Encoded sizing mode tag for `Length::Auto` inside `GpuLayoutNodeInput::flags_kind`.
pub const GPU_SIZE_MODE_AUTO: u32 = 0;
/// Encoded sizing mode tag for definite pixel `Length::Px` inside `GpuLayoutNodeInput::flags_kind`.
pub const GPU_SIZE_MODE_PX: u32 = 1;
/// Encoded sizing mode tag for parent-relative `Length::Percent` inside `GpuLayoutNodeInput::flags_kind`.
pub const GPU_SIZE_MODE_PERCENT: u32 = 2;
/// Encoded sizing mode tag for viewport-relative (`vw`/`vh`/`fr`) lengths inside `GpuLayoutNodeInput::flags_kind`.
pub const GPU_SIZE_MODE_VIEWPORT: u32 = 3;
/// Fixed-point Q16 scale representing full `1.0` opacity in `GpuVisualStyleInput::opacity_q16`.
pub const GPU_VISUAL_OPACITY_Q16_MAX: f32 = 65_535.0;