summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2022-11-10 20:24:24 +0000
committerMoonchild <moonchild@palemoon.org>2022-11-11 12:25:17 +0000
commitfb0c204f2b59485e796b93ce89f73af552b05c2b (patch)
tree2b432422f0ab1b994f72ce2b4492a71b8e6f7eb0
parente6888aa2bd284b48c52c4ea7989330c6d97b64ba (diff)
downloaduxp-fb0c204f2b59485e796b93ce89f73af552b05c2b.tar.gz
Issue #1769 - Follow-up: Default-enable JPEG-XL images if built
Sets the pref default to true and also add conneg entry for images if jxl support is built. Additionally, ifdefs the GfxPref to only observe when jxl is built.
-rw-r--r--gfx/thebes/gfxPrefs.h2
-rw-r--r--modules/libpref/init/all.js6
2 files changed, 7 insertions, 1 deletions
diff --git a/gfx/thebes/gfxPrefs.h b/gfx/thebes/gfxPrefs.h
index cc1d5227b6..7a4ca7ed38 100644
--- a/gfx/thebes/gfxPrefs.h
+++ b/gfx/thebes/gfxPrefs.h
@@ -444,7 +444,9 @@ private:
DECL_GFX_PREF(Live, "image.mozsamplesize.enabled", ImageMozSampleSizeEnabled, bool, false);
DECL_GFX_PREF(Once, "image.multithreaded_decoding.limit", ImageMTDecodingLimit, int32_t, -1);
DECL_GFX_PREF(Live, "image.webp.enabled", ImageWebPEnabled, bool, true);
+#ifdef MOZ_JXL
DECL_GFX_PREF(Live, "image.jxl.enabled", ImageJXLEnabled, bool, true);
+#endif
DECL_GFX_PREF(Once, "layers.acceleration.enabled", LayersAccelerationEnabledDoNotUseDirectly, bool, true);
DECL_GFX_PREF(Live, "layers.acceleration.draw-fps", LayersDrawFPS, bool, false);
diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
index af329e145c..ee9d035b74 100644
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -4146,7 +4146,11 @@ pref("image.decode-immediately.enabled", false);
pref("image.downscale-during-decode.enabled", true);
// The default Accept header sent for images loaded over HTTP(S)
+#ifdef MOZ_JXL
+pref("image.http.accept", "image/webp,image/jxl,image/png,image/*;q=0.8,*/*;q=0.5");
+#else
pref("image.http.accept", "image/webp,image/png,image/*;q=0.8,*/*;q=0.5");
+#endif
// The threshold for inferring that changes to an <img> element's |src|
// attribute by JavaScript represent an animation, in milliseconds. If the |src|
@@ -4203,7 +4207,7 @@ pref("image.multithreaded_decoding.limit", -1);
pref("image.webp.enabled", true);
#ifdef MOZ_JXL
-pref("image.jxl.enabled", false);
+pref("image.jxl.enabled", true);
#endif
// Limit for the canvas image cache. 0 means we don't limit the size of the