Detect HW acceleration; default lava off on software renderer; release probe WebGL context

Probes UNMASKED_RENDERER_WEBGL once per page via a throwaway WebGL context; defaults the lava subsystem off on a positive software-renderer match or total WebGL failure; releases the throwaway context via WEBGL_lose_context after reading the renderer string to avoid exhausting the browser's per-page context limit.
This commit is contained in:
daniel-c-harvey
2026-06-26 10:41:07 -04:00
parent 0e8b85bbcb
commit 020a945843
6 changed files with 398 additions and 0 deletions
@@ -46,6 +46,11 @@
import { decodePressure } from '../audio/decodePressure.js';
// Re-exported so the Blazor bridge (WaveformVisualizer.razor.cs) reaches the HW-accel probe through
// the same module reference it already imports for create() — one JS import surface, no second handle.
// The probe itself (and its unit-tested pure classifier) lives in hwAccel.ts.
export { detectHardwareAcceleration } from './hwAccel.js';
// ── Tuning anchors (see spec §B). These are the load-bearing constants. ──────────
/**