freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] master b002f68: * src/smooth/ftgrays.c (gray_render_line): S


From: Alexei Podtelezhnikov
Subject: [freetype2] master b002f68: * src/smooth/ftgrays.c (gray_render_line): Simplify clipping.
Date: Mon, 07 Sep 2015 17:49:18 +0000

branch: master
commit b002f6882dbf184f353bee39db152a56d4b528d8
Author: Alexei Podtelezhnikov <address@hidden>
Commit: Alexei Podtelezhnikov <address@hidden>

    * src/smooth/ftgrays.c (gray_render_line): Simplify clipping.
---
 ChangeLog            |    4 ++++
 src/smooth/ftgrays.c |   17 +++--------------
 2 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a6e6db3..b4c306c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-09-07  Alexei Podtelezhnikov  <address@hidden>
+
+       * src/smooth/ftgrays.c (gray_render_line): Simplify clipping.
+
 2015-09-04  Alexei Podtelezhnikov  <address@hidden>
 
        [raster,smooth] Microoptimizations.
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index e4559b9..b6b0230 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -805,20 +805,9 @@ typedef ptrdiff_t  FT_PtrDist;
     dy = to_y - ras.y;
 
     /* perform vertical clipping */
-    {
-      TCoord  min, max;
-
-
-      min = ey1;
-      max = ey2;
-      if ( ey1 > ey2 )
-      {
-        min = ey2;
-        max = ey1;
-      }
-      if ( min >= ras.max_ey || max < ras.min_ey )
-        goto End;
-    }
+    if ( ( ey1 >= ras.max_ey && ey2 >= ras.max_ey ) ||
+         ( ey1 <  ras.min_ey && ey2 <  ras.min_ey ) )
+      goto End;
 
     /* everything is on a single scanline */
     if ( ey1 == ey2 )



reply via email to

[Prev in Thread] Current Thread [Next in Thread]