Could we have a flag to build it with JPEG XL support? Looking at toolkit/moz.configure, it may be necessary to patch it a little, as FWIU it enables it only for "nightly" builds: @depends("--disable-jxl", milestone.is_nightly) def jxl(value, is_nightly): if is_nightly and value: return True
Hasn't mozilla stopped implementing jpeg-xl about a year ago? Or did they revert that position lately?
No clue. The bug is, well, inconclusive. The code's still there, and apparently enabled on nightly builds. Since Safari implemented it, they have some motivation now.
Yeah, the jpeg-xl support was never fully implemented and doesn't look lik there's much happening after the policy update "rejecting" jpeg-xl. However and to my surprise they've updated the bundled jpeg-xl to 0.9.0 from December 2022. Highway is a bit older, 1.0.4 from March 2023 (before the policy update). I'm kind of against patching these things because we end up carrying these custom patches and they're PITA to rebase every few releases. But if jpeg-xl can be easily enabled, I'm in for enabling it as package.use.masked for now, and trying to get some real-life use for it with Gentoo. There's probably more than one condition in the code though to enable it, but haven't checked. Another thing is, enabling support for system-jxl instead of the bundled one could be painful.
(In reply to Joonas Niilola from comment #3) > However > and to my surprise they've updated the bundled jpeg-xl to 0.9.0 from > December 2022. * 2023
I wanted to try enabling it, but I've got stuck on bug #928137.
Created attachment 889285 [details] screenshot of test page Well, indeed it seems that they didn't finish it. Animations don't work and the image with alpha channel looks weird.
So uhh do we want to pursue this or not?
I honestly don't know. I'm using the following patch, though I suppose it could be made shorter: diff --git a/toolkit/moz.configure b/toolkit/moz.configure index b616109..b669b42 100644 --- a/toolkit/moz.configure +++ b/toolkit/moz.configure @@ -763,17 +763,8 @@ set_define("MOZ_AV1", av1) # JXL Image Codec Support # ============================================================== -option("--disable-jxl", help="Disable jxl image support") - - -@depends("--disable-jxl", milestone.is_nightly) -def jxl(value, is_nightly): - if is_nightly and value: - return True - - -set_config("MOZ_JXL", jxl) -set_define("MOZ_JXL", jxl) +set_config("MOZ_JXL", True) +set_define("MOZ_JXL", True) set_config("MOZ_SAMPLE_TYPE_FLOAT32", True) set_define("MOZ_SAMPLE_TYPE_FLOAT32", True) So it's trivial to do, and a nice way to test stuff. Also, you need to enable it via about:config, so it's not exactly harmful to build with it (except for the extra rebuilds due to SOVERSION changes). But then, it's not really useful right now either.
...and in 125.0.1, it doesn't build anymore.
Created attachment 915845 [details, diff] patch to enable jpeg xl works for me on 133.0.3