[smooth] Improve tracing.

* src/smooth/ftgrays.c (gray_convert_glyph_inner): Only use tracing
if called the first time.
(gray_convert_glyph): Updated.
This commit is contained in:
Werner Lemberg 2018-08-08 18:15:53 +02:00
parent c9bbc2419a
commit f60c98feaf
2 changed files with 19 additions and 2 deletions

View File

@ -1,3 +1,11 @@
2018-08-08 Werner Lemberg <wl@gnu.org>
[smooth] Improve tracing.
* src/smooth/ftgrays.c (gray_convert_glyph_inner): Only use tracing
if called the first time.
(gray_convert_glyph): Updated.
2018-08-08 Werner Lemberg <wl@gnu.org>
Add internal functions `FT_Trace_Disable' and `FT_Trace_Enable'.

View File

@ -1705,14 +1705,20 @@ typedef ptrdiff_t FT_PtrDist;
static int
gray_convert_glyph_inner( RAS_ARG )
gray_convert_glyph_inner( RAS_ARG,
int continued )
{
volatile int error = 0;
if ( ft_setjmp( ras.jump_buffer ) == 0 )
{
if ( continued )
FT_Trace_Disable();
error = FT_Outline_Decompose( &ras.outline, &func_interface, &ras );
if ( continued )
FT_Trace_Enable();
if ( !ras.invalid )
gray_record_cell( RAS_VAR );
@ -1747,6 +1753,8 @@ typedef ptrdiff_t FT_PtrDist;
TCoord bands[32]; /* enough to accommodate bisections */
TCoord* band;
int continued = 0;
/* set up vertical bands */
if ( height > n )
@ -1786,7 +1794,8 @@ typedef ptrdiff_t FT_PtrDist;
ras.min_ey = band[1];
ras.max_ey = band[0];
error = gray_convert_glyph_inner( RAS_VAR );
error = gray_convert_glyph_inner( RAS_VAR, continued );
continued = 1;
if ( !error )
{