3 ms·
I don't understand the JPEG XL frackus, but that's partly because I think the Web platform should not continue being an enormous ball of mud, with everything bu
by titzer 3y ago
I don't understand the JPEG XL frackus, but that's partly because I think the Web platform should not continue being an enormous ball of mud, with everything built into the browser with no layering.
Make a Wasm module (use SIMD and threads if you want) that can decode the format and render to an immutable canvas and then let the browser engine manage the pixels after that. Wasm is close enough to native speed now that it no longer makes sense to bake this into the native browser binary anymore.
- micheljansen 3y agoThat sounds like a lot more work than just allowing <img src=“my image.jxl”>. Are you proposing that every website comes with their own set of WASM libraries to allow its content to be rendered (each with their own bugs)? Why stop there? Just have the browser manage the canvas and deliver your own HTML rendering engine via WASM?
- titzer 3y agoNo, it's a fail if every website renders itself to the canvas. I think there's a middle ground where, for example, unknown mime/image types can be handed by "application level"--actually middleware or library-level--codecs supplied as Wasm extensions. The browser doesn't have to ship with them, and it doesn't have to trust them the way it does plugins, but they can hook into key places in ways that maximizes the benefit of having a rendering/layout engine, yet is extensible, fast, and secure.