diff options
Diffstat (limited to 'gs/src/gscie.c')
-rw-r--r-- | gs/src/gscie.c | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/gs/src/gscie.c b/gs/src/gscie.c index f3b2346c2..dc0bdd819 100644 --- a/gs/src/gscie.c +++ b/gs/src/gscie.c @@ -419,6 +419,22 @@ gx_install_CIEDEFG(const gs_color_space * pcs, gs_state * pgs) { gs_cie_defg *pcie = pcs->params.defg; +#if ENABLE_CUSTOM_COLOR_CALLBACK + { + /* + * Check if we want to use the callback color processing for this + * color space. + */ + client_custom_color_params_t * pcb = + (client_custom_color_params_t *) pgs->custom_color_callback; + + if (pcb != NULL) { + if (pcb->client_procs->install_CIEBasedDEFG(pcb, pcs, pgs)) + /* Exit if the client will handle the colorspace completely */ + return 0; + } + } +#endif CIE_LOAD_CACHE_BODY(pcie->caches_defg.DecodeDEFG, pcie->RangeDEFG.ranges, &pcie->DecodeDEFG, DecodeDEFG_default, pcie, "DecodeDEFG"); @@ -430,6 +446,22 @@ gx_install_CIEDEF(const gs_color_space * pcs, gs_state * pgs) { gs_cie_def *pcie = pcs->params.def; +#if ENABLE_CUSTOM_COLOR_CALLBACK + { + /* + * Check if we want to use the callback color processing for this + * color space. + */ + client_custom_color_params_t * pcb = + (client_custom_color_params_t *) pgs->custom_color_callback; + + if (pcb != NULL) { + if (pcb->client_procs->install_CIEBasedDEF(pcb, pcs, pgs)) + /* Exit if the client will handle the colorspace completely */ + return 0; + } + } +#endif CIE_LOAD_CACHE_BODY(pcie->caches_def.DecodeDEF, pcie->RangeDEF.ranges, &pcie->DecodeDEF, DecodeDEF_default, pcie, "DecodeDEF"); @@ -439,6 +471,22 @@ gx_install_CIEDEF(const gs_color_space * pcs, gs_state * pgs) int gx_install_CIEABC(const gs_color_space * pcs, gs_state * pgs) { +#if ENABLE_CUSTOM_COLOR_CALLBACK + { + /* + * Check if we want to use the callback color processing for this + * color space. + */ + client_custom_color_params_t * pcb = + (client_custom_color_params_t *) pgs->custom_color_callback; + + if (pcb != NULL) { + if (pcb->client_procs->install_CIEBasedABC(pcb, pcs, pgs)) + /* Exit if the client will handle the colorspace completely */ + return 0; + } + } +#endif return gx_install_cie_abc(pcs->params.abc, pgs); } @@ -449,6 +497,22 @@ gx_install_CIEA(const gs_color_space * pcs, gs_state * pgs) gs_sample_loop_params_t lp; int i; +#if ENABLE_CUSTOM_COLOR_CALLBACK + { + /* + * Check if we want to use the callback color processing for this + * color space. + */ + client_custom_color_params_t * pcb = + (client_custom_color_params_t *) pgs->custom_color_callback; + + if (pcb != NULL) { + if (pcb->client_procs->install_CIEBasedA(pcb, pcs, pgs)) + /* Exit if the client will handle the colorspace completely */ + return 0; + } + } +#endif gs_cie_cache_init(&pcie->caches.DecodeA.floats.params, &lp, &pcie->RangeA, "DecodeA"); for (i = 0; i <= lp.N; ++i) { |