freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] [raster] Make `band_top' local variable


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][master] [raster] Make `band_top' local variable.
Date: Sat, 26 Jun 2021 12:50:21 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

2 changed files:

Changes:

  • ChangeLog
    1
    +2021-06-25  Alexei Podtelezhnikov  <apodtele@gmail.com>
    
    2
    +
    
    3
    +	[raster] Make `band_top' local variable.
    
    4
    +
    
    5
    +	* src/raster/ftraster.c (black_TWorker): Move `band_top' from here...
    
    6
    +	(Render_Single_Pass): ... to here, and refactor.
    
    7
    +	(Render_Glyph): Updated.
    
    8
    +
    
    1 9
     2021-06-25  Alexei Podtelezhnikov  <apodtele@gmail.com>
    
    2 10
     
    
    3 11
     	[raster] Adjust sub-band bisecting limits.
    

  • src/raster/ftraster.c
    ... ... @@ -529,7 +529,6 @@
    529 529
     
    
    530 530
         black_TBand  band_stack[16];    /* band stack used for sub-banding     */
    
    531 531
                                         /* enough for signed short bands       */
    
    532
    -    Int          band_top;          /* band stack top                      */
    
    533 532
     
    
    534 533
       };
    
    535 534
     
    
    ... ... @@ -3034,12 +3033,13 @@
    3034 3033
       Render_Single_Pass( RAS_ARGS Bool  flipped )
    
    3035 3034
       {
    
    3036 3035
         Short  i, j, k;
    
    3036
    +    Int    band_top = 0;
    
    3037 3037
     
    
    3038 3038
     
    
    3039
    -    while ( ras.band_top >= 0 )
    
    3039
    +    do
    
    3040 3040
         {
    
    3041
    -      ras.maxY = (Long)ras.band_stack[ras.band_top].y_max * ras.precision;
    
    3042
    -      ras.minY = (Long)ras.band_stack[ras.band_top].y_min * ras.precision;
    
    3041
    +      ras.maxY = (Long)ras.band_stack[band_top].y_max * ras.precision;
    
    3042
    +      ras.minY = (Long)ras.band_stack[band_top].y_min * ras.precision;
    
    3043 3043
     
    
    3044 3044
           ras.top = ras.buff;
    
    3045 3045
     
    
    ... ... @@ -3052,33 +3052,29 @@
    3052 3052
     
    
    3053 3053
             /* sub-banding */
    
    3054 3054
     
    
    3055
    -        i = ras.band_stack[ras.band_top].y_min;
    
    3056
    -        j = ras.band_stack[ras.band_top].y_max;
    
    3055
    +        i = ras.band_stack[band_top].y_min;
    
    3056
    +        j = ras.band_stack[band_top].y_max;
    
    3057 3057
     
    
    3058 3058
             if ( i == j )
    
    3059
    -        {
    
    3060
    -          ras.band_top = 0;
    
    3061
    -
    
    3062 3059
               return ras.error;  /* still Raster_Overflow */
    
    3063
    -        }
    
    3064 3060
     
    
    3065 3061
             k = (Short)( ( i + j ) / 2 );
    
    3066 3062
     
    
    3067
    -        ras.band_stack[ras.band_top + 1].y_min = (Short)( k + 1 );
    
    3068
    -        ras.band_stack[ras.band_top + 1].y_max = j;
    
    3063
    +        ras.band_stack[band_top].y_max = k;
    
    3069 3064
     
    
    3070
    -        ras.band_stack[ras.band_top].y_max = k;
    
    3065
    +        ras.band_stack[band_top + 1].y_min = (Short)( k + 1 );
    
    3066
    +        ras.band_stack[band_top + 1].y_max = j;
    
    3071 3067
     
    
    3072
    -        ras.band_top++;
    
    3068
    +        band_top++;
    
    3073 3069
           }
    
    3074 3070
           else
    
    3075 3071
           {
    
    3076 3072
             if ( ras.fProfile )
    
    3077 3073
               if ( Draw_Sweep( RAS_VAR ) )
    
    3078 3074
                  return ras.error;
    
    3079
    -        ras.band_top--;
    
    3075
    +        band_top--;
    
    3080 3076
           }
    
    3081
    -    }
    
    3077
    +    } while ( band_top >= 0 );
    
    3082 3078
     
    
    3083 3079
         return Raster_Err_Ok;
    
    3084 3080
       }
    
    ... ... @@ -3128,7 +3124,6 @@
    3128 3124
         ras.Proc_Sweep_Drop = Vertical_Sweep_Drop;
    
    3129 3125
         ras.Proc_Sweep_Step = Vertical_Sweep_Step;
    
    3130 3126
     
    
    3131
    -    ras.band_top            = 0;
    
    3132 3127
         ras.band_stack[0].y_min = 0;
    
    3133 3128
         ras.band_stack[0].y_max = (Short)( ras.target.rows - 1 );
    
    3134 3129
     
    
    ... ... @@ -3151,7 +3146,6 @@
    3151 3146
           ras.Proc_Sweep_Drop = Horizontal_Sweep_Drop;
    
    3152 3147
           ras.Proc_Sweep_Step = Horizontal_Sweep_Step;
    
    3153 3148
     
    
    3154
    -      ras.band_top            = 0;
    
    3155 3149
           ras.band_stack[0].y_min = 0;
    
    3156 3150
           ras.band_stack[0].y_max = (Short)( ras.target.width - 1 );
    
    3157 3151
     
    


  • reply via email to

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