mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
font: glpyh_cache_load() is now NO_INLINE
It is particularly stack-heavy (>1.25K, >2.25K with 32-bit unicode) Its only caller was font_load_ex() but that can be called recursively which _really_ blew up the stack. Change-Id: I211cd33ca3478b2bd01d3ddcf6c890399af2fb9c
This commit is contained in:
parent
16c9ef64b0
commit
4de25f7020
1 changed files with 3 additions and 2 deletions
|
@ -161,7 +161,7 @@ static inline unsigned char *buffer_from_handle(int handle)
|
|||
|
||||
/* Font cache structures */
|
||||
static void cache_create(struct font* pf);
|
||||
static void glyph_cache_load(const char *font_path, struct font *pf);
|
||||
static NO_INLINE void glyph_cache_load(const char *font_path, struct font *pf);
|
||||
/* End Font cache structures */
|
||||
|
||||
void font_init(void)
|
||||
|
@ -948,7 +948,8 @@ static int ushortcmp(const void *a, const void *b)
|
|||
{
|
||||
return ((int)(*(unsigned short*)a - *(unsigned short*)b));
|
||||
}
|
||||
static void glyph_cache_load(const char *font_path, struct font *pf)
|
||||
|
||||
static NO_INLINE void glyph_cache_load(const char *font_path, struct font *pf)
|
||||
{
|
||||
#define MAX_SORT 256
|
||||
if (pf->fd >= 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue