Commit Graph
3 Commits
Author SHA1 Message Date
waozi 9dac516149 web present shim: take the GL context before hiding the canvas (display:none canvases cannot create contexts in some engines) 2026-08-14 22:07:28 -05:00
waozi 5a7eb4d38f web present shim: ?kryonpresent=debug forces activation and reports state via document.title 2026-08-14 22:04:48 -05:00
waozi 1982f978b1 web: kryon-web-present.js — 2D-canvas present mode for WebKitGTK+software GL
WebKitGTK's DMABUF compositor leaks ~one full-canvas buffer per
composited frame on the software-GL path (measured: bare WebGL clear
loop 50 MB/s, full app 150 MB/s, web process dead in minutes; plain 2D
putImageData presentation stays flat at 58 fps). The shim detects
WebKit-family UA + software renderer, creates the GL context on a
display:none canvas (never composited = cannot leak) handed to
Emscripten via Module.preinitializedWebGLContext, points Module.canvas
at the visible canvas (input/resize unchanged), and blits each frame
into its 2D context with fully reused buffers. No-ops on Chromium,
Firefox, and hardware-GL WebKit. Apps opt in with one script tag before
their Emscripten bootstrap.
2026-08-14 21:42:13 -05:00