forked from enlightenment/efl
canvas render: stop render_pre/post cb if it didn't render.
Summary:
Basically, render_pre/post should be called only if rendering happens.
Unfortunately, this behavior had been broken by some mistakes.
As far as I understand after reading history carefully,
this issue introduced for fixing unpair of pre/post cbs.
In case of async render, the post callback would be triggered in
evas_render_pipe_wakeup(), it means POST callbake shouldn't be tiggered in
evas_render_updates_internal(). If that post callback were removed in
evas_render_updates_internal(), then in case of sync_render,
POST callback won't be triggered. So previously, the PRE/POST couldn't get
paired.
I guess cedric put a mistake that nothing2rendering which brought
the pre/post pair issue, even he said that patch fix the unpair of them.
(But actually that patch brought the issue!)
See this: dc841ed9b2
Whatever it was intented or not, that patch totally insane, even
non-descripting.
If we just trigger post cb only if sync render or no_rendered case,
We could make satisfication for both cases.
@fix
Reviewers: #committers, devilhorns, zmike
Reviewed By: #committers, zmike
Subscribers: cedric, #committers, zmike
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6573
This commit is contained in:
parent
61e8834acc
commit
4778a84824
|
@ -3171,11 +3171,7 @@ evas_render_updates_internal(Evas *eo_e,
|
|||
|
||||
e = evas = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
|
||||
if (e->inside_post_render) return EINA_FALSE;
|
||||
if (!e->changed)
|
||||
{
|
||||
_cb_always_call(eo_e, EVAS_CALLBACK_RENDER_PRE, NULL);
|
||||
goto nothing2render;
|
||||
}
|
||||
if (!e->changed) return EINA_FALSE;
|
||||
|
||||
if (e->rendering)
|
||||
{
|
||||
|
@ -3707,14 +3703,14 @@ evas_render_updates_internal(Evas *eo_e,
|
|||
|
||||
evas_module_clean();
|
||||
|
||||
// Send a RENDER_POST when we are rendering synchronously or when there is no update done asynchronously
|
||||
/* Send a RENDER_POST when we are rendering synchronously or,
|
||||
when do_async but no drawing. This gurantees pre-post pair. */
|
||||
if (!do_async || !rendering)
|
||||
{
|
||||
Evas_Event_Render_Post post;
|
||||
Eina_List *l1, *l2;
|
||||
Render_Updates *ru;
|
||||
|
||||
nothing2render:
|
||||
post.updated_area = NULL;
|
||||
EINA_LIST_FOREACH(e->outputs, l1, out)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue