Commit fdcbaf19fef106522eb5a5e11acbd04a3fa6330f

Werner Lemberg 2012-10-21T10:40:12

[smooth] Improve tracing. * src/smooth/ftgrays.c (gray_sweep): Trace last sweep line of current band also.

diff --git a/ChangeLog b/ChangeLog
index 3e92e6f..a43804c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,17 @@
+2012-10-21  Werner Lemberg  <wl@gnu.org>
+
+	[smooth] Improve tracing.
+
+	* src/smooth/ftgrays.c (gray_sweep): Trace last sweep line of
+	current band also.
+
 2012-10-20  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
-        [truetype] Cheaper way to threshold angles between vectors.
+	[truetype] Cheaper way to threshold angles between vectors.
 
 	* src/truetype/ttinterp.c (Ins_ISECT): Thresholding tangent is a lot
 	cheaper than thresholding sine. 
-	
+
 2012-10-20  Werner Lemberg  <wl@gnu.org>
 
 	[cff] Improve parsing of invalid real numbers.
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index 27b85b8..f0db123 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -1400,7 +1400,26 @@ typedef ptrdiff_t  FT_PtrDist;
       ras.render_span( ras.span_y, ras.num_gray_spans,
                        ras.gray_spans, ras.render_span_data );
 
+#ifdef FT_DEBUG_LEVEL_TRACE
+
+    if ( ras.num_gray_spans > 0 )
+    {
+      FT_Span*  span;
+      int       n;
+
+
+      FT_TRACE7(( "y = %3d ", ras.span_y ));
+      span = ras.gray_spans;
+      for ( n = 0; n < ras.num_gray_spans; n++, span++ )
+        FT_TRACE7(( "[%d..%d]:%02x ",
+                    span->x, span->x + span->len - 1, span->coverage ));
+      FT_TRACE7(( "\n" ));
+    }
+
     FT_TRACE7(( "gray_sweep: end\n" ));
+
+#endif /* FT_DEBUG_LEVEL_TRACE */
+
   }