forked from enlightenment/efl
evas: fix huge memory leak for non-async rendering
So... I had issues with evas-fb engine which was massively leaking, one image per frame. After investigating a bit with @cedric on IRC, the reference count of the cache entries was always 2 before the engine dropped. So, for each frame with an animation, we could never drop a cache entry, leading to a trumendous amount of memory leaking. Now for non-async rendering, we copy the behaviour of evas_render_pipe_wakeup() which is called in async-mode, and actually drops a reference in the cache entry. Fixes T3763
This commit is contained in:
parent
b612fe2485
commit
5b0ddfec38
|
@ -2949,6 +2949,8 @@ evas_render_updates_internal(Evas *eo_e,
|
|||
EINA_LIST_FOREACH(e->render.updates, l, ru)
|
||||
{
|
||||
post.updated_area = eina_list_append(post.updated_area, ru->area);
|
||||
evas_cache_image_drop(ru->surface);
|
||||
ru->surface = NULL;
|
||||
}
|
||||
eina_spinlock_take(&(e->render.lock));
|
||||
_cb_always_call(eo_e, EVAS_CALLBACK_RENDER_POST, post.updated_area ? &post : NULL);
|
||||
|
|
Loading…
Reference in New Issue