FlushReason
Defined in: frameCapture.ts:29
Memory-safety model for this module
Section titled “Memory-safety model for this module”Every function here reads from WASM-owned memory and returns values the caller may hold across later frames. To stay safe when WASM memory grows or the renderer reuses its capture buffer, we never return a typed array that views the WASM heap — we copy primitives into fresh JS objects / buffers before returning.
- decodeFrameCapture copies every field out as plain
numbers and numeric arrays. The intermediateDataViewandUint32Arrayviews are local and dropped as soon as the function returns. - getSnapshotImageData reads pixel rows from the heap view into a
freshly-allocated
Uint8ClampedArray(“flipped”) and wraps that JS-owned buffer in the returned ImageData.
Do NOT “optimize” either function by returning a heap-backed typed array directly — a subsequent WASM alloc/grow would detach it or the renderer would overwrite the bytes on the next capture, handing the caller silent corruption.
Enumeration Members
Section titled “Enumeration Members”BatchFull
Section titled “BatchFull”BatchFull:
0
Defined in: frameCapture.ts:30
BlendModeChange
Section titled “BlendModeChange”BlendModeChange:
5
Defined in: frameCapture.ts:35
FrameEnd
Section titled “FrameEnd”FrameEnd:
8
Defined in: frameCapture.ts:38
MaterialChange
Section titled “MaterialChange”MaterialChange:
4
Defined in: frameCapture.ts:34
ScissorChange
Section titled “ScissorChange”ScissorChange:
2
Defined in: frameCapture.ts:32
StageEnd
Section titled “StageEnd”StageEnd:
6
Defined in: frameCapture.ts:36
StencilChange
Section titled “StencilChange”StencilChange:
3
Defined in: frameCapture.ts:33
TextureSlotsFull
Section titled “TextureSlotsFull”TextureSlotsFull:
1
Defined in: frameCapture.ts:31
TypeChange
Section titled “TypeChange”TypeChange:
7
Defined in: frameCapture.ts:37