We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4387 - Save some memory in TTF_Font
Summary: Save some memory in TTF_Font
Status: RESOLVED INVALID
Alias: None
Product: SDL_ttf
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-15 17:16 UTC by Sylvain
Modified: 2018-12-18 08:46 UTC (History)
0 users

See Also:


Attachments
patch (2.12 KB, patch)
2018-11-15 17:19 UTC, Sylvain
Details | Diff
patch (3.05 KB, patch)
2018-11-15 20:13 UTC, Sylvain
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sylvain 2018-11-15 17:16:50 UTC
I have this little patch which saves 8224 bytes of unused memory!
Comment 1 Sylvain 2018-11-15 17:19:19 UTC
Created attachment 3496 [details]
patch

Because we cache the whole FT_Bitmap structure but not all datas are needed.
(and also FT_Bitmap structure is not packed)
Comment 2 Sylvain 2018-11-15 20:13:41 UTC
Created attachment 3497 [details]
patch

Update the patch.

Small change: turn rows/width into "int". It reverts previously added "unsigned rows/width" for fixing warnings.
Comment 3 Sylvain 2018-12-18 08:46:39 UTC
Discarded, will be part of #4361