summaryrefslogtreecommitdiffstats
path: root/third_party/jpeg-xl/plugins
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
commitd8bbc7858622b6d9c278469aab701ca0b609cddf (patch)
treeeff41dc61d9f714852212739e6b3738b82a2af87 /third_party/jpeg-xl/plugins
parentReleasing progress-linux version 125.0.3-1~progress7.99u1. (diff)
downloadfirefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz
firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/jpeg-xl/plugins')
-rw-r--r--third_party/jpeg-xl/plugins/gimp/file-jxl-load.cc8
-rw-r--r--third_party/jpeg-xl/plugins/gimp/file-jxl-save.cc12
2 files changed, 10 insertions, 10 deletions
diff --git a/third_party/jpeg-xl/plugins/gimp/file-jxl-load.cc b/third_party/jpeg-xl/plugins/gimp/file-jxl-load.cc
index 07acd524d2..41a5d45bfb 100644
--- a/third_party/jpeg-xl/plugins/gimp/file-jxl-load.cc
+++ b/third_party/jpeg-xl/plugins/gimp/file-jxl-load.cc
@@ -39,10 +39,10 @@ bool LoadJpegXlImage(const gchar *const filename, gint32 *const image_id) {
GimpColorProfile *profile_icc = nullptr;
GimpColorProfile *profile_int = nullptr;
bool is_linear = false;
- unsigned long xsize = 0;
- unsigned long ysize = 0;
- long crop_x0 = 0;
- long crop_y0 = 0;
+ uint32_t xsize = 0;
+ uint32_t ysize = 0;
+ int32_t crop_x0 = 0;
+ int32_t crop_y0 = 0;
size_t layer_idx = 0;
uint32_t frame_duration = 0;
double tps_denom = 1.f;
diff --git a/third_party/jpeg-xl/plugins/gimp/file-jxl-save.cc b/third_party/jpeg-xl/plugins/gimp/file-jxl-save.cc
index 284a9f2771..65b637d419 100644
--- a/third_party/jpeg-xl/plugins/gimp/file-jxl-save.cc
+++ b/third_party/jpeg-xl/plugins/gimp/file-jxl-save.cc
@@ -17,12 +17,12 @@
#define PLUG_IN_BINARY "file-jxl"
#define SAVE_PROC "file-jxl-save"
-#define SCALE_WIDTH 200
-
namespace jxl {
namespace {
+constexpr size_t kScaleWidth = 200;
+
#ifndef g_clear_signal_handler
// g_clear_signal_handler was added in glib 2.62
void g_clear_signal_handler(gulong* handler, gpointer instance) {
@@ -292,7 +292,7 @@ bool JpegXlSaveGui::SaveDialog() {
"\n\td\u00A0=\u00A06\tPoor";
entry_distance = reinterpret_cast<GtkAdjustment*>(
- gimp_scale_entry_new(GTK_TABLE(table), 0, 0, "Distance", SCALE_WIDTH, 0,
+ gimp_scale_entry_new(GTK_TABLE(table), 0, 0, "Distance", kScaleWidth, 0,
jxl_save_opts.distance, 0.0, 15.0, 0.001, 1.0, 3,
true, 0.0, 0.0, distance_help, SAVE_PROC));
gimp_scale_entry_set_logarithmic(reinterpret_cast<GtkObject*>(entry_distance),
@@ -303,7 +303,7 @@ bool JpegXlSaveGui::SaveDialog() {
"JPEG-style Quality is remapped to distance. "
"Values roughly match libjpeg quality settings.";
entry_quality = reinterpret_cast<GtkAdjustment*>(gimp_scale_entry_new(
- GTK_TABLE(table), 0, 1, "Quality", SCALE_WIDTH, 0, jxl_save_opts.quality,
+ GTK_TABLE(table), 0, 1, "Quality", kScaleWidth, 0, jxl_save_opts.quality,
8.26, 100.0, 1.0, 10.0, 2, true, 0.0, 0.0, quality_help, SAVE_PROC));
// Distance and Quality Signals
@@ -325,7 +325,7 @@ bool JpegXlSaveGui::SaveDialog() {
"As\u00A0a\u00A0result, image quality may be decreased. "
"Default\u00A0=\u00A03.";
entry_effort = reinterpret_cast<GtkAdjustment*>(
- gimp_scale_entry_new(GTK_TABLE(table), 0, 3, "Speed", SCALE_WIDTH, 0,
+ gimp_scale_entry_new(GTK_TABLE(table), 0, 3, "Speed", kScaleWidth, 0,
10 - jxl_save_opts.encoding_effort, 1, 9, 1, 2, 0,
true, 0.0, 0.0, effort_help, SAVE_PROC));
@@ -419,7 +419,7 @@ bool JpegXlSaveGui::SaveDialog() {
entry_faster = reinterpret_cast<GtkAdjustment*>(
gimp_scale_entry_new(GTK_TABLE(table), 0, 0, "Faster Decoding",
- SCALE_WIDTH, 0, jxl_save_opts.faster_decoding, 0, 4,
+ kScaleWidth, 0, jxl_save_opts.faster_decoding, 0, 4,
1, 1, 0, true, 0.0, 0.0, faster_help, SAVE_PROC));
// Faster Decoding Signals