summaryrefslogtreecommitdiff
path: root/base/gsicc_lcms2.c
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2021-06-10 14:38:27 +0100
committerRobin Watts <Robin.Watts@artifex.com>2021-06-16 13:21:54 +0100
commitf3aaf279fff916a2ce8865ae940e32a724fcf5f3 (patch)
tree76f08f49e5f807c707b058e0ca9405be315ee2c0 /base/gsicc_lcms2.c
parentb08ddcae269aa0804909fc80fc671519e7d8ff75 (diff)
downloadghostpdl-f3aaf279fff916a2ce8865ae940e32a724fcf5f3.tar.gz
Change get_color_mapping_procs device procedure.
Previously, devices would call 'get_color_mapping_procs' to get a procedure table from a device. They would then call those procs, passing in the device as an argument. For forwarding/subclassing devices, this is problematic, because getting a child device's color_mapping_procs, and passing it a parent's device pointer will lead to failures. Accordingly lots of wrapping functions have to be written. Here we try an alternative formulation. When we 'get_color_mapping_procs' we get both the procedure table, and the device pointer to pass to them. For most devices this will be the incoming device pointer parrotted back. For forwarding and subclass devices, it will be the appropriate child device.
Diffstat (limited to 'base/gsicc_lcms2.c')
-rw-r--r--base/gsicc_lcms2.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/base/gsicc_lcms2.c b/base/gsicc_lcms2.c
index 5e9355e62..ccf1d7051 100644
--- a/base/gsicc_lcms2.c
+++ b/base/gsicc_lcms2.c
@@ -462,6 +462,13 @@ int
gscms_transform_color(gx_device *dev, gsicc_link_t *icclink, void *inputcolor,
void *outputcolor, int num_bytes)
{
+ return gscms_transformm_color_const(dev, icclink, inputcolor, outputcolor, num_bytes);
+}
+
+int
+gscms_transform_color_const(const gx_device *dev, gsicc_link_t *icclink, void *inputcolor,
+ void *outputcolor, int num_bytes)
+{
cmsHTRANSFORM hTransform = (cmsHTRANSFORM)icclink->link_handle;
cmsUInt32Number dwInputFormat,dwOutputFormat;