freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] [raster] Eliminate intensive flow check


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][master] [raster] Eliminate intensive flow checking.
Date: Fri, 24 Nov 2023 15:28:04 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

  • efbae547
    by Alexei Podtelezhnikov (Алексей Подтележников) at 2023-11-24T10:23:36-05:00
    [raster] Eliminate intensive flow checking.
    
    * src/raster/ftraster.c (Draw_Sweep): Pass the flow increment.
    (Increment): Accept the flow increment.
    

1 changed file:

Changes:

  • src/raster/ftraster.c
    ... ... @@ -1913,7 +1913,8 @@
    1913 1913
        *   Bubble sort with immediate restart is good enough and simple.
    
    1914 1914
        */
    
    1915 1915
       static void
    
    1916
    -  Increment( PProfileList  list )
    
    1916
    +  Increment( PProfileList  list,
    
    1917
    +             Int           flow )
    
    1917 1918
       {
    
    1918 1919
         PProfile  *old, current, next;
    
    1919 1920
     
    
    ... ... @@ -1925,7 +1926,7 @@
    1925 1926
           current = *old;
    
    1926 1927
           if ( --current->height )
    
    1927 1928
           {
    
    1928
    -        current->offset += ( current->flags & Flow_Up ) ? 1 : -1;
    
    1929
    +        current->offset += flow;
    
    1929 1930
             current->X       = current->x[current->offset];
    
    1930 1931
             old = &current->link;
    
    1931 1932
           }
    
    ... ... @@ -2267,6 +2268,8 @@
    2267 2268
             {
    
    2268 2269
               *Q = P->link;  /* remove */
    
    2269 2270
     
    
    2271
    +          /* each active list contains profiles with the same flow */
    
    2272
    +          /* left and right are arbitrary, correspond to TrueType  */
    
    2270 2273
               if ( P->flags & Flow_Up )
    
    2271 2274
                 InsNew( &draw_left,  P );
    
    2272 2275
               else
    
    ... ... @@ -2294,6 +2297,8 @@
    2294 2297
               Long  xs;
    
    2295 2298
     
    
    2296 2299
     
    
    2300
    +          /* TrueType should have x2 > x1, but can be opposite */
    
    2301
    +          /* by mistake or in CFF/Type1, fix it then           */
    
    2297 2302
               if ( x1 > x2 )
    
    2298 2303
               {
    
    2299 2304
                 xs = x1;
    
    ... ... @@ -2418,8 +2423,8 @@
    2418 2423
     
    
    2419 2424
             ras.Proc_Sweep_Step( RAS_VAR );
    
    2420 2425
     
    
    2421
    -        Increment( &draw_left  );
    
    2422
    -        Increment( &draw_right );
    
    2426
    +        Increment( &draw_left,   1 );
    
    2427
    +        Increment( &draw_right, -1 );
    
    2423 2428
           }
    
    2424 2429
           while ( ++y < y_turn );
    
    2425 2430
         }
    


  • reply via email to

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