diff options
author | Igor Melichev <igor.melichev@artifex.com> | 2006-11-13 11:18:36 +0000 |
---|---|---|
committer | Igor Melichev <igor.melichev@artifex.com> | 2006-11-13 11:18:36 +0000 |
commit | 3658dcd407d79e4d3bd1a5eb39829ef576ab8de7 (patch) | |
tree | 59e24f3b6c9f04b31ad160eaf74b92ac8b08ed83 /gs/src/gscspace.c | |
parent | 43cd818add74f5fbb6c64e1e1f620731012b4b7e (diff) |
Fix (shadings) : Remove colors from C stack.
DETAILS :
This is the 3nd step of fixing the bug 688955
"64K stack overflows with shadings".
This change is algorithmically equivalent.
1. New functions reserve_colors_inline, reserve_colors work with
the color stack in heap.
2. Currently the color stack pointer is saved at each
recursion level for simplifying the debugging.
We intend t move it later to the shading fill state structure.
Currently it is passed via most function calls as a new argument.
3. In automatic data the colors change type
from a structure to pointer.
4. Since we want to keep colors be constant while
the heavy decompositioin recursion, we made
the local color pointers point to const data.
Therefore a new argument is added to some functions,
which construct colors and therefore need
a non-conmst access. Thise changes are commented with
"providing a non-const access".
5. Minor change : cs_is_linear changes the 1st argument type to 'const'
(gscspace.c, gxcspace.h).
EXPECTED DIFFERENCES :
None.
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@7189 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'gs/src/gscspace.c')
-rw-r--r-- | gs/src/gscspace.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gs/src/gscspace.c b/gs/src/gscspace.c index 38d334715..452ce07fb 100644 --- a/gs/src/gscspace.c +++ b/gs/src/gscspace.c @@ -458,7 +458,7 @@ gx_no_adjust_cspace_count(const gs_color_space * pcs, int delta) /* A stub for a color mapping linearity check, when it is inapplicable. */ int -gx_cspace_no_linear(gs_direct_color_space *cs, const gs_imager_state * pis, +gx_cspace_no_linear(const gs_direct_color_space *cs, const gs_imager_state * pis, gx_device * dev, const gs_client_color *c0, const gs_client_color *c1, const gs_client_color *c2, const gs_client_color *c3, @@ -468,7 +468,7 @@ gx_cspace_no_linear(gs_direct_color_space *cs, const gs_imager_state * pis, } private inline int -cc2dc(gs_direct_color_space *cs, const gs_imager_state * pis, gx_device *dev, +cc2dc(const gs_direct_color_space *cs, const gs_imager_state * pis, gx_device *dev, gx_device_color *dc, const gs_client_color *cc) { return cs->type->remap_color(cc, (const gs_color_space *)cs, dc, pis, dev, gs_color_select_texture); @@ -516,7 +516,7 @@ is_dc_nearly_linear(const gx_device *dev, const gx_device_color *c, /* Default color mapping linearity check, a 2-points case. */ private int -gx_cspace_is_linear_in_line(gs_direct_color_space *cs, const gs_imager_state * pis, +gx_cspace_is_linear_in_line(const gs_direct_color_space *cs, const gs_imager_state * pis, gx_device *dev, const gs_client_color *c0, const gs_client_color *c1, float smoothness) @@ -549,7 +549,7 @@ gx_cspace_is_linear_in_line(gs_direct_color_space *cs, const gs_imager_state * p /* Default color mapping linearity check, a triangle case. */ private int -gx_cspace_is_linear_in_triangle(gs_direct_color_space *cs, const gs_imager_state * pis, +gx_cspace_is_linear_in_triangle(const gs_direct_color_space *cs, const gs_imager_state * pis, gx_device *dev, const gs_client_color *c0, const gs_client_color *c1, const gs_client_color *c2, float smoothness) @@ -604,7 +604,7 @@ gx_cspace_is_linear_in_triangle(gs_direct_color_space *cs, const gs_imager_state /* Default color mapping linearity check. */ int -gx_cspace_is_linear_default(gs_direct_color_space *cs, const gs_imager_state * pis, +gx_cspace_is_linear_default(const gs_direct_color_space *cs, const gs_imager_state * pis, gx_device *dev, const gs_client_color *c0, const gs_client_color *c1, const gs_client_color *c2, const gs_client_color *c3, |