(tex: GPUTexture | null)
| 1928 | let overlayBlitBindGroup: GPUBindGroup | null = null; |
| 1929 | |
| 1930 | const destroyTexture = (tex: GPUTexture | null): void => { |
| 1931 | if (!tex) return; |
| 1932 | try { |
| 1933 | tex.destroy(); |
| 1934 | } catch { |
| 1935 | // best-effort |
| 1936 | } |
| 1937 | }; |
| 1938 | |
| 1939 | const ensureOverlayTargets = (canvasWidthDevicePx: number, canvasHeightDevicePx: number): void => { |
| 1940 | const w = Number.isFinite(canvasWidthDevicePx) ? Math.max(1, Math.floor(canvasWidthDevicePx)) : 1; |
no test coverage detected