color-lcms: add wrapper API for refcounting cmlcms_color_profile
It is used for convenience when profile is cached. Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
This commit is contained in:
@@ -180,4 +180,10 @@ cmlcms_color_transform_get(struct weston_color_manager_lcms *cm,
|
|||||||
void
|
void
|
||||||
cmlcms_color_transform_destroy(struct cmlcms_color_transform *xform);
|
cmlcms_color_transform_destroy(struct cmlcms_color_transform *xform);
|
||||||
|
|
||||||
|
struct cmlcms_color_profile *
|
||||||
|
ref_cprof(struct cmlcms_color_profile *cprof);
|
||||||
|
|
||||||
|
void
|
||||||
|
unref_cprof(struct cmlcms_color_profile *cprof);
|
||||||
|
|
||||||
#endif /* WESTON_COLOR_LCMS_H */
|
#endif /* WESTON_COLOR_LCMS_H */
|
||||||
|
|||||||
@@ -114,6 +114,25 @@ cmlcms_color_profile_destroy(struct cmlcms_color_profile *cprof)
|
|||||||
free(cprof);
|
free(cprof);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct cmlcms_color_profile *
|
||||||
|
ref_cprof(struct cmlcms_color_profile *cprof)
|
||||||
|
{
|
||||||
|
if (!cprof)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
weston_color_profile_ref(&cprof->base);
|
||||||
|
return cprof;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
unref_cprof(struct cmlcms_color_profile *cprof)
|
||||||
|
{
|
||||||
|
if (!cprof)
|
||||||
|
return;
|
||||||
|
|
||||||
|
weston_color_profile_unref(&cprof->base);
|
||||||
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
make_icc_file_description(cmsHPROFILE profile,
|
make_icc_file_description(cmsHPROFILE profile,
|
||||||
const struct cmlcms_md5_sum *md5sum,
|
const struct cmlcms_md5_sum *md5sum,
|
||||||
|
|||||||
Reference in New Issue
Block a user