color-lcms: increase float precision to print segment breaks

There are some cases in which we are seeing segment breaks like this in
the debug scopes: (0.00, 0.00]. A segment whose domain goes from 0 to 0
makes no sense.

This happens because we are printing the breaks with only two decimal
places. Increase that to four, in order to have more accurate
information in the debug scopes.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
This commit is contained in:
Leandro Ribeiro 2023-06-29 14:40:04 -03:00
parent 625a74d369
commit c61719e9e9

View file

@ -55,7 +55,7 @@ segment_print(const cmsCurveSegment *seg, struct weston_log_scope *scope)
float x0 = round_segment_break_value(seg->x0);
float x1 = round_segment_break_value(seg->x1);
weston_log_scope_printf(scope, "%*s(%.2f, %.2f] ", 12, "", x0, x1);
weston_log_scope_printf(scope, "%*s(%.4f, %.4f] ", 12, "", x0, x1);
if (seg->Type == 0) {
/* Not much to print as this is a sampled curve. We have only