Files
Sergio d251eb32b6 chore: refresco desde el monorepo — vello 0.9 / wgpu 29, 120 miembros
El repo publico se habia quedado en julio: el README anunciaba vello 0.7 +
wgpu 27 (dos bumps atras) y faltaban los crates del ultimo mes.

- refresco con scripts/actualizar-standalone.py --llimphi (cargo check OK)
- llegan llimphi-cpu, llimphi-hybrid, llimphi-glifos y llimphi-wire-escena:
  los cuatro caminos a pixeles con un solo compositor
- MANUAL.md / SDD.md / LEEME.md sincronizados con el monorepo
- README: versiones al dia, install por crates.io (cargo add llimphi),
  seccion "beyond the 2D widget kit" y el indice de crates que apuntaba
  al propio README ahora apunta a MANUAL.md §19
2026-08-06 17:26:11 +00:00
..

llimphi-surface

External surfaces inside the Elm loop.

An ExternalSurface is an RGBA8 texture living on the GPU, painted over a rect of the Llimphi frame every time the app exposes it through View::gpu_paint_with. The byte source runs outside the Elm loop: a video decoder, a camera capture, a PDF raster, a raw texture produced by another engine — any producer generating RGBA can push frames with ExternalSurface::upload and see the result on the next raster pass.

The crate provides:

  • ExternalSurface: owner of the texture + render pipeline + bind group. upload(rgba, w, h) uploads bytes and recreates the texture if w/h changed.
  • ExternalSurface::view: a helper that builds a View with gpu_paint_with already wired. The app only chooses the node's Style (which portion of the layout it occupies).

Design

The pipeline is a classic textured quad: two triangles cover the destination rect, and the fragment shader samples the external texture with a bilinear sampler. The quad's NDC coordinates are computed on the GPU from (rect, viewport) travelling through a uniform — which is why the callback needs the viewport that llimphi-ui began propagating in GpuPaintFn.

The intermediate texture Llimphi paints vello into is Rgba8Unorm (see llimphi-hal::INTERMEDIATE_FORMAT). The pipeline emits Rgba8Unorm too — the render pass target is that same intermediate with LoadOp::Load, so the vello background is preserved.


Part of llimphi — see llimphi.