summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2021-03-20 21:58:25 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2021-03-20 21:58:25 +0000
commit796e345da1fd8e27c6ada3dd81cacb5f9b4f4aa9 (patch)
tree16e331c24b3c304e84517ae809a50dc3a318859d /src
parent3666574f881a9801fe5af675de0e3bb3cb8afc54 (diff)
evas - gl - stop leaking images and never freeing them from cache
the subject says it all @fix
Diffstat (limited to 'src')
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_image.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/modules/evas/engines/gl_common/evas_gl_image.c b/src/modules/evas/engines/gl_common/evas_gl_image.c
index 7d05cab15d..3a75852ed0 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_image.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_image.c
@@ -69,10 +69,17 @@ _evas_gl_image_cache_add(Evas_GL_Image *im)
69{ 69{
70 if (im->references == 0) 70 if (im->references == 0)
71 { 71 {
72 im->csize = im->w * im->h * 4; 72 if (im->cached)
73 im->gc->shared->images_size += im->csize; 73 {
74 _evas_gl_image_cache_trim(im->gc); 74 im->csize = im->w * im->h * 4;
75 return EINA_TRUE; 75 im->gc->shared->images_size += im->csize;
76 _evas_gl_image_cache_trim(im->gc);
77 if (!eina_list_data_find(im->gc->shared->images, im))
78 { // FIXME for a messed up caching system... this used to be simple
79 im->gc->shared->images = eina_list_prepend(im->gc->shared->images, im);
80 }
81 return EINA_TRUE;
82 }
76 } 83 }
77 else 84 else
78 { 85 {