From 7b5053f7fa6cc69607922654673886b4d187cfe3 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Tue, 17 Jun 2025 11:52:19 +0300 Subject: [PATCH] color: drop weston_color_curve_from_tf_info() This was never used, and I happened to write a slightly different version of it in color-lcms. Signed-off-by: Pekka Paalanen --- libweston/color.c | 29 ----------------------------- libweston/color.h | 6 ------ 2 files changed, 35 deletions(-) diff --git a/libweston/color.c b/libweston/color.c index ec5cb3a96..762fc7474 100644 --- a/libweston/color.c +++ b/libweston/color.c @@ -196,35 +196,6 @@ weston_color_profile_params_to_str(struct weston_color_profile_params *params, return str; } -/** - * Initializes a struct weston_color_curve given a transfer function. - * - * \param curve The curve to initialize. - * \param tf_info The tf_info object. - * \param tf_params When the tf is parametric, this is required. Otherwise, - * this is ignored. - * \param tf_direction Determines if this inits a curve equivalent to the direct - * or the inverse of the tf. - */ -WL_EXPORT void -weston_color_curve_from_tf_info(struct weston_color_curve *curve, - const struct weston_color_tf_info *tf_info, - const float tf_params[MAX_PARAMS_TF], - enum weston_tf_direction tf_direction) -{ - unsigned int i, j; - - curve->type = WESTON_COLOR_CURVE_TYPE_ENUM; - - curve->u.enumerated.tf = tf_info; - curve->u.enumerated.tf_direction = tf_direction; - - for (j = 0; j < tf_info->count_parameters; j++) { - for (i = 0; i < 3; i++) - curve->u.enumerated.params[i][j] = tf_params[j]; - } -} - /** * Given an enumerated color curve, returns an equivalent parametric curve. * diff --git a/libweston/color.h b/libweston/color.h index fcf523ea6..59af55514 100644 --- a/libweston/color.h +++ b/libweston/color.h @@ -656,12 +656,6 @@ weston_color_curve_enum_get_parametric(struct weston_compositor *compositor, const struct weston_color_curve_enum *curve, struct weston_color_curve_parametric *out); -void -weston_color_curve_from_tf_info(struct weston_color_curve *curve, - const struct weston_color_tf_info *tf_info, - const float tf_params[MAX_PARAMS_TF], - enum weston_tf_direction tf_direction); - enum weston_color_curve_step { WESTON_COLOR_CURVE_STEP_PRE, WESTON_COLOR_CURVE_STEP_POST,