shithub: freetype+ttf2subf

Download patch

ref: f60c98feaf53de0ba9ea9acf4896476662d994bd
parent: c9bbc2419ae7d3cf73a597afbf02cb335ede952f
author: Werner Lemberg <[email protected]>
date: Wed Aug 8 14:15:53 EDT 2018

[smooth] Improve tracing.

* src/smooth/ftgrays.c (gray_convert_glyph_inner): Only use tracing
if called the first time.
(gray_convert_glyph): Updated.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2018-08-08  Werner Lemberg  <[email protected]>
 
+	[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  <[email protected]>
+
 	Add internal functions `FT_Trace_Disable' and `FT_Trace_Enable'.
 
 	It sometimes makes sense to suppress tracing informations, for
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -1705,7 +1705,8 @@
 
 
   static int
-  gray_convert_glyph_inner( RAS_ARG )
+  gray_convert_glyph_inner( RAS_ARG,
+                            int  continued )
   {
     volatile int  error = 0;
 
@@ -1712,7 +1713,12 @@
 
     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,7 +1753,9 @@
     TCoord   bands[32];  /* enough to accommodate bisections */
     TCoord*  band;
 
+    int  continued = 0;
 
+
     /* set up vertical bands */
     if ( height > n )
     {
@@ -1786,7 +1794,8 @@
         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 )
         {