Evas filters: Fix massive memleak with async sw render

Oooops, the flag stolen meant that we don't hold any reference on
this buffer anymore, which meant we should not increase the refcount
here!

@fix
This commit is contained in:
Jean-Philippe Andre 2015-08-18 15:11:23 +09:00
parent ea001c3ec1
commit 8e9ab6440f
1 changed files with 2 additions and 4 deletions

View File

@ -503,7 +503,7 @@ _filter_buffer_data_set(Evas_Filter_Context *ctx, int bufid, void *data,
fb->h = h;
fb->backing = _rgba_image_alloc(fb, data);
fb->allocated = (!data && (fb->backing != NULL));
fb->allocated = (fb->backing != NULL);
return fb->allocated;
}
@ -606,14 +606,12 @@ evas_filter_buffer_backing_steal(Evas_Filter_Context *ctx, int bufid)
buffer = _filter_buffer_get(ctx, bufid);
if (!buffer) return NULL;
// we don't hold any reference on this buffer anymore
buffer->stolen = EINA_TRUE;
if (ctx->gl_engine)
return buffer->glimage;
if (ctx->async && buffer->backing)
buffer->backing->cache_entry.references++;
return buffer->backing;
}