summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2018-10-13 16:35:37 +0100
committerRobin Watts <robin.watts@artifex.com>2018-10-15 21:10:00 +0100
commit09e6384783ebbd940f766adcd7b531c10332b24b (patch)
tree326f6610a45372c572b04d49c682c9e82cd4a2a0
parent98d7d24e67664600aeb346d2abfa29ff2f9653b1 (diff)
downloadmupdf-09e6384783ebbd940f766adcd7b531c10332b24b.tar.xz
Update lcms2 to lcms2mt.
Pull in the latest changes from mainline lcms2, and bugfixes from gs. This should now be the definitive version.
-rw-r--r--platform/win32/libthirdparty.vcproj4
-rw-r--r--source/fitz/color-lcms.c18
m---------thirdparty/lcms20
3 files changed, 11 insertions, 11 deletions
diff --git a/platform/win32/libthirdparty.vcproj b/platform/win32/libthirdparty.vcproj
index fbdbd8fd..05fba858 100644
--- a/platform/win32/libthirdparty.vcproj
+++ b/platform/win32/libthirdparty.vcproj
@@ -1864,11 +1864,11 @@
>
</File>
<File
- RelativePath="..\..\thirdparty\lcms2\include\lcms2art.h"
+ RelativePath="..\..\thirdparty\lcms2\include\lcms2mt.h"
>
</File>
<File
- RelativePath="..\..\thirdparty\lcms2\include\lcms2art_plugin.h"
+ RelativePath="..\..\thirdparty\lcms2\include\lcms2mt_plugin.h"
>
</File>
</Filter>
diff --git a/source/fitz/color-lcms.c b/source/fitz/color-lcms.c
index 4dd231e9..f4fc1ac8 100644
--- a/source/fitz/color-lcms.c
+++ b/source/fitz/color-lcms.c
@@ -1,8 +1,8 @@
#include "mupdf/fitz.h"
#ifndef NO_ICC
-#include "lcms2art.h"
-#include "lcms2art_plugin.h"
+#include "lcms2mt.h"
+#include "lcms2mt_plugin.h"
#include "colorspace-imp.h"
#define LCMS_BYTES_MASK 0x7
@@ -240,7 +240,7 @@ fz_lcms_init_link(fz_cmm_instance *instance, fz_icclink *link, const fz_iccprofi
if (prf == NULL)
{
- link->cmm_handle = cmsCreateTransformTHR(cmm_ctx, src->cmm_handle, src_data_type, dst->cmm_handle, des_data_type, rend->ri, flag);
+ link->cmm_handle = cmsCreateTransform(cmm_ctx, src->cmm_handle, src_data_type, dst->cmm_handle, des_data_type, rend->ri, flag);
if (!link->cmm_handle)
fz_throw(ctx, FZ_ERROR_GENERIC, "cmsCreateTransform failed");
}
@@ -251,13 +251,13 @@ fz_lcms_init_link(fz_cmm_instance *instance, fz_icclink *link, const fz_iccprofi
*/
if (src == prf)
{
- link->cmm_handle = cmsCreateTransformTHR(cmm_ctx, src->cmm_handle, src_data_type, dst->cmm_handle, des_data_type, INTENT_RELATIVE_COLORIMETRIC, flag);
+ link->cmm_handle = cmsCreateTransform(cmm_ctx, src->cmm_handle, src_data_type, dst->cmm_handle, des_data_type, INTENT_RELATIVE_COLORIMETRIC, flag);
if (!link->cmm_handle)
fz_throw(ctx, FZ_ERROR_GENERIC, "cmsCreateTransform failed");
}
else if (prf == dst)
{
- link->cmm_handle = cmsCreateTransformTHR(cmm_ctx, src->cmm_handle, src_data_type, prf->cmm_handle, des_data_type, rend->ri, flag);
+ link->cmm_handle = cmsCreateTransform(cmm_ctx, src->cmm_handle, src_data_type, prf->cmm_handle, des_data_type, rend->ri, flag);
if (!link->cmm_handle)
fz_throw(ctx, FZ_ERROR_GENERIC, "cmsCreateTransform failed");
}
@@ -277,7 +277,7 @@ fz_lcms_init_link(fz_cmm_instance *instance, fz_icclink *link, const fz_iccprofi
lcms_prf_cs = 0;
prf_num_chan = cmsChannelsOf(cmm_ctx, prf_cs);
prf_data_type = (COLORSPACE_SH(lcms_prf_cs) | CHANNELS_SH(prf_num_chan) | BYTES_SH(num_bytes));
- src_to_prf_link = cmsCreateTransformTHR(cmm_ctx, src->cmm_handle, src_data_type, prf->cmm_handle, prf_data_type, rend->ri, flag);
+ src_to_prf_link = cmsCreateTransform(cmm_ctx, src->cmm_handle, src_data_type, prf->cmm_handle, prf_data_type, rend->ri, flag);
if (!src_to_prf_link)
fz_throw(ctx, FZ_ERROR_GENERIC, "cmsCreateTransform failed");
src_to_prf_profile = cmsTransform2DeviceLink(cmm_ctx, src_to_prf_link, 3.4, flag);
@@ -288,7 +288,7 @@ fz_lcms_init_link(fz_cmm_instance *instance, fz_icclink *link, const fz_iccprofi
hProfiles[0] = src_to_prf_profile;
hProfiles[1] = prf->cmm_handle;
hProfiles[2] = dst->cmm_handle;
- link->cmm_handle = cmsCreateMultiprofileTransformTHR(cmm_ctx, hProfiles, 3, src_data_type, des_data_type, INTENT_RELATIVE_COLORIMETRIC, flag);
+ link->cmm_handle = cmsCreateMultiprofileTransform(cmm_ctx, hProfiles, 3, src_data_type, des_data_type, INTENT_RELATIVE_COLORIMETRIC, flag);
cmsCloseProfile(cmm_ctx, src_to_prf_profile);
if (!link->cmm_handle)
fz_throw(ctx, FZ_ERROR_GENERIC, "cmsCreateMultiprofileTransform failed");
@@ -317,7 +317,7 @@ fz_lcms_new_instance(fz_context *ctx)
DEBUG_LCMS_MEM(("Context Creation:: mupdf ctx = %p lcms ctx = %p \n", (void*) ctx, (void*) cmm_ctx));
if (cmm_ctx == NULL)
fz_throw(ctx, FZ_ERROR_GENERIC, "cmsCreateContext failed");
- cmsSetLogErrorHandlerTHR(cmm_ctx, fz_lcms_log_error);
+ cmsSetLogErrorHandler(cmm_ctx, fz_lcms_log_error);
return (fz_cmm_instance *)cmm_ctx;
}
@@ -341,7 +341,7 @@ fz_lcms_init_profile(fz_cmm_instance *instance, fz_iccprofile *profile)
DEBUG_LCMS_MEM(("@@@@@@@ Create Profile Start:: mupdf ctx = %p lcms ctx = %p \n", (void*)ctx, (void*)cmm_ctx));
size = fz_buffer_storage(ctx, profile->buffer, &data);
- profile->cmm_handle = cmsOpenProfileFromMemTHR(cmm_ctx, data, (cmsUInt32Number)size);
+ profile->cmm_handle = cmsOpenProfileFromMem(cmm_ctx, data, (cmsUInt32Number)size);
if (profile->cmm_handle == NULL)
{
profile->num_devcomp = 0;
diff --git a/thirdparty/lcms2 b/thirdparty/lcms2
-Subproject 0c40897bb1021fc223475a44a325a45ea00b07a
+Subproject 9c64b98fc19b4fff13de4007077885773be42a7