Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType Demo Programs
Commits:
-
b3ab39d7
by Alexei Podtelezhnikov at 2023-05-12T16:26:01+00:00
1 changed file:
Changes:
... | ... | @@ -1359,13 +1359,14 @@ |
1359 | 1359 | }
|
1360 | 1360 | }
|
1361 | 1361 | |
1362 | - FTC_Manager_New( lib,
|
|
1363 | - 0,
|
|
1364 | - 0,
|
|
1365 | - max_bytes,
|
|
1366 | - face_requester,
|
|
1367 | - NULL,
|
|
1368 | - &cache_man );
|
|
1362 | + if ( FTC_Manager_New( lib,
|
|
1363 | + 0,
|
|
1364 | + 0,
|
|
1365 | + max_bytes,
|
|
1366 | + face_requester,
|
|
1367 | + NULL,
|
|
1368 | + &cache_man ) )
|
|
1369 | + compare_cached = 0;
|
|
1369 | 1370 | |
1370 | 1371 | font_type.face_id = (FTC_FaceID)1;
|
1371 | 1372 | font_type.width = size;
|
... | ... | @@ -1550,25 +1551,11 @@ |
1550 | 1551 | }
|
1551 | 1552 | }
|
1552 | 1553 | |
1553 | - Exit:
|
|
1554 | - /* The following is a bit subtle: When we call FTC_Manager_Done, this
|
|
1555 | - * normally destroys all FT_Face objects that the cache might have
|
|
1556 | - * created by calling the face requester.
|
|
1557 | - *
|
|
1558 | - * However, this little benchmark uses a tricky face requester that
|
|
1559 | - * doesn't create a new FT_Face through FT_New_Face but simply passes a
|
|
1560 | - * pointer to the one that was previously created.
|
|
1561 | - *
|
|
1562 | - * If the cache manager has been used before, the call to
|
|
1563 | - * FTC_Manager_Done discards our single FT_Face.
|
|
1564 | - *
|
|
1565 | - * In the case where no cache manager is in place, or if no test was
|
|
1566 | - * run, the call to FT_Done_FreeType releases any remaining FT_Face
|
|
1567 | - * object anyway.
|
|
1568 | - */
|
|
1569 | 1554 | if ( cache_man )
|
1570 | 1555 | FTC_Manager_Done( cache_man );
|
1571 | 1556 | |
1557 | + Exit:
|
|
1558 | + /* releases any remaining FT_Face object too */
|
|
1572 | 1559 | FT_Done_FreeType( lib );
|
1573 | 1560 | |
1574 | 1561 | return 0;
|