A layer can need a redraw.
Model the WebXR composition-layer lifecycle without pretending a desktop browser owns a native compositor: dirty source, session redraw, resource loss, recovery upload, destroy, and rejected post-destroy work.
Preparing a desktop WebGL2 mirror of one composition layer...
- layer
- -
- source gen
- -
- dest gen
- -
- needs redraw
- -
- uploads
- -
- losses
- -
- invalid ops
- -
- frames
- -
A frame clears needsRedraw only after the destination exists and the source has been uploaded.
The local texture stands in for a desktop destination only. Native XR sub-images are opaque, frame-scoped, and never exposed by this mirror.
The official Layers path requires an immersive session, binding, XR frame, and compositor-owned layer. None is inferred from this desktop run.
This route intentionally stays on WebGL2. It is an application-owned lifecycle mirror, not native XR layer evidence and not a universal WebGPU/WebGL fallback.