diff options
author | Pekka Paalanen <pekka.paalanen@collabora.com> | 2024-02-15 15:09:58 +0200 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.com> | 2024-02-23 16:46:39 +0200 |
commit | 6fe294c18a968fbc1d418820a62d9263eac29287 (patch) | |
tree | a4cc12805dd06a5ab448b17981f50297f29ffd7c | |
parent | 952f3ef61d82a8d74f2a2977995f107ef6214b4e (diff) |
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 <pekka.paalanen@collabora.com>
-rw-r--r-- | libweston/color-lcms/color-lcms.c | 2 | ||||
-rw-r--r-- | libweston/color-lcms/color-lcms.h | 2 | ||||
-rw-r--r-- | 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); } |