diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2024-01-28 01:13:15 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2024-01-28 01:13:15 +0100 |
commit | 501dc123ada348f18cac7ed05c812b5e633bd2ef (patch) | |
tree | 149e157778c320100ab7bf0e676695ae4f57c962 /fiv-io.c | |
parent | 6b4759b63af5d5724c40be516d886b6f9fb0026d (diff) | |
download | fiv-501dc123ada348f18cac7ed05c812b5e633bd2ef.tar.gz fiv-501dc123ada348f18cac7ed05c812b5e633bd2ef.tar.xz fiv-501dc123ada348f18cac7ed05c812b5e633bd2ef.zip |
WIP: Thread-safe colour managementthread-safe-cmm-wip
Diffstat (limited to 'fiv-io.c')
-rw-r--r-- | fiv-io.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -2077,8 +2077,8 @@ load_resvg_destroy(FivIoRenderClosure *closure) } static FivIoImage * -load_resvg_render_internal(FivIoRenderClosureResvg *self, - double scale, FivIoProfile *target, GError **error) +load_resvg_render_internal(FivIoRenderClosureResvg *self, double scale, + FivIoCmm *cmm, FivIoProfile *target, GError **error) { double w = ceil(self->width * scale), h = ceil(self->height * scale); if (w > SHRT_MAX || h > SHRT_MAX) { @@ -2108,15 +2108,15 @@ load_resvg_render_internal(FivIoRenderClosureResvg *self, uint32_t rgba = g_ntohl(pixels[i]); pixels[i] = rgba << 24 | rgba >> 8; } - return fiv_io_profile_finalize(image, target); + return fiv_io_cmm_finish(cmm, image, target); } static FivIoImage * -load_resvg_render( - FivIoRenderClosure *closure, FivIoProfile *target, double scale) +load_resvg_render(FivIoRenderClosure *closure, + FivIoCmm *cmm, FivIoProfile *target, double scale) { FivIoRenderClosureResvg *self = (FivIoRenderClosureResvg *) closure; - return load_resvg_render_internal(self, scale, target, NULL); + return load_resvg_render_internal(self, scale, cmm, target, NULL); } static const char * @@ -2174,8 +2174,8 @@ open_resvg( closure->width = size.width; closure->height = size.height; - FivIoImage *image = - load_resvg_render_internal(closure, 1., ctx->screen_profile, error); + FivIoImage *image = load_resvg_render_internal( + closure, 1., ctx->cmm, ctx->screen_profile, error); if (!image) { load_resvg_destroy(&closure->parent); return NULL; |