diff --git a/ChangeLog b/ChangeLog index cc5c1f9a2..fc6d8b00f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2021-06-25 Alexei Podtelezhnikov + + [raster] Adjust sub-band bisecting limits. + + We can bisect a band until it is just a single scan line. This might + be slow and cause time-outs but if we need to impose limits it should + be elsewhere. + + * src/raster/ftraster.c (Render_Single_Pass): Tweak sub-banding. + 2021-06-25 Alexei Podtelezhnikov * src/raster/ftraster.c (Render_Single_Pass): Remove dead code. diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index a1cbf62bc..b88a436e0 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -528,6 +528,7 @@ TPoint arcs[3 * MaxBezier + 1]; /* The Bezier stack */ black_TBand band_stack[16]; /* band stack used for sub-banding */ + /* enough for signed short bands */ Int band_top; /* band stack top */ }; @@ -3054,19 +3055,19 @@ i = ras.band_stack[ras.band_top].y_min; j = ras.band_stack[ras.band_top].y_max; - k = (Short)( ( i + j ) / 2 ); - - if ( ras.band_top >= 7 || k < i ) + if ( i == j ) { ras.band_top = 0; return ras.error; /* still Raster_Overflow */ } - ras.band_stack[ras.band_top + 1].y_min = k; + k = (Short)( ( i + j ) / 2 ); + + ras.band_stack[ras.band_top + 1].y_min = (Short)( k + 1 ); ras.band_stack[ras.band_top + 1].y_max = j; - ras.band_stack[ras.band_top].y_max = (Short)( k - 1 ); + ras.band_stack[ras.band_top].y_max = k; ras.band_top++; }