From bfbf89e55098615cd800ee353a9bcded5b25e8b7 Mon Sep 17 00:00:00 2001 From: antognolli Date: Mon, 25 Jun 2012 20:19:28 +0000 Subject: [PATCH] evas/cserve2: Don't take "used glyphs" messages into account. When considering glyphs loading saved time, just use the load glyphs requests. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@72831 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/bin/evas_cserve2_cache.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/bin/evas_cserve2_cache.c b/src/bin/evas_cserve2_cache.c index 579a6ab..cf4a310 100644 --- a/src/bin/evas_cserve2_cache.c +++ b/src/bin/evas_cserve2_cache.c @@ -1376,7 +1376,7 @@ static Font_Request_Funcs _font_load_funcs = { }; static Eina_Bool -_glyphs_request_check(Glyphs_Request *req) +_glyphs_request_check(Glyphs_Request *req, Eina_Bool report_load) { unsigned int i; Font_Entry *fe = req->fe; @@ -1393,8 +1393,9 @@ _glyphs_request_check(Glyphs_Request *req) 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); + if (report_load) + fe->gl_saved_time += + (fe->gl_load_time / fe->nglyphs); #endif ge->fc->inuse++; } @@ -2508,7 +2509,7 @@ cserve2_cache_font_glyphs_load(Client *client, const char *source, unsigned int return -1; } - if (_glyphs_request_check(req)) + if (_glyphs_request_check(req, EINA_TRUE)) { INF("Glyphs already loaded. Sending answer."); _glyphs_loaded_send(req, rid); @@ -2538,7 +2539,7 @@ cserve2_cache_font_glyphs_used(Client *client, const char *source, unsigned int return 0; } - _glyphs_request_check(req); + _glyphs_request_check(req, EINA_FALSE); groups = _glyphs_group_create(req); // Promote SHMs which are still cached and in use -- 2.7.4