1
0
Fork 0
firefox/third_party/jpeg-xl/plugins/gimp/common.cc
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

24 lines
625 B
C++

// Copyright (c) the JPEG XL Project Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#include "plugins/gimp/common.h"
namespace jxl {
JpegXlGimpProgress::JpegXlGimpProgress(const char *message) {
cur_progress = 0;
max_progress = 100;
gimp_progress_init_printf("%s\n", message);
}
void JpegXlGimpProgress::update() {
gimp_progress_update(static_cast<float>(++cur_progress) /
static_cast<float>(max_progress));
}
void JpegXlGimpProgress::finished() { gimp_progress_update(1.0); }
} // namespace jxl