Expand description
GPUCanvasContext with a native host presenter and bounded readback fallback.
JSC owns logical contexts; expired drawing buffers can move into a native frame owner without retaining CPU pixels. Readback completions are fenced by context/resize epochs, and no JSC value crosses onto a GPU worker.
Structs§
- Native
Presentation - Native
Source - A borrowed canvas buffer. A presenter must submit its reads before returning.
- Presented
Frame - A published canvas buffer: completed CPU pixels or an ordered native frame.
Traits§
- Native
Frame - Native texture format is straight-alpha BGRA8 on the renderer’s own device. The pointer is borrowed only for the synchronous copy callback.
- Native
Presenter
Functions§
- present
- Published frames only. Native hosts enforce queue ordering during import.
- present_
size - presentation_
stats - (native display frames, asynchronous display readbacks, explicit snapshots).
- register_
present - set_
presenter - take_
presented_ changed - unregister_
present - Keep the weak slot so a retained DOM canvas can be inserted again.