Skip to content

Alex313031/thorium-libjxl

Thorium libJXL

      

  • libjxl for Thorium Browser: Restores JPEG-XL functionality to Thorium/Chromium versions post M109.

  • This repo is added as a submodule to the main Thorium repo, and setup.sh therein copies this repos //src/ dir over the Chromium tree, and then Thorium's //src/ dir.

> @mo271's patch which this is based on: https://chromium-review.googlesource.com/c/chromium/src/+/5454316
https://issues.chromium.org/issues/40256897 > @gz83's patch which restores jxl devtools functionality: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4257582 (DEPRECATED)
> Also related, and needed for building is libhighway

– Both libjxl and libhighway versions are bumped to ~ Jun. 2024 revisions.
– For info on versions of these and other things, see the VERSION.md file
– Note that PGO might be slightly less effective unless you generate your own .profdata file from a debug build of Thorium/Chromium.

NOTE: the //external/ dir contains two files. These are modified by Thorium and so are excluded from the //src/ directory. If you want to integrate libjxl back into a vanilla Chromium build, see below.

Building

Thorium Build

Chromium Build

  1. Checkout the Chromium version specified in the VERSION.md file.
# In chromium/src dir #

git checkout -f tags/blahblah # replacing blahblah with the actual tag, i.e. 114.0.5735.134
git clean -ffd # cleans stale or removed dirs
gclient sync --with_branch_heads --with_tags -f -R -D # dont just use 'gclient sync'
  1. Run the ./setup.sh script from within the repo. It assumes the Chromium repo is in $HOME, but can be overridden with the CR_DIR env variable.
  2. Build as normal

NOTE: You could also use the .patch files with git am /path/to/patchfile.patch or git apply --reject /path/to/patchfile.patch.