diff options
author | Jean Guyomarc'h <jean.guyomarch@openwide.fr> | 2016-06-03 12:08:40 +0200 |
---|---|---|
committer | Jean Guyomarc'h <jean@guyomarch.bzh> | 2016-06-03 12:17:12 +0200 |
commit | 5b0ddfec3816377761a122a2eb862446bb415ba9 (patch) | |
tree | 8081a24af794d15fb24b5de6f9d0a98fa0165ece | |
parent | b612fe2485402407603aafc8c3ec6f1e5db71649 (diff) | |
download | efl-5b0ddfec3816377761a122a2eb862446bb415ba9.tar.gz |
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
-rw-r--r-- | src/lib/evas/canvas/evas_render.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c index 3a8322a980..8b61d8524f 100644 --- a/src/lib/evas/canvas/evas_render.c +++ b/src/lib/evas/canvas/evas_render.c @@ -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); |