diff options
author | Hosang Kim <hosang12.kim@samsung.com> | 2015-07-16 20:07:39 +0900 |
---|---|---|
committer | Jean-Philippe Andre <jp.andre@samsung.com> | 2015-07-16 20:15:12 +0900 |
commit | 51b097c014c77c36f708d3371a42e2045e003ba2 (patch) | |
tree | 4e0d3871529c62337c306f727c3ee09494de1946 | |
parent | c73d14036506076a32fe2e842eb4e60d01203258 (diff) |
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>
-rw-r--r-- | src/lib/evas/common/evas_image_main.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/evas/common/evas_image_main.c b/src/lib/evas/common/evas_image_main.c index 10966fd..ce07dab 100644 --- a/src/lib/evas/common/evas_image_main.c +++ b/src/lib/evas/common/evas_image_main.c | |||
@@ -392,11 +392,16 @@ EAPI void | |||
392 | evas_common_rgba_pending_unloads_cleanup(void) | 392 | evas_common_rgba_pending_unloads_cleanup(void) |
393 | { | 393 | { |
394 | Image_Entry *ie; | 394 | Image_Entry *ie; |
395 | Eina_List *l; | ||
396 | Eina_List *l_next; | ||
395 | 397 | ||
396 | EINA_LIST_FREE(pending_unloads, ie) | 398 | EINA_LIST_FOREACH_SAFE(pending_unloads, l, l_next, ie) |
397 | { | 399 | { |
398 | if ((ie->need_unload) && (!ie->preload)) | 400 | if ((ie->need_unload) && (!ie->preload) && (!ie->flags.preload_done)) |
399 | evas_common_rgba_image_unload_real(ie); | 401 | { |
402 | evas_common_rgba_image_unload_real(ie); | ||
403 | pending_unloads = eina_list_remove_list(pending_unloads, l); | ||
404 | } | ||
400 | } | 405 | } |
401 | } | 406 | } |
402 | 407 | ||