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>
This commit is contained in:
Pekka Paalanen 2024-02-15 15:09:58 +02:00
parent 952f3ef61d
commit 6fe294c18a
3 changed files with 4 additions and 4 deletions

View File

@ -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;
}

View File

@ -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);
}

View File

@ -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);
}