aboutsummaryrefslogtreecommitdiff
path: root/fiv-view.c
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2024-01-27 22:22:08 +0100
committerPřemysl Eric Janouch <p@janouch.name>2024-01-27 22:22:08 +0100
commitc6d89361a5e2a46818d67ce4a21856ddecc129a4 (patch)
tree5ca7d95e331bbf00281550da407649ad25cb0407 /fiv-view.c
parent39f6be3f64a6c5c0a1ec0ee8a1d905160381b71f (diff)
downloadfiv-c6d89361a5e2a46818d67ce4a21856ddecc129a4.tar.gz
fiv-c6d89361a5e2a46818d67ce4a21856ddecc129a4.tar.xz
fiv-c6d89361a5e2a46818d67ce4a21856ddecc129a4.zip
WIP: Thread-safe colour management
Diffstat (limited to 'fiv-view.c')
-rw-r--r--fiv-view.c7
1 files changed, 5 insertions, 2 deletions
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