Font_Source *src;
void *ft;
Fash_Glyph2 *glyphs;
+ unsigned int nglyphs;
Eina_Inlist *caches;
Font_Cache *last_cache;
Eina_Bool unused : 1;
struct timeval load_start;
struct timeval load_finish;
int gl_load_time;
+ int gl_saved_time;
#endif
};
if (ge)
{
req->answer[req->nanswer++] = ge;
+#ifdef DEBUG_LOAD_TIME
+ // calculate average time saved when loading glyphs
+ fe->gl_saved_time +=
+ (fe->gl_load_time / fe->nglyphs);
+#endif
ge->fc->inuse++;
}
else
if (ge)
{
req->answer[req->nanswer++] = ge;
+
+#ifdef DEBUG_LOAD_TIME
+ // calculate average time saved when loading glyphs
+ fe->gl_saved_time +=
+ (fe->gl_load_time / fe->nglyphs);
+#endif
ge->fc->inuse++;
}
else
font_mem_usage += sizeof(*gl);
fc->glyphs = eina_inlist_append(fc->glyphs, EINA_INLIST_GET(gl));
fc->nglyphs++;
+ fe->nglyphs++;
fash_gl_add(fe->glyphs, gl->index, gl);
req->answer[req->nanswer++] = gl;
gl->fc->inuse++;
// accounting glyphs load time
msg->fonts.glyphs_load_time += fe->gl_load_time;
+ msg->fonts.glyphs_saved_time += fe->gl_saved_time;
#endif
return EINA_TRUE;
printf("Fonts used load time: %dus\n", msg->fonts.fonts_used_load_time);
printf("Fonts used saved time: %dus\n", msg->fonts.fonts_used_saved_time);
printf("Glyphs load time: %dus\n", msg->fonts.glyphs_load_time);
+ printf("Glyphs saved time: %dus\n", msg->fonts.glyphs_saved_time);
printf("\n");
}
* rendered */
int fonts_used_saved_time;
int glyphs_load_time; /* total time spent loading glyphs */
+ int glyphs_saved_time; /* total time spent loading glyphs */
} fonts;
struct {
unsigned int files_loaded; /* number of file headers loaded */