{
if (!ctx->async)
ENFN->image_free(ENDT, im);
+ else
+ evas_unref_queue_image_put(ctx->evas, &im->cache_entry);
}
else
{
{
RGBA_Image *im;
im = fb->backing;
- if (im)
- {
- if (ctx->async)
- {
- im->cache_entry.references++;
- evas_unref_queue_image_put(ctx->evas, &im->cache_entry);
- }
- continue;
- }
-
- if (fb->source)
- continue;
-
- if (fb->glimage)
+ if (im || fb->source || fb->glimage)
continue;
if (!fb->w && !fb->h)
fb->backing = im;
fb->allocated = (im != NULL);
- if (ctx->async && fb->allocated)
- evas_unref_queue_image_put(ctx->evas, &im->cache_entry);
}
return EINA_TRUE;
fb->backing = _rgba_image_alloc(fb, data);
fb->allocated = (!data && (fb->backing != NULL));
- if (ctx->async && fb->allocated)
- evas_unref_queue_image_put(ctx->evas, fb->backing);
return fb->allocated;
}
EINA_LIST_FOREACH(ctx->buffers, li, fb)
{
- if (fb->backing == stolen_buffer)
- {
- fb->stolen = EINA_FALSE;
- if (fb->delete_me)
- {
- ctx->buffers = eina_list_remove_list(ctx->buffers, li);
- if (ctx->async)
- {
- if (fb->allocated)
- evas_unref_queue_image_put(ctx->evas, stolen_buffer);
- free(fb);
- }
- else
- _buffer_free(fb);
- return EINA_TRUE;
- }
- return EINA_TRUE;
- }
- else if (fb->glimage == stolen_buffer)
+ if ((fb->backing == stolen_buffer) || (fb->glimage == stolen_buffer))
{
fb->stolen = EINA_FALSE;
if (fb->delete_me)
{
ctx->buffers = eina_list_remove_list(ctx->buffers, li);
_buffer_free(fb);
+ return EINA_TRUE;
}
return EINA_TRUE;
}