From ce51a04013d99aeb46367b2b6d3c7ccefce76ec6 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Thu, 15 Feb 2024 15:12:46 +0200 Subject: [PATCH] color-lcms: rename get_xform() to to_cmlcms_xform() "Get" could imply increasing reference count, and color transform objects indeed are reference counted, but this function does not do that. Rename it to reduce confusion. Signed-off-by: Pekka Paalanen --- libweston/color-lcms/color-lcms.c | 2 +- libweston/color-lcms/color-lcms.h | 2 +- libweston/color-lcms/color-transform.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libweston/color-lcms/color-lcms.c b/libweston/color-lcms/color-lcms.c index 9cd41a0f..29522a51 100644 --- a/libweston/color-lcms/color-lcms.c +++ b/libweston/color-lcms/color-lcms.c @@ -88,7 +88,7 @@ get_cprof_or_stock_sRGB(struct weston_color_manager_lcms *cm, static void cmlcms_destroy_color_transform(struct weston_color_transform *xform_base) { - struct cmlcms_color_transform *xform = get_xform(xform_base); + struct cmlcms_color_transform *xform = to_cmlcms_xform(xform_base); cmlcms_color_transform_destroy(xform); } diff --git a/libweston/color-lcms/color-lcms.h b/libweston/color-lcms/color-lcms.h index ce9d9973..cf61fce6 100644 --- a/libweston/color-lcms/color-lcms.h +++ b/libweston/color-lcms/color-lcms.h @@ -208,7 +208,7 @@ struct cmlcms_color_transform { }; static inline struct cmlcms_color_transform * -get_xform(struct weston_color_transform *xform_base) +to_cmlcms_xform(struct weston_color_transform *xform_base) { return container_of(xform_base, struct cmlcms_color_transform, base); } diff --git a/libweston/color-lcms/color-transform.c b/libweston/color-lcms/color-transform.c index 0efba8b4..8d3e209e 100644 --- a/libweston/color-lcms/color-transform.c +++ b/libweston/color-lcms/color-transform.c @@ -91,7 +91,7 @@ static void cmlcms_fill_in_output_inv_eotf_vcgt(struct weston_color_transform *xform_base, float *values, unsigned len) { - struct cmlcms_color_transform *xform = get_xform(xform_base); + struct cmlcms_color_transform *xform = to_cmlcms_xform(xform_base); struct cmlcms_color_profile *p = xform->search_key.output_profile; assert(p && "output_profile"); @@ -102,7 +102,7 @@ static void cmlcms_fill_in_pre_curve(struct weston_color_transform *xform_base, float *values, unsigned len) { - struct cmlcms_color_transform *xform = get_xform(xform_base); + struct cmlcms_color_transform *xform = to_cmlcms_xform(xform_base); fill_in_curves(xform->pre_curve, values, len); } @@ -111,7 +111,7 @@ static void cmlcms_fill_in_post_curve(struct weston_color_transform *xform_base, float *values, unsigned len) { - struct cmlcms_color_transform *xform = get_xform(xform_base); + struct cmlcms_color_transform *xform = to_cmlcms_xform(xform_base); fill_in_curves(xform->post_curve, values, len); } @@ -135,7 +135,7 @@ static void cmlcms_fill_in_3dlut(struct weston_color_transform *xform_base, float *lut, unsigned int len) { - struct cmlcms_color_transform *xform = get_xform(xform_base); + struct cmlcms_color_transform *xform = to_cmlcms_xform(xform_base); float rgb_in[3]; float rgb_out[3]; unsigned int index;