diff options
author | Alexei Podtelezhnikov <apodtele@gmail.com> | 2016-06-14 23:38:17 -0400 |
---|---|---|
committer | Alexei Podtelezhnikov <apodtele@gmail.com> | 2016-06-14 23:38:17 -0400 |
commit | 32acceff836c2ca40be0034d0efaefad8278fadb (patch) | |
tree | ac6524b63fe3daf4ee5684b9bf5f336fc5b0962f | |
parent | 05a55a56e257a844fbbb20733407de7d3a0841fb (diff) | |
download | freetype2-32acceff836c2ca40be0034d0efaefad8278fadb.tar.gz |
* src/smooth/ftgrays.c (gray_hline): Optimize if-condition.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/smooth/ftgrays.c | 8 |
2 files changed, 9 insertions, 5 deletions
@@ -1,3 +1,7 @@ +2016-06-14 Alexei Podtelezhnikov <apodtele@gmail.com> + + * src/smooth/ftgrays.c (gray_hline): Optimize if-condition. + 2016-06-13 Werner Lemberg <wl@gnu.org> [autofit] Add support for Cherokee script. @@ -31,7 +35,7 @@ [smooth] Re-enable new line renderer on 64-bit archs. - * src/smooth/ftgrays (gray_render_line): Conditionally re-enable new + * src/smooth/ftgrays.c (gray_render_line): Conditionally re-enable new implementation, where it is safe from overflows. 2016-06-08 Alexei Podtelezhnikov <apodtele@gmail.com> diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c index efa5f94fa..28fc535a1 100644 --- a/src/smooth/ftgrays.c +++ b/src/smooth/ftgrays.c @@ -1429,10 +1429,10 @@ typedef ptrdiff_t FT_PtrDist; /* see whether we can add this span to the current list */ count = ras.num_gray_spans; span = ras.gray_spans + count - 1; - if ( count > 0 && - ras.span_y == y && - (int)span->x + span->len == (int)x && - span->coverage == coverage ) + if ( span->coverage == coverage && + (TCoord)span->x + span->len == x && + ras.span_y == y && + count > 0 ) { span->len = (unsigned short)( span->len + acount ); return; |