From c6d89361a5e2a46818d67ce4a21856ddecc129a4 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Sat, 27 Jan 2024 22:22:08 +0100 Subject: WIP: Thread-safe colour management --- fiv-view.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'fiv-view.c') diff --git a/fiv-view.c b/fiv-view.c index b39adab..dfc7a19 100644 --- a/fiv-view.c +++ b/fiv-view.c @@ -417,6 +417,7 @@ prescale_page(FivView *self) // If it fails, the previous frame pointer may become invalid. g_clear_pointer(&self->page_scaled, fiv_io_image_unref); self->frame = self->page_scaled = closure->render(closure, + fiv_io_cmm_get_default(), self->enable_cms ? self->screen_cms_profile : NULL, self->scale); if (!self->page_scaled) self->frame = self->page; @@ -475,7 +476,8 @@ monitor_cms_profile(GdkWindow *root, int num) if (gdk_property_get(root, gdk_atom_intern(atom, FALSE), GDK_NONE, 0, 8 << 20 /* MiB */, FALSE, &type, &format, &length, &data)) { if (format == 8 && length > 0) - result = fiv_io_profile_new(data, length); + result = fiv_io_cmm_get_profile( + fiv_io_cmm_get_default(), data, length); g_free(data); } return result; @@ -525,7 +527,8 @@ reload_screen_cms_profile(FivView *self, GdkWindow *window) out: if (!self->screen_cms_profile) - self->screen_cms_profile = fiv_io_profile_new_sRGB(); + self->screen_cms_profile = + fiv_io_cmm_get_profile_sRGB(fiv_io_cmm_get_default()); } static void -- cgit v1.2.3-70-g09d2