summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPekka Paalanen <pekka.paalanen@collabora.com>2024-02-16 13:27:31 +0200
committerPekka Paalanen <pekka.paalanen@collabora.com>2024-02-23 16:46:39 +0200
commit3e9f8402add4888d9b14eb952a634de5c6f0feb3 (patch)
treea9f716a14d563329f6dab33bf051665295876cf1
parentdcaff175b40e8f5437fba5784fbe5e2e0fff0d7f (diff)
color-lcms: move two functions up in file
No changes to the functions at all. This makes them available for use in cmlcms_init() for the next patch. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-rw-r--r--libweston/color-lcms/color-lcms.c88
1 files changed, 44 insertions, 44 deletions
diff --git a/libweston/color-lcms/color-lcms.c b/libweston/color-lcms/color-lcms.c
index ffff2d74..f3f189da 100644
--- a/libweston/color-lcms/color-lcms.c
+++ b/libweston/color-lcms/color-lcms.c
@@ -339,6 +339,50 @@ out_fail:
}
static void
+transforms_scope_new_sub(struct weston_log_subscription *subs, void *data)
+{
+ struct weston_color_manager_lcms *cm = data;
+ struct cmlcms_color_transform *xform;
+ char *str;
+
+ if (wl_list_empty(&cm->color_transform_list))
+ return;
+
+ weston_log_subscription_printf(subs, "Existent:\n");
+ wl_list_for_each(xform, &cm->color_transform_list, link) {
+ weston_log_subscription_printf(subs, "Color transformation %p:\n", xform);
+
+ str = cmlcms_color_transform_search_param_string(&xform->search_key);
+ weston_log_subscription_printf(subs, "%s", str);
+ free(str);
+
+ str = weston_color_transform_string(&xform->base);
+ weston_log_subscription_printf(subs, " %s", str);
+ free(str);
+ }
+}
+
+static void
+profiles_scope_new_sub(struct weston_log_subscription *subs, void *data)
+{
+ struct weston_color_manager_lcms *cm = data;
+ struct cmlcms_color_profile *cprof;
+ char *str;
+
+ if (wl_list_empty(&cm->color_profile_list))
+ return;
+
+ weston_log_subscription_printf(subs, "Existent:\n");
+ wl_list_for_each(cprof, &cm->color_profile_list, link) {
+ weston_log_subscription_printf(subs, "Color profile %p:\n", cprof);
+
+ str = cmlcms_color_profile_print(cprof);
+ weston_log_subscription_printf(subs, "%s", str);
+ free(str);
+ }
+}
+
+static void
lcms_error_logger(cmsContext context_id,
cmsUInt32Number error_code,
const char *text)
@@ -415,50 +459,6 @@ cmlcms_destroy(struct weston_color_manager *cm_base)
free(cm);
}
-static void
-transforms_scope_new_sub(struct weston_log_subscription *subs, void *data)
-{
- struct weston_color_manager_lcms *cm = data;
- struct cmlcms_color_transform *xform;
- char *str;
-
- if (wl_list_empty(&cm->color_transform_list))
- return;
-
- weston_log_subscription_printf(subs, "Existent:\n");
- wl_list_for_each(xform, &cm->color_transform_list, link) {
- weston_log_subscription_printf(subs, "Color transformation %p:\n", xform);
-
- str = cmlcms_color_transform_search_param_string(&xform->search_key);
- weston_log_subscription_printf(subs, "%s", str);
- free(str);
-
- str = weston_color_transform_string(&xform->base);
- weston_log_subscription_printf(subs, " %s", str);
- free(str);
- }
-}
-
-static void
-profiles_scope_new_sub(struct weston_log_subscription *subs, void *data)
-{
- struct weston_color_manager_lcms *cm = data;
- struct cmlcms_color_profile *cprof;
- char *str;
-
- if (wl_list_empty(&cm->color_profile_list))
- return;
-
- weston_log_subscription_printf(subs, "Existent:\n");
- wl_list_for_each(cprof, &cm->color_profile_list, link) {
- weston_log_subscription_printf(subs, "Color profile %p:\n", cprof);
-
- str = cmlcms_color_profile_print(cprof);
- weston_log_subscription_printf(subs, "%s", str);
- free(str);
- }
-}
-
WL_EXPORT struct weston_color_manager *
weston_color_manager_create(struct weston_compositor *compositor)
{