evas_image : fix unloads cleanup logic

Summary:
Now Evas gl preload feature is disabled.
But if it is turned on, memory crash occurs.
Because evas_gl_common_texture_upload is not excuted immediately.

Test Plan: EVAS_GL_PRELOAD=1 ELM_ENGINE=gl elementary_test -to "photocam"

Reviewers: raster, cedric, woohyun, seoz, Hermet, singh.amitesh, jpeg

Subscribers: jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D2823

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
This commit is contained in:
Hosang Kim 2015-07-16 20:07:39 +09:00 committed by Jean-Philippe Andre
parent c73d140365
commit 51b097c014
1 changed files with 8 additions and 3 deletions

View File

@ -392,11 +392,16 @@ EAPI void
evas_common_rgba_pending_unloads_cleanup(void)
{
Image_Entry *ie;
Eina_List *l;
Eina_List *l_next;
EINA_LIST_FREE(pending_unloads, ie)
EINA_LIST_FOREACH_SAFE(pending_unloads, l, l_next, ie)
{
if ((ie->need_unload) && (!ie->preload))
evas_common_rgba_image_unload_real(ie);
if ((ie->need_unload) && (!ie->preload) && (!ie->flags.preload_done))
{
evas_common_rgba_image_unload_real(ie);
pending_unloads = eina_list_remove_list(pending_unloads, l);
}
}
}