evas/cserve2: Don't take "used glyphs" messages into

account.
When considering glyphs loading saved time, just use the load glyphs
requests.



SVN revision: 72831
This commit is contained in:
Rafael Antognolli 2012-06-25 20:19:28 +00:00
parent a6a92632b0
commit da8b023295
1 changed files with 6 additions and 5 deletions

View File

@ -1376,7 +1376,7 @@ static Font_Request_Funcs _font_load_funcs = {
}; };
static Eina_Bool static Eina_Bool
_glyphs_request_check(Glyphs_Request *req) _glyphs_request_check(Glyphs_Request *req, Eina_Bool report_load)
{ {
unsigned int i; unsigned int i;
Font_Entry *fe = req->fe; Font_Entry *fe = req->fe;
@ -1393,8 +1393,9 @@ _glyphs_request_check(Glyphs_Request *req)
req->answer[req->nanswer++] = ge; req->answer[req->nanswer++] = ge;
#ifdef DEBUG_LOAD_TIME #ifdef DEBUG_LOAD_TIME
// calculate average time saved when loading glyphs // calculate average time saved when loading glyphs
fe->gl_saved_time += if (report_load)
(fe->gl_load_time / fe->nglyphs); fe->gl_saved_time +=
(fe->gl_load_time / fe->nglyphs);
#endif #endif
ge->fc->inuse++; ge->fc->inuse++;
} }
@ -2508,7 +2509,7 @@ cserve2_cache_font_glyphs_load(Client *client, const char *source, unsigned int
return -1; return -1;
} }
if (_glyphs_request_check(req)) if (_glyphs_request_check(req, EINA_TRUE))
{ {
INF("Glyphs already loaded. Sending answer."); INF("Glyphs already loaded. Sending answer.");
_glyphs_loaded_send(req, rid); _glyphs_loaded_send(req, rid);
@ -2538,7 +2539,7 @@ cserve2_cache_font_glyphs_used(Client *client, const char *source, unsigned int
return 0; return 0;
} }
_glyphs_request_check(req); _glyphs_request_check(req, EINA_FALSE);
groups = _glyphs_group_create(req); groups = _glyphs_group_create(req);
// Promote SHMs which are still cached and in use // Promote SHMs which are still cached and in use