Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType
Commits:
-
deee5b70
by Alexei Podtelezhnikov at 2021-04-26T17:07:44-04:00
-
b0a28197
by Alexei Podtelezhnikov at 2021-04-26T17:10:28-04:00
-
618d0834
by Alexei Podtelezhnikov at 2021-04-26T17:14:28-04:00
6 changed files:
- ChangeLog
- src/pfr/pfrload.c
- src/pfr/pfrobjs.c
- src/psaux/psstack.c
- src/psnames/psmodule.c
- src/winfonts/winfnt.c
Changes:
1 |
+2021-04-26 Alexei Podtelezhnikov <apodtele@gmail.com>
|
|
2 |
+ |
|
3 |
+ [pfr] Avoid some memory zeroing.
|
|
4 |
+ |
|
5 |
+ * src/pfr/pfrobjs.c (pfr_face_init) : Tweak memory macro.
|
|
6 |
+ * src/pfr/pfrload.c (pfr_extra_item_load_stem_snaps,
|
|
7 |
+ pfr_phy_font_load): Ditto.
|
|
8 |
+ |
|
9 |
+2021-04-26 Alexei Podtelezhnikov <apodtele@gmail.com>
|
|
10 |
+ |
|
11 |
+ * src/winfonts/winfnt.c (FNT_Face_Init): Tweak memory macro.
|
|
12 |
+ |
|
13 |
+2021-04-26 Alexei Podtelezhnikov <apodtele@gmail.com>
|
|
14 |
+ |
|
15 |
+ [psaux,psnames] Avoid some memory zeroing.
|
|
16 |
+ |
|
17 |
+ * src/psaux/psstack.c (cf2_stack_init): Tweak memory macro.
|
|
18 |
+ * src/psnames/psmodule.c (ps_unicodes_init): Ditto.
|
|
19 |
+ |
|
1 | 20 |
2021-04-25 Alexei Podtelezhnikov <apodtele@gmail.com>
|
2 | 21 |
|
3 | 22 |
[base] Avoid some memory zeroing.
|
... | ... | @@ -601,7 +601,7 @@ |
601 | 601 |
|
602 | 602 |
PFR_CHECK( count * 2 );
|
603 | 603 |
|
604 |
- if ( FT_NEW_ARRAY( snaps, count ) )
|
|
604 |
+ if ( FT_QNEW_ARRAY( snaps, count ) )
|
|
605 | 605 |
goto Exit;
|
606 | 606 |
|
607 | 607 |
phy_font->vertical.stem_snaps = snaps;
|
... | ... | @@ -953,7 +953,7 @@ |
953 | 953 |
|
954 | 954 |
PFR_CHECK( count * 2 );
|
955 | 955 |
|
956 |
- if ( FT_NEW_ARRAY( phy_font->blue_values, count ) )
|
|
956 |
+ if ( FT_QNEW_ARRAY( phy_font->blue_values, count ) )
|
|
957 | 957 |
goto Fail;
|
958 | 958 |
|
959 | 959 |
for ( n = 0; n < count; n++ )
|
... | ... | @@ -213,7 +213,7 @@ |
213 | 213 |
FT_Memory memory = pfrface->stream->memory;
|
214 | 214 |
|
215 | 215 |
|
216 |
- if ( FT_NEW_ARRAY( pfrface->available_sizes, count ) )
|
|
216 |
+ if ( FT_QNEW_ARRAY( pfrface->available_sizes, count ) )
|
|
217 | 217 |
goto Exit;
|
218 | 218 |
|
219 | 219 |
size = pfrface->available_sizes;
|
... | ... | @@ -67,7 +67,7 @@ |
67 | 67 |
stack->error = e;
|
68 | 68 |
|
69 | 69 |
/* allocate the stack buffer */
|
70 |
- if ( FT_NEW_ARRAY( stack->buffer, stackSize ) )
|
|
70 |
+ if ( FT_QNEW_ARRAY( stack->buffer, stackSize ) )
|
|
71 | 71 |
{
|
72 | 72 |
FT_FREE( stack );
|
73 | 73 |
return NULL;
|
... | ... | @@ -328,7 +328,7 @@ |
328 | 328 |
table->num_maps = 0;
|
329 | 329 |
table->maps = NULL;
|
330 | 330 |
|
331 |
- if ( !FT_NEW_ARRAY( table->maps, num_glyphs + EXTRA_GLYPH_LIST_SIZE ) )
|
|
331 |
+ if ( !FT_QNEW_ARRAY( table->maps, num_glyphs + EXTRA_GLYPH_LIST_SIZE ) )
|
|
332 | 332 |
{
|
333 | 333 |
FT_UInt n;
|
334 | 334 |
FT_UInt count;
|
... | ... | @@ -391,9 +391,9 @@ |
391 | 391 |
/* Reallocate if the number of used entries is much smaller. */
|
392 | 392 |
if ( count < num_glyphs / 2 )
|
393 | 393 |
{
|
394 |
- (void)FT_RENEW_ARRAY( table->maps,
|
|
395 |
- num_glyphs + EXTRA_GLYPH_LIST_SIZE,
|
|
396 |
- count );
|
|
394 |
+ (void)FT_QRENEW_ARRAY( table->maps,
|
|
395 |
+ num_glyphs + EXTRA_GLYPH_LIST_SIZE,
|
|
396 |
+ count );
|
|
397 | 397 |
error = FT_Err_Ok;
|
398 | 398 |
}
|
399 | 399 |
|
... | ... | @@ -793,7 +793,7 @@ |
793 | 793 |
root->style_flags |= FT_STYLE_FLAG_BOLD;
|
794 | 794 |
|
795 | 795 |
/* set up the `fixed_sizes' array */
|
796 |
- if ( FT_NEW_ARRAY( root->available_sizes, 1 ) )
|
|
796 |
+ if ( FT_QNEW( root->available_sizes ) )
|
|
797 | 797 |
goto Fail;
|
798 | 798 |
|
799 | 799 |
root->num_fixed_sizes = 1;
|