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

Summary: Save some memory in TTF_Font
Product: SDL_ttf Reporter: Sylvain <sylvain.becker>
Component: miscAssignee: Sam Lantinga <slouken>
Status: RESOLVED INVALID QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: unspecified   
Hardware: x86_64   
OS: Linux   
Attachments: patch
patch

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