freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] [raster] Increase the raster pool densi


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][master] [raster] Increase the raster pool density.
Date: Tue, 24 Oct 2023 03:00:27 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

  • 8c5ec8dd
    by Alexei Podtelezhnikov (Алексей Подтележников) at 2023-10-23T22:48:34-04:00
    [raster] Increase the raster pool density.
    
    This only helps to delay the pool overflow and bisections to larger
    sizes and benefits only very intricate glyphs at reasonable sizes.
    
    * src/raster/ftraster.c (TProfile): Use Int instead of Long or PLong
    when it is sufficient.
    (New_Profile, End_Profuile, Bezier_Up, Sort): Updated accordingly.
    

1 changed file:

Changes:

  • src/raster/ftraster.c
    ... ... @@ -338,9 +338,9 @@
    338 338
         PProfile    link;        /* link to next profile (various purposes)  */
    
    339 339
         PProfile    next;        /* next profile in same contour, used       */
    
    340 340
                                  /* during drop-out control                  */
    
    341
    -    PLong       offset;      /* start of profile's data in render pool   */
    
    342
    -    Long        height;      /* profile's height in scanlines            */
    
    343
    -    Long        start;       /* profile's starting scanline              */
    
    341
    +    Int         offset;      /* bottom or currently scanned array index  */
    
    342
    +    Int         height;      /* profile's height in scanlines            */
    
    343
    +    Int         start;       /* profile's starting scanline              */
    
    344 344
         UShort      flags;       /* Bit 0-2: drop-out mode                   */
    
    345 345
                                  /* Bit 3: profile orientation (up/down)     */
    
    346 346
                                  /* Bit 4: is top profile?                   */
    
    ... ... @@ -667,7 +667,6 @@
    667 667
           }
    
    668 668
     
    
    669 669
           ras.cProfile->height = 0;
    
    670
    -      ras.cProfile->offset = ras.top;
    
    671 670
         }
    
    672 671
     
    
    673 672
         ras.cProfile->flags  = ras.dropOutControl;
    
    ... ... @@ -722,7 +721,7 @@
    722 721
       End_Profile( RAS_ARGS Bool  overshoot )
    
    723 722
       {
    
    724 723
         PProfile  p = ras.cProfile;
    
    725
    -    Long      h = (Long)( ras.top - p->offset );
    
    724
    +    Int       h = (Int)( ras.top - p->x );
    
    726 725
         Int       bottom, top;
    
    727 726
     
    
    728 727
     
    
    ... ... @@ -735,7 +734,7 @@
    735 734
     
    
    736 735
         if ( h > 0 )
    
    737 736
         {
    
    738
    -      FT_TRACE7(( "  ending profile %p, start = %2ld, height = %+3ld\n",
    
    737
    +      FT_TRACE7(( "  ending profile %p, start = %2d, height = %+3d\n",
    
    739 738
                       (void *)p, p->start, p->flags & Flow_Up ? h : -h ));
    
    740 739
     
    
    741 740
           if ( overshoot )
    
    ... ... @@ -750,19 +749,20 @@
    750 749
     
    
    751 750
           if ( p->flags & Flow_Up )
    
    752 751
           {
    
    753
    -        bottom = (Int)p->start;
    
    754
    -        top    = (Int)( p->start + h - 1 );
    
    752
    +        bottom    = p->start;
    
    753
    +        top       = bottom + h;
    
    754
    +        p->offset = 0;
    
    755 755
           }
    
    756 756
           else
    
    757 757
           {
    
    758
    -        bottom     = (Int)( p->start - h + 1 );
    
    759
    -        top        = (Int)p->start;
    
    760
    -        p->start   = bottom;
    
    761
    -        p->offset += h - 1;
    
    758
    +        top       = p->start + 1;
    
    759
    +        bottom    = top - h;
    
    760
    +        p->start  = bottom;
    
    761
    +        p->offset = h - 1;
    
    762 762
           }
    
    763 763
     
    
    764
    -      if ( Insert_Y_Turn( RAS_VARS bottom )  ||
    
    765
    -           Insert_Y_Turn( RAS_VARS top + 1 ) )
    
    764
    +      if ( Insert_Y_Turn( RAS_VARS bottom ) ||
    
    765
    +           Insert_Y_Turn( RAS_VARS top )    )
    
    766 766
             return FAILURE;
    
    767 767
     
    
    768 768
           if ( !ras.gProfile )
    
    ... ... @@ -1181,7 +1181,7 @@
    1181 1181
     
    
    1182 1182
         if ( ras.fresh )
    
    1183 1183
         {
    
    1184
    -      ras.cProfile->start = TRUNC( e0 );
    
    1184
    +      ras.cProfile->start = (Int)TRUNC( e0 );
    
    1185 1185
           ras.fresh = FALSE;
    
    1186 1186
         }
    
    1187 1187
     
    
    ... ... @@ -2074,7 +2074,7 @@
    2074 2074
         current = *list;
    
    2075 2075
         while ( current )
    
    2076 2076
         {
    
    2077
    -      current->X       = *current->offset;
    
    2077
    +      current->X       = current->x[current->offset];
    
    2078 2078
           current->offset += ( current->flags & Flow_Up ) ? 1 : -1;
    
    2079 2079
           current->height--;
    
    2080 2080
           current = current->link;
    


  • reply via email to

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