[gs-commits] rev 10957 - branches/icc_work/base
mvrhel at ghostscript.com
mvrhel at ghostscript.com
Tue Mar 23 20:43:37 UTC 2010
Author: mvrhel
Date: 2010-03-23 20:43:36 +0000 (Tue, 23 Mar 2010)
New Revision: 10957
Modified:
branches/icc_work/base/gscdevn.c
branches/icc_work/base/gsiccmanage.c
Log:
White space clean up.
Modified: branches/icc_work/base/gscdevn.c
===================================================================
--- branches/icc_work/base/gscdevn.c 2010-03-23 19:14:32 UTC (rev 10956)
+++ branches/icc_work/base/gscdevn.c 2010-03-23 20:43:36 UTC (rev 10957)
@@ -302,7 +302,6 @@
for (i = 0; i < pcs->params.device_n.num_components; ++i) {
floatp value = pcc->paint.values[i];
-
pcc->paint.values[i] = (value <= 0 ? 0 : value >= 1 ? 1 : value);
}
}
@@ -319,7 +318,6 @@
if (pcs->id != pis->color_component_map.cspace_id)
dprintf("gx_concrete_space_DeviceN: color space id mismatch");
#endif
-
/*
* Check if we are using the alternate color space.
*/
@@ -345,47 +343,32 @@
gs_client_color temp;
if ( pcs->cmm_icc_profile_data != NULL && pis->color_component_map.use_alt_cspace) {
-
/* If needed, reorganize the data. The ICC colorants tag drives the
the laydown order */
-
- if (pcs->cmm_icc_profile_data->devicen_permute_needed){
-
- for ( k = 0; k < i; k++){
-
+ if (pcs->cmm_icc_profile_data->devicen_permute_needed) {
+ for ( k = 0; k < i; k++) {
temp.paint.values[k] = pcc->paint.values[pcs->cmm_icc_profile_data->devicen_permute[k]];
-
}
-
code = pacs->type->remap_color(&temp, pacs, pdc, pis, dev, select);
-
} else {
-
code = pacs->type->remap_color(pcc, pacs, pdc, pis, dev, select);
-
}
return(code);
-
} else {
-
code = (*pcs->type->concretize_color)(pcc, pcs, conc, pis);
-
if (code < 0)
return code;
pconcs = cs_concrete_space(pcs, pis);
code = (*pconcs->type->remap_concrete_color)(conc, pconcs, pdc, pis, dev, select);
-
/* Save original color space and color info into dev color */
i = any_abs(i);
for (i--; i >= 0; i--)
pdc->ccolor.paint.values[i] = pcc->paint.values[i];
pdc->ccolor_valid = true;
return code;
-
}
}
-
static int
gx_concretize_DeviceN(const gs_client_color * pc, const gs_color_space * pcs,
frac * pconc, const gs_imager_state * pis)
@@ -558,48 +541,31 @@
code = check_DeviceN_component_names(pcs, pgs);
if (code < 0)
return code;
-
/* See if we have an ICC profile that we can associate with
this DeviceN color space */
-
if (pgs->icc_manager->device_n != NULL) {
-
/* An nclr profile is in the manager. Grab one
that matches */
-
pcs->cmm_icc_profile_data = gsicc_finddevicen(pcs, pgs->icc_manager);
-
if (pcs->cmm_icc_profile_data != NULL)
rc_adjust(pcs->cmm_icc_profile_data, pcs->rc.ref_count, "gs_install_DeviceN");
-
}
-
/* {csrc} was pgs->color_space->params.device_n.use_alt_cspace */
((gs_color_space *)pcs)->params.device_n.use_alt_cspace =
using_alt_color_space(pgs);
-
if (pcs->params.device_n.use_alt_cspace && pcs->cmm_icc_profile_data == NULL ) {
-
/* No nclr ICC profile */
-
code = (pcs->base_space->type->install_cspace)
(pcs->base_space, pgs);
-
} else if (pcs->params.device_n.use_alt_cspace) {
-
gs_color_space *nclr_pcs;
-
/* Need to install the nclr cspace */
code = gs_cspace_build_ICC(&nclr_pcs, NULL, pgs->memory);
nclr_pcs->cmm_icc_profile_data = pcs->cmm_icc_profile_data;
rc_increment_cs(nclr_pcs);
-
rc_decrement_cs(pcs->base_space, "gx_install_DeviceN");
-
pcs->base_space = nclr_pcs;
-
}
-
/*
* Give the device an opportunity to capture equivalent colors for any
* spot colors which might be present in the color space.
Modified: branches/icc_work/base/gsiccmanage.c
===================================================================
--- branches/icc_work/base/gsiccmanage.c 2010-03-23 19:14:32 UTC (rev 10956)
+++ branches/icc_work/base/gsiccmanage.c 2010-03-23 20:43:36 UTC (rev 10957)
@@ -62,7 +62,8 @@
gs_private_st_ptrs1(st_gsicc_namelist, gsicc_namelist_t, "gsicc_namelist",
gsicc_namelist_enum_ptrs, gsicc_namelist_reloc_ptrs, head);
gs_private_st_ptrs4(st_gsicc_profile, cmm_profile_t, "gsicc_profile",
- gsicc_profile_enum_ptrs, gsicc_profile_reloc_ptrs, buffer, dev, name, spotnames);
+ gsicc_profile_enum_ptrs, gsicc_profile_reloc_ptrs, buffer,
+ dev, name, spotnames);
gs_private_st_ptrs10(st_gsicc_manager, gsicc_manager_t, "gsicc_manager",
gsicc_manager_enum_ptrs, gsicc_manager_profile_reloc_ptrs,
@@ -238,25 +239,20 @@
num_colors = gscms_get_numberclrtnames(profile);
if (num_colors == 0)
return(NULL);
-
/* Allocate structure for managing this */
list = gsicc_new_namelist(memory);
if (list == NULL)
return(NULL);
-
curr_entry = &(list->head);
for (k = 0; k < num_colors; k++) {
-
/* Allocate a new name object */
name = gsicc_new_colorname(memory);
*curr_entry = name;
-
/* Get the name */
clr_name = gscms_get_clrtname(profile, k);
gsicc_copy_colorname(clr_name, *curr_entry, memory);
curr_entry = &((*curr_entry)->next);
}
-
list->count = num_colors;
return(list);
}
@@ -276,7 +272,6 @@
}
icc_profile->spotnames = gsicc_get_spotnames(icc_profile->profile_handle, memory);
return;
-
}
/* Allocate new spot name list object. */
@@ -290,7 +285,6 @@
result->count = 0;
result->head = NULL;
return(result);
-
}
/* Allocate new spot name. */
More information about the gs-commits
mailing list