discomfitor pushed a commit to branch enlightenment-0.20. http://git.enlightenment.org/core/enlightenment.git/commit/?id=d10a03fcb2a39a611988eeca914431d316f172bf
commit d10a03fcb2a39a611988eeca914431d316f172bf Author: Mike Blumenkrantz <zm...@osg.samsung.com> Date: Mon Mar 14 12:23:19 2016 -0400 unify client post_updates management code into single function --- src/bin/e_comp.c | 10 ++++++++++ src/bin/e_comp.h | 1 + src/bin/e_comp_object.c | 12 ++---------- src/bin/e_comp_wl.c | 14 +++----------- 4 files changed, 16 insertions(+), 21 deletions(-) diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c index 4bce85d..0f9fbf1 100644 --- a/src/bin/e_comp.c +++ b/src/bin/e_comp.c @@ -1422,6 +1422,16 @@ e_comp_render_queue(void) } E_API void +e_comp_client_post_update_add(E_Client *ec) +{ + if (ec->on_post_updates) return; + ec->on_post_updates = EINA_TRUE; + e_comp->post_updates = eina_list_append(e_comp->post_updates, ec); + REFD(ec, 111); + e_object_ref(E_OBJECT(ec)); +} + +E_API void e_comp_shape_queue(void) { if ((e_comp->comp_type != E_PIXMAP_TYPE_X) && (!e_comp_util_has_x())) return; diff --git a/src/bin/e_comp.h b/src/bin/e_comp.h index 1f4f2d5..c391993 100644 --- a/src/bin/e_comp.h +++ b/src/bin/e_comp.h @@ -186,6 +186,7 @@ E_API E_Comp *e_comp_new(void); E_API int e_comp_internal_save(void); EINTERN int e_comp_shutdown(void); E_API void e_comp_render_queue(void); +E_API void e_comp_client_post_update_add(E_Client *ec); E_API void e_comp_shape_queue(void); E_API void e_comp_shape_queue_block(Eina_Bool block); E_API E_Comp_Config *e_comp_config_get(void); diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c index 0b97426..82e2834 100644 --- a/src/bin/e_comp_object.c +++ b/src/bin/e_comp_object.c @@ -901,10 +901,7 @@ _e_comp_object_pixels_get(void *data, Evas_Object *obj EINA_UNUSED) if (cw->native) { E_FREE_FUNC(cw->pending_updates, eina_tiler_free); - cw->ec->on_post_updates = EINA_TRUE; - e_comp->post_updates = eina_list_append(e_comp->post_updates, cw->ec); - REFD(cw->ec, 111); - e_object_ref(E_OBJECT(cw->ec)); + e_comp_client_post_update_add(cw->ec); } else if (e_comp_object_render(ec->frame)) { @@ -3785,12 +3782,7 @@ end: eina_iterator_free(it); E_FREE_FUNC(cw->pending_updates, eina_tiler_free); if (ret) - { - cw->ec->on_post_updates = EINA_TRUE; - e_comp->post_updates = eina_list_append(e_comp->post_updates, cw->ec); - REFD(cw->ec, 111); - e_object_ref(E_OBJECT(cw->ec)); - } + e_comp_client_post_update_add(cw->ec); return ret; } diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 55e71f1..aaa36f7 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -142,17 +142,9 @@ _e_comp_wl_evas_cb_hide(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EIN e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h); e_comp_object_dirty(ec->frame); - if (!e_comp_object_render(ec->frame)) - { - e_object_unref(E_OBJECT(ec)); - return; - } - if (!ec->on_post_updates) - { - ec->on_post_updates = EINA_TRUE; - e_comp->post_updates = eina_list_append(e_comp->post_updates, ec); - } - else e_object_unref(E_OBJECT(ec)); + if (e_comp_object_render(ec->frame)) + e_comp_client_post_update_add(ec); + e_object_unref(E_OBJECT(ec)); } static void --