[smooth] Remove impossibility.
* src/smooth/ftgrays.c (TWorker): Rearrange fields. (gray_convert_glyph): Remove impossible condition and clean up.
This commit is contained in:
parent
3576487add
commit
b0aacff474
|
@ -1,3 +1,10 @@
|
||||||
|
2016-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
|
||||||
|
|
||||||
|
[smooth] Remove impossibility.
|
||||||
|
|
||||||
|
* src/smooth/ftgrays.c (TWorker): Rearrange fields.
|
||||||
|
(gray_convert_glyph): Remove impossible condition and clean up.
|
||||||
|
|
||||||
2016-09-29 Werner Lemberg <wl@gnu.org>
|
2016-09-29 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
[pcf] Enrich family name with foundry name and glyph width info.
|
[pcf] Enrich family name with foundry name and glyph width info.
|
||||||
|
|
|
@ -443,6 +443,7 @@ typedef ptrdiff_t FT_PtrDist;
|
||||||
TCoord cover;
|
TCoord cover;
|
||||||
int invalid;
|
int invalid;
|
||||||
|
|
||||||
|
PCell* ycells;
|
||||||
PCell cells;
|
PCell cells;
|
||||||
FT_PtrDist max_cells;
|
FT_PtrDist max_cells;
|
||||||
FT_PtrDist num_cells;
|
FT_PtrDist num_cells;
|
||||||
|
@ -455,8 +456,6 @@ typedef ptrdiff_t FT_PtrDist;
|
||||||
FT_Raster_Span_Func render_span;
|
FT_Raster_Span_Func render_span;
|
||||||
void* render_span_data;
|
void* render_span_data;
|
||||||
|
|
||||||
PCell* ycells;
|
|
||||||
|
|
||||||
} gray_TWorker, *gray_PWorker;
|
} gray_TWorker, *gray_PWorker;
|
||||||
|
|
||||||
#if defined( _MSC_VER )
|
#if defined( _MSC_VER )
|
||||||
|
@ -1792,18 +1791,15 @@ typedef ptrdiff_t FT_PtrDist;
|
||||||
cell_start = ( ycount * sizeof ( PCell ) + sizeof ( TCell ) - 1 ) /
|
cell_start = ( ycount * sizeof ( PCell ) + sizeof ( TCell ) - 1 ) /
|
||||||
sizeof ( TCell );
|
sizeof ( TCell );
|
||||||
|
|
||||||
if ( FT_MAX_GRAY_POOL - cell_start < 2 )
|
|
||||||
goto ReduceBands;
|
|
||||||
|
|
||||||
ras.cells = buffer + cell_start;
|
ras.cells = buffer + cell_start;
|
||||||
ras.max_cells = (FT_PtrDist)( FT_MAX_GRAY_POOL - cell_start );
|
ras.max_cells = (FT_PtrDist)( FT_MAX_GRAY_POOL - cell_start );
|
||||||
|
ras.num_cells = 0;
|
||||||
|
|
||||||
ras.ycells = (PCell*)buffer;
|
ras.ycells = (PCell*)buffer;
|
||||||
while ( ycount )
|
while ( ycount )
|
||||||
ras.ycells[--ycount] = NULL;
|
ras.ycells[--ycount] = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ras.num_cells = 0;
|
|
||||||
ras.invalid = 1;
|
ras.invalid = 1;
|
||||||
ras.min_ey = band[1];
|
ras.min_ey = band[1];
|
||||||
ras.max_ey = band[0];
|
ras.max_ey = band[0];
|
||||||
|
@ -1819,7 +1815,6 @@ typedef ptrdiff_t FT_PtrDist;
|
||||||
else if ( error != ErrRaster_Memory_Overflow )
|
else if ( error != ErrRaster_Memory_Overflow )
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
ReduceBands:
|
|
||||||
/* render pool overflow; we will reduce the render band by half */
|
/* render pool overflow; we will reduce the render band by half */
|
||||||
width >>= 1;
|
width >>= 1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue