From: Youngbok Shin Date: Tue, 6 Oct 2020 06:28:33 +0000 (+0900) Subject: evas/font: fix a memory leak caused by legacy code with wrong migration X-Git-Tag: submit/tizen/20201012.232328~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F60%2F245260%2F1;p=platform%2Fupstream%2Fefl.git evas/font: fix a memory leak caused by legacy code with wrong migration @tizen_fix Change-Id: I51d570ddc8e3a545547c00b73ffb86f1ef1f7451 --- diff --git a/src/lib/evas/common/evas_font_main.c b/src/lib/evas/common/evas_font_main.c index 4583ecc..bafb7fb 100644 --- a/src/lib/evas/common/evas_font_main.c +++ b/src/lib/evas/common/evas_font_main.c @@ -899,24 +899,6 @@ evas_common_font_int_cache_glyph_get(RGBA_Font_Int *fi, FT_UInt idx) * END * *******/ - FTLOCK(); - error = FT_Get_Glyph(fi->src->ft.face->glyph, &(fg->glyph)); - FTUNLOCK(); - if (error) - { - /****************************************************************** - * TIZEN_ONLY(20180402): evas font: add/apply font glyph lru list * - ******************************************************************/ - ERR("Failed to get a glyph using FT_Get_Glyph for idx[%d]. fg_from_fash[%d]", idx, fg_from_fash); - /******* - * END * - *******/ - free(fg); - if (!fi->fash) fi->fash = _fash_gl_new(); - if (fi->fash) _fash_gl_add(fi->fash, idx, (void *)(-1)); - return NULL; - } - if (FT_HAS_COLOR(fi->src->ft.face)) { fg->advance.x = fi->src->ft.face->glyph->advance.x * 1024; @@ -927,27 +909,10 @@ evas_common_font_int_cache_glyph_get(RGBA_Font_Int *fi, FT_UInt idx) fg->x_bear = EVAS_FONT_ROUND_26_6_TO_INT(slot->metrics.horiBearingX); fg->y_bear = EVAS_FONT_ROUND_26_6_TO_INT(slot->metrics.horiBearingY); - /****************************************************************** - * TIZEN_ONLY(20180402): evas font: add/apply font glyph lru list * - ******************************************************************/ - fg->advance = fg->glyph->advance; - /******* - * END * - *******/ - if (FT_HAS_FIXED_SIZES(fi->src->ft.face)) { if (fi->bitmap_scalable & EFL_TEXT_FONT_BITMAP_SCALABLE_COLOR) { - /****************************************************************** - * TIZEN_ONLY(20180402): evas font: add/apply font glyph lru list * - ****************************************************************** - */ - fg->glyph->advance.x *= fi->scale_factor; - fg->glyph->advance.y *= fi->scale_factor; - /******* - * END * - *******/ fg->advance.x *= fi->scale_factor; fg->advance.y *= fi->scale_factor; fg->width *= fi->scale_factor;