forked from enlightenment/efl
evas - gl - stop leaking images and never freeing them from cache
the subject says it all @fix
This commit is contained in:
parent
3666574f88
commit
796e345da1
|
@ -69,10 +69,17 @@ _evas_gl_image_cache_add(Evas_GL_Image *im)
|
|||
{
|
||||
if (im->references == 0)
|
||||
{
|
||||
im->csize = im->w * im->h * 4;
|
||||
im->gc->shared->images_size += im->csize;
|
||||
_evas_gl_image_cache_trim(im->gc);
|
||||
return EINA_TRUE;
|
||||
if (im->cached)
|
||||
{
|
||||
im->csize = im->w * im->h * 4;
|
||||
im->gc->shared->images_size += im->csize;
|
||||
_evas_gl_image_cache_trim(im->gc);
|
||||
if (!eina_list_data_find(im->gc->shared->images, im))
|
||||
{ // FIXME for a messed up caching system... this used to be simple
|
||||
im->gc->shared->images = eina_list_prepend(im->gc->shared->images, im);
|
||||
}
|
||||
return EINA_TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue