Skip to main content

Module wasm_media

Module wasm_media 

Source
Expand description

IM.7 — WASM inline media: producer → per-buffer blocks → virtual rows.

The media twin of wasm_decorations, and the same shape for the same reason: a media plugin’s producer runs OFF the render path (paramount goal #1), and the renderer reads only a native cache.

What is different is what the cache feeds. Decorations end up as gutter marks; media blocks end up as virtual rows, which means they change the document’s display-row count and therefore its scroll arithmetic. The reservation is built here, host-side, from a size the host resolves — the guest never says how tall anything is.

Structs§

MediaVirtualRowProvider
IM.7 — the virtual-row provider that turns cached media blocks into rows.
WasmMediaCache
Per-buffer cache of a media plugin’s blocks, resolved and sized.
WasmMediaState
The Editor’s cohesive WASM-media wiring. Defaults to inert, so Editor::default() test fixtures get no media seam at all.

Constants§

PROVISIONAL_ROWS
How tall a block is, in display rows, before its file has been measured.
UNREADABLE_ROWS
Rows reserved for a block whose file could not be measured.

Functions§

media_virtual_row_provider_id
The lattice_cells::ProviderId of buffer_id’s media provider.

Type Aliases§

MediaGeometry
(line_height_px, pane_width_px) — what sizing a block needs, and the only pixel geometry the host holds. None means no peer that draws images has published its cell metrics.