[smooth] Fix valgrind warning and reoptimize.
The algorithm calls `gray_set_cell' at the start of each new contour
or when the contours cross the cell boundaries. Double-checking for
that is wasteful.
* src/smooth/ftgrays.c (gray_set_cell): Remove check for a new cell.
(gray_convert_glyph): Remove initialization introduced by 44b172e88
.
This commit is contained in:
parent
e421a0bffc
commit
6ca54c6430
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
||||||
|
2016-09-11 Alexei Podtelezhnikov <apodtele@gmail.com>
|
||||||
|
|
||||||
|
[smooth] Fix valgrind warning and reoptimize.
|
||||||
|
|
||||||
|
The algorithm calls `gray_set_cell' at the start of each new contour
|
||||||
|
or when the contours cross the cell boundaries. Double-checking for
|
||||||
|
that is wasteful.
|
||||||
|
|
||||||
|
* src/smooth/ftgrays.c (gray_set_cell): Remove check for a new cell.
|
||||||
|
(gray_convert_glyph): Remove initialization introduced by 44b172e88.
|
||||||
|
|
||||||
2016-09-10 Werner Lemberg <wl@gnu.org>
|
2016-09-10 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
[sfnt] Fix previous commit.
|
[sfnt] Fix previous commit.
|
||||||
|
|
|
@ -577,15 +577,13 @@ typedef ptrdiff_t FT_PtrDist;
|
||||||
|
|
||||||
/* All cells that are on the left of the clipping region go to the */
|
/* All cells that are on the left of the clipping region go to the */
|
||||||
/* min_ex - 1 horizontal position. */
|
/* min_ex - 1 horizontal position. */
|
||||||
|
|
||||||
if ( ex > ras.max_ex )
|
if ( ex > ras.max_ex )
|
||||||
ex = ras.max_ex;
|
ex = ras.max_ex;
|
||||||
|
|
||||||
if ( ex < ras.min_ex )
|
if ( ex < ras.min_ex )
|
||||||
ex = ras.min_ex - 1;
|
ex = ras.min_ex - 1;
|
||||||
|
|
||||||
/* are we moving to a different cell ? */
|
|
||||||
if ( ex != ras.ex || ey != ras.ey )
|
|
||||||
{
|
|
||||||
/* record the current one if it is valid */
|
/* record the current one if it is valid */
|
||||||
if ( !ras.invalid )
|
if ( !ras.invalid )
|
||||||
gray_record_cell( RAS_VAR );
|
gray_record_cell( RAS_VAR );
|
||||||
|
@ -594,7 +592,6 @@ typedef ptrdiff_t FT_PtrDist;
|
||||||
ras.cover = 0;
|
ras.cover = 0;
|
||||||
ras.ex = ex;
|
ras.ex = ex;
|
||||||
ras.ey = ey;
|
ras.ey = ey;
|
||||||
}
|
|
||||||
|
|
||||||
ras.invalid = ( ey >= ras.max_ey || ey < ras.min_ey ||
|
ras.invalid = ( ey >= ras.max_ey || ey < ras.min_ey ||
|
||||||
ex >= ras.max_ex );
|
ex >= ras.max_ex );
|
||||||
|
@ -1820,7 +1817,7 @@ typedef ptrdiff_t FT_PtrDist;
|
||||||
ras.num_cells = 0;
|
ras.num_cells = 0;
|
||||||
ras.invalid = 1;
|
ras.invalid = 1;
|
||||||
ras.min_ey = band[1];
|
ras.min_ey = band[1];
|
||||||
ras.max_ey = ras.ey = band[0];
|
ras.max_ey = band[0];
|
||||||
|
|
||||||
error = gray_convert_glyph_inner( RAS_VAR );
|
error = gray_convert_glyph_inner( RAS_VAR );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue