Evas filters: Fallback to normal rendering in case of error

If the filters fail to render at runtime (that is, parsing went fine
but a command failed to run properly), fallback to normal rendering.
This should prevent text from disappearing when using proxies and
the OpenGL engine (for now).
This commit is contained in:
Jean-Philippe Andre 2014-03-03 16:58:18 +09:00
parent c783b8d450
commit e05885e0e3
2 changed files with 14 additions and 5 deletions

View File

@ -2130,7 +2130,7 @@ evas_object_text_render(Evas_Object *eo_obj EINA_UNUSED,
* remotely similar to its final form. You've been warned :)
*/
if (o->cur.filter.chain || (o->cur.filter.code && !o->cur.filter.invalid))
if (!o->cur.filter.invalid && (o->cur.filter.chain || o->cur.filter.invalid))
{
int X, Y, W, H;
Evas_Filter_Context *filter;
@ -2245,11 +2245,20 @@ evas_object_text_render(Evas_Object *eo_obj EINA_UNUSED,
// Add post-run callback and run filter
evas_filter_context_autodestroy(filter);
evas_filter_run(filter);
ok = evas_filter_run(filter);
o->cur.filter.changed = EINA_FALSE;
DBG("Effect rendering done.");
return;
if (ok)
{
DBG("Effect rendering done.");
return;
}
else
{
ERR("Rendering failed");
o->cur.filter.invalid = EINA_TRUE;
goto normal_render;
}
}
/* End of the EXPERIMENTAL code */

View File

@ -1687,7 +1687,7 @@ static Eina_Bool
_filter_chain_run(Evas_Filter_Context *ctx)
{
Evas_Filter_Command *cmd;
Eina_Bool ok = EINA_TRUE;
Eina_Bool ok = EINA_FALSE;
ctx->running = EINA_TRUE;
EINA_INLIST_FOREACH(ctx->commands, cmd)