Evas filters: Fix crash when using the GL backend

Buffer management was broken, and we tried to free the GL texture
as if it were a simple RGBA_Image.
This commit is contained in:
Jean-Philippe Andre 2014-02-07 16:06:46 +09:00
parent 637416d62e
commit 9917962ffb
2 changed files with 20 additions and 5 deletions

View File

@ -436,9 +436,11 @@ evas_filter_context_buffers_allocate_all(Evas_Filter_Context *ctx,
ie = fb->backing;
if (ie)
{
// Not checking for async. It's also safe for sync rendering.
ie->references++;
evas_unref_queue_image_put(ctx->evas, ie);
if (ctx->async)
{
ie->references++;
evas_unref_queue_image_put(ctx->evas, ie);
}
continue;
}
@ -648,10 +650,22 @@ evas_filter_buffer_backing_release(Evas_Filter_Context *ctx, void *stolen_buffer
}
return EINA_TRUE;
}
else if (fb->glimage == stolen_buffer)
{
fb->stolen = EINA_FALSE;
if (fb->delete_me)
{
ENFN->image_free(ENDT, stolen_buffer);
free(fb);
}
return EINA_TRUE;
}
}
if (ctx->async)
evas_unref_queue_image_put(ctx->evas, ie);
else if (ctx->gl_engine)
ENFN->image_free(ENDT, stolen_buffer);
else
_backing_free(ctx, ie);

View File

@ -34,9 +34,10 @@ evas_filter_buffer_scaled_get(Evas_Filter_Context *ctx,
return NULL;
}
// FIXME: Not supported on GL engine. HAHAHAHAHA
// FIXME: Not supported on GL engine.
// Yeah, we need to call the CPU scaling functions and not the engine.
if (ctx->gl_engine)
CRI("Support not implemened yet. lol yeah");
CRI("Support for stretching not implemened yet for GL.");
if (!src->alpha_only)
{