freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] [type1] Avoid MM memory zeroing.


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][master] [type1] Avoid MM memory zeroing.
Date: Fri, 07 May 2021 23:18:40 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

3 changed files:

Changes:

  • ChangeLog
    1
    +2021-05-07  Alexei Podtelezhnikov  <apodtele@gmail.com>
    
    2
    +
    
    3
    +	[type1] Avoid MM memory zeroing.
    
    4
    +
    
    5
    +	* src/type1/t1load.c (t1_allocate_blend, parse_blend_design_map):
    
    6
    +	Tweak allocation macros.
    
    7
    +	* src/type1/t1objs.c (T1_Face_Done): Minor.
    
    8
    +
    
    1 9
     2021-05-07  Alexei Podtelezhnikov  <apodtele@gmail.com>
    
    2 10
     
    
    3 11
     	* src/bdf/bdflib.c (_bdf_list_ensure): Tweak allocation macro.
    

  • src/type1/t1load.c
    ... ... @@ -130,10 +130,10 @@
    130 130
     
    
    131 131
     
    
    132 132
             /* allocate the blend `private' and `font_info' dictionaries */
    
    133
    -        if ( FT_NEW_ARRAY( blend->font_infos[1], num_designs     ) ||
    
    134
    -             FT_NEW_ARRAY( blend->privates  [1], num_designs     ) ||
    
    135
    -             FT_NEW_ARRAY( blend->bboxes    [1], num_designs     ) ||
    
    136
    -             FT_NEW_ARRAY( blend->weight_vector, num_designs * 2 ) )
    
    133
    +        if ( FT_QNEW_ARRAY( blend->font_infos[1], num_designs     ) ||
    
    134
    +             FT_QNEW_ARRAY( blend->privates  [1], num_designs     ) ||
    
    135
    +             FT_QNEW_ARRAY( blend->bboxes    [1], num_designs     ) ||
    
    136
    +             FT_QNEW_ARRAY( blend->weight_vector, num_designs * 2 ) )
    
    137 137
               goto Exit;
    
    138 138
     
    
    139 139
             blend->default_weight_vector = blend->weight_vector + num_designs;
    
    ... ... @@ -167,12 +167,12 @@
    167 167
         /* allocate the blend design pos table if needed */
    
    168 168
         num_designs = blend->num_designs;
    
    169 169
         num_axis    = blend->num_axis;
    
    170
    -    if ( num_designs && num_axis && blend->design_pos[0] == 0 )
    
    170
    +    if ( num_designs && num_axis && blend->design_pos[0] == NULL )
    
    171 171
         {
    
    172 172
           FT_UInt  n;
    
    173 173
     
    
    174 174
     
    
    175
    -      if ( FT_NEW_ARRAY( blend->design_pos[0], num_designs * num_axis ) )
    
    175
    +      if ( FT_QNEW_ARRAY( blend->design_pos[0], num_designs * num_axis ) )
    
    176 176
             goto Exit;
    
    177 177
     
    
    178 178
           for ( n = 1; n < num_designs; n++ )
    
    ... ... @@ -1044,7 +1044,7 @@
    1044 1044
           }
    
    1045 1045
     
    
    1046 1046
           /* allocate design map data */
    
    1047
    -      if ( FT_NEW_ARRAY( map->design_points, num_points * 2 ) )
    
    1047
    +      if ( FT_QNEW_ARRAY( map->design_points, num_points * 2 ) )
    
    1048 1048
             goto Exit;
    
    1049 1049
           map->blend_points = map->design_points + num_points;
    
    1050 1050
           map->num_points   = (FT_Byte)num_points;
    

  • src/type1/t1objs.c
    ... ... @@ -217,7 +217,6 @@
    217 217
         {
    
    218 218
           FT_FREE( face->buildchar );
    
    219 219
     
    
    220
    -      face->buildchar     = NULL;
    
    221 220
           face->len_buildchar = 0;
    
    222 221
         }
    
    223 222
     
    


  • reply via email to

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