Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType
Commits:
-
5962d3c1
by Alexei Podtelezhnikov (Алексей Подтележников) at 2024-04-29T22:34:09-04:00
1 changed file:
Changes:
... | ... | @@ -544,7 +544,6 @@ |
544 | 544 | FTC_FaceID face_id )
|
545 | 545 | {
|
546 | 546 | FTC_Manager manager = cache->manager;
|
547 | - FTC_Node frees = NULL;
|
|
548 | 547 | FT_UFast count = cache->p;
|
549 | 548 | FT_UFast i;
|
550 | 549 | |
... | ... | @@ -557,41 +556,27 @@ |
557 | 556 | for (;;)
|
558 | 557 | {
|
559 | 558 | FTC_Node node = *pnode;
|
560 | - FT_Bool list_changed = FALSE;
|
|
561 | 559 | |
562 | 560 | |
563 | 561 | if ( !node )
|
564 | 562 | break;
|
565 | 563 | |
566 | - if ( cache->clazz.node_remove_faceid( node, face_id,
|
|
567 | - cache, &list_changed ) )
|
|
564 | + if ( cache->clazz.node_remove_faceid( node, face_id, cache, NULL ) )
|
|
568 | 565 | {
|
569 | - *pnode = node->link;
|
|
570 | - node->link = frees;
|
|
571 | - frees = node;
|
|
566 | + *pnode = node->link;
|
|
567 | + |
|
568 | + manager->cur_weight -= cache->clazz.node_weight( node, cache );
|
|
569 | + ftc_node_mru_unlink( node, manager );
|
|
570 | + |
|
571 | + cache->clazz.node_free( node, cache );
|
|
572 | + |
|
573 | + cache->slack++;
|
|
572 | 574 | }
|
573 | 575 | else
|
574 | 576 | pnode = &node->link;
|
575 | 577 | }
|
576 | 578 | }
|
577 | 579 | |
578 | - /* remove all nodes in the free list */
|
|
579 | - while ( frees )
|
|
580 | - {
|
|
581 | - FTC_Node node;
|
|
582 | - |
|
583 | - |
|
584 | - node = frees;
|
|
585 | - frees = node->link;
|
|
586 | - |
|
587 | - manager->cur_weight -= cache->clazz.node_weight( node, cache );
|
|
588 | - ftc_node_mru_unlink( node, manager );
|
|
589 | - |
|
590 | - cache->clazz.node_free( node, cache );
|
|
591 | - |
|
592 | - cache->slack++;
|
|
593 | - }
|
|
594 | - |
|
595 | 580 | ftc_cache_resize( cache );
|
596 | 581 | }
|
597 | 582 |