API

Interface DeviceLostRecoveryCallbacks

Callback surface shared by public rendering-context device-recovery enablers.

interface DeviceLostRecoveryCallbacks {
    onLost?: (info: GPUDeviceLostInfo) => void;
    onRecovered?: () => void;
    onRecoveryFailed?: (error: unknown) => void;
}
Index
onLost?: (info: GPUDeviceLostInfo) => void

Called immediately after loss is detected and before a replacement device is requested.

onRecovered?: () => void

Called after the replacement device, surfaces, and enabled rendering contexts are ready.

onRecoveryFailed?: (error: unknown) => void

Called when replacement-device acquisition or rendering-context rebuilding fails.