summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2018-07-12 09:14:32 -0400
committerMike Blumenkrantz <zmike@samsung.com>2018-07-12 09:14:32 -0400
commit4778a84824d4c059453d9ba1a4b0c912eeb54143 (patch)
tree15f8766f9b7f32b13a91a65cc8ba6426d40cd835
parent61e8834acc24da7fc667ae66839e8d26617e11db (diff)
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: dc841ed9b2ccf880df2d7590ea46d95e03e8752f 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
-rw-r--r--src/lib/evas/canvas/evas_render.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c
index 3256ae1185..f03a6a5cab 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -3171,11 +3171,7 @@ evas_render_updates_internal(Evas *eo_e,
3171 3171
3172 e = evas = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS); 3172 e = evas = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
3173 if (e->inside_post_render) return EINA_FALSE; 3173 if (e->inside_post_render) return EINA_FALSE;
3174 if (!e->changed) 3174 if (!e->changed) return EINA_FALSE;
3175 {
3176 _cb_always_call(eo_e, EVAS_CALLBACK_RENDER_PRE, NULL);
3177 goto nothing2render;
3178 }
3179 3175
3180 if (e->rendering) 3176 if (e->rendering)
3181 { 3177 {
@@ -3707,14 +3703,14 @@ evas_render_updates_internal(Evas *eo_e,
3707 3703
3708 evas_module_clean(); 3704 evas_module_clean();
3709 3705
3710 // Send a RENDER_POST when we are rendering synchronously or when there is no update done asynchronously 3706 /* Send a RENDER_POST when we are rendering synchronously or,
3707 when do_async but no drawing. This gurantees pre-post pair. */
3711 if (!do_async || !rendering) 3708 if (!do_async || !rendering)
3712 { 3709 {
3713 Evas_Event_Render_Post post; 3710 Evas_Event_Render_Post post;
3714 Eina_List *l1, *l2; 3711 Eina_List *l1, *l2;
3715 Render_Updates *ru; 3712 Render_Updates *ru;
3716 3713
3717 nothing2render:
3718 post.updated_area = NULL; 3714 post.updated_area = NULL;
3719 EINA_LIST_FOREACH(e->outputs, l1, out) 3715 EINA_LIST_FOREACH(e->outputs, l1, out)
3720 { 3716 {