From 6fe294c18a968fbc1d418820a62d9263eac29287 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Thu, 15 Feb 2024 15:09:58 +0200 Subject: [PATCH] color-lcms: rename get_cprof() to to_cmlcms_cprof() "Get" could imply increasing reference count, and color profile 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-profile.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libweston/color-lcms/color-lcms.c b/libweston/color-lcms/color-lcms.c index fff198b7..9cd41a0f 100644 --- a/libweston/color-lcms/color-lcms.c +++ b/libweston/color-lcms/color-lcms.c @@ -80,7 +80,7 @@ get_cprof_or_stock_sRGB(struct weston_color_manager_lcms *cm, struct weston_color_profile *cprof_base) { if (cprof_base) - return get_cprof(cprof_base); + return to_cmlcms_cprof(cprof_base); else return cm->sRGB_profile; } diff --git a/libweston/color-lcms/color-lcms.h b/libweston/color-lcms/color-lcms.h index c70fc93d..ce9d9973 100644 --- a/libweston/color-lcms/color-lcms.h +++ b/libweston/color-lcms/color-lcms.h @@ -126,7 +126,7 @@ const char * cmlcms_category_name(enum cmlcms_category cat); static inline struct cmlcms_color_profile * -get_cprof(struct weston_color_profile *cprof_base) +to_cmlcms_cprof(struct weston_color_profile *cprof_base) { return container_of(cprof_base, struct cmlcms_color_profile, base); } diff --git a/libweston/color-lcms/color-profile.c b/libweston/color-lcms/color-profile.c index 23585539..654d25b9 100644 --- a/libweston/color-lcms/color-profile.c +++ b/libweston/color-lcms/color-profile.c @@ -532,7 +532,7 @@ cmlcms_send_image_desc_info(struct cm_image_desc_info *cm_image_desc_info, { struct weston_color_manager_lcms *cm = to_cmlcms(cprof_base->cm); struct weston_compositor *compositor = cm->base.compositor; - struct cmlcms_color_profile *cprof = get_cprof(cprof_base); + struct cmlcms_color_profile *cprof = to_cmlcms_cprof(cprof_base); const struct weston_color_primaries_info *primaries_info; const struct weston_color_tf_info *tf_info; int32_t fd; @@ -593,7 +593,7 @@ cmlcms_send_image_desc_info(struct cm_image_desc_info *cm_image_desc_info, void cmlcms_destroy_color_profile(struct weston_color_profile *cprof_base) { - struct cmlcms_color_profile *cprof = get_cprof(cprof_base); + struct cmlcms_color_profile *cprof = to_cmlcms_cprof(cprof_base); cmlcms_color_profile_destroy(cprof); }