Commit 7effc279b0b625884512d72fa0b7b070b1c785b5

Alexei Podtelezhnikov 2016-09-05T21:58:56

[smooth] Improve contour start. * src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly instead of... (gray_start_cell): ... this function, which is removed.

diff --git a/ChangeLog b/ChangeLog
index e84aee0..f63c657 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2016-09-05  Alexei Podtelezhnikov  <apodtele@gmail.com>
+
+	[smooth] Improve contour start.
+
+	* src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly
+	instead of...
+	(gray_start_cell): ... this function, which is removed.
+
 2016-09-05  Werner Lemberg  <wl@gnu.org>
 
 	[cff] Fix memory initialization.
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index f5cf7af..698c105 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -605,29 +605,6 @@ typedef ptrdiff_t  FT_PtrDist;
   }
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* Start a new contour at a given cell.                                  */
-  /*                                                                       */
-  static void
-  gray_start_cell( RAS_ARG_ TCoord  ex,
-                            TCoord  ey )
-  {
-    if ( ex > ras.max_ex )
-      ex = ras.max_ex;
-
-    if ( ex < ras.min_ex )
-      ex = ras.min_ex - 1;
-
-    ras.area    = 0;
-    ras.cover   = 0;
-    ras.ex      = ex - ras.min_ex;
-    ras.ey      = ey - ras.min_ey;
-    ras.invalid = 0;
-
-    gray_set_cell( RAS_VAR_ ex, ey );
-  }
-
 #ifndef FT_LONG64
 
   /*************************************************************************/
@@ -1224,15 +1201,11 @@ typedef ptrdiff_t  FT_PtrDist;
     TPos  x, y;
 
 
-    /* record current cell, if any */
-    if ( !ras.invalid )
-      gray_record_cell( RAS_VAR );
-
     /* start to a new position */
     x = UPSCALE( to->x );
     y = UPSCALE( to->y );
 
-    gray_start_cell( RAS_VAR_ TRUNC( x ), TRUNC( y ) );
+    gray_set_cell( RAS_VAR_ TRUNC( x ), TRUNC( y ) );
 
     ras.x = x;
     ras.y = y;