summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gs/base/gsicc_nocm.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/gs/base/gsicc_nocm.c b/gs/base/gsicc_nocm.c
index bf50512ef..5fc4edc23 100644
--- a/gs/base/gsicc_nocm.c
+++ b/gs/base/gsicc_nocm.c
@@ -32,8 +32,6 @@
32 32
33/* A link structure for our non-cm color transform */ 33/* A link structure for our non-cm color transform */
34typedef struct nocm_link_s { 34typedef struct nocm_link_s {
35 /* device (or default) procs to do the transformation */
36 gx_cm_color_map_procs cm_procs;
37 /* Since RGB to CMYK requires BG and UCR, we need to have the 35 /* Since RGB to CMYK requires BG and UCR, we need to have the
38 imager state available */ 36 imager state available */
39 gs_imager_state *pis; 37 gs_imager_state *pis;
@@ -252,18 +250,18 @@ gsicc_nocm_transform_general(gx_device *dev, gsicc_link_t *icclink,
252 frac_in[k] = byte2frac(data[k]); 250 frac_in[k] = byte2frac(data[k]);
253 } 251 }
254 } 252 }
255 /* Use the device procedure */ 253 /* Use the device procedures to do the mapping */
256 switch (num_in) { 254 switch (num_in) {
257 case 1: 255 case 1:
258 (link->cm_procs.map_gray)(dev, frac_in[0], frac_out); 256 dev_proc(dev, get_color_mapping_procs)(dev)->map_gray(dev, frac_in[0], frac_out);
259 break; 257 break;
260 case 3: 258 case 3:
261 (link->cm_procs.map_rgb)(dev, link->pis, frac_in[0], frac_in[1], 259 dev_proc(dev, get_color_mapping_procs)(dev)->map_rgb(dev, link->pis, frac_in[0], frac_in[1],
262 frac_in[2], frac_out); 260 frac_in[2], frac_out);
263 break; 261 break;
264 case 4: 262 case 4:
265 (link->cm_procs.map_cmyk)(dev, frac_in[0], frac_in[1], frac_in[2], 263 dev_proc(dev, get_color_mapping_procs)(dev)->map_cmyk(dev, frac_in[0], frac_in[1],
266 frac_in[3], frac_out); 264 frac_in[2], frac_in[3], frac_out);
267 break; 265 break;
268 default: 266 default:
269 break; 267 break;
@@ -348,7 +346,6 @@ gsicc_nocm_get_link(const gs_imager_state *pis, gx_device *dev,
348 gsicc_hashlink_t hash; 346 gsicc_hashlink_t hash;
349 nocm_link_t *nocm_link; 347 nocm_link_t *nocm_link;
350 gs_memory_t *mem = pis->memory->non_gc_memory; 348 gs_memory_t *mem = pis->memory->non_gc_memory;
351 const gx_cm_color_map_procs * cm_procs;
352 bool pageneutralcolor = false; 349 bool pageneutralcolor = false;
353 cmm_dev_profile_t *dev_profile; 350 cmm_dev_profile_t *dev_profile;
354 int code; 351 int code;
@@ -364,13 +361,6 @@ gsicc_nocm_get_link(const gs_imager_state *pis, gx_device *dev,
364 } 361 }
365 } 362 }
366 363
367 /* If the cm_procs are forwarding due to the overprint device or other
368 odd thing, drill down now and get the proper ones */
369 if (fwd_uses_fwd_cmap_procs(dev)) {
370 cm_procs = fwd_get_target_cmap_procs(dev);
371 } else {
372 cm_procs = dev_proc(dev, get_color_mapping_procs)(dev);
373 }
374 /* We will add this to the link cache so that we can avoid the issue 364 /* We will add this to the link cache so that we can avoid the issue
375 of black_generation and undercolor removal being GC values. 365 of black_generation and undercolor removal being GC values.
376 Since the link is not GC we would need to copy the contents over 366 Since the link is not GC we would need to copy the contents over
@@ -426,9 +416,6 @@ gsicc_nocm_get_link(const gs_imager_state *pis, gx_device *dev,
426 } 416 }
427 nocm_link->num_out = min(dev->color_info.num_components, 417 nocm_link->num_out = min(dev->color_info.num_components,
428 GS_CLIENT_COLOR_MAX_COMPONENTS); 418 GS_CLIENT_COLOR_MAX_COMPONENTS);
429 nocm_link->cm_procs.map_cmyk = cm_procs->map_cmyk;
430 nocm_link->cm_procs.map_rgb = cm_procs->map_rgb;
431 nocm_link->cm_procs.map_gray = cm_procs->map_gray;
432 nocm_link->num_in = src_index; 419 nocm_link->num_in = src_index;
433 420
434 result->num_input = nocm_link->num_in; 421 result->num_input = nocm_link->num_in;