[EGIT] [core/elementary] master 01/01: [layout] support mirrored set for layout which is using elm_layout_file_set()
tasn pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=0e126b7091edcd9bd905fdbbe5b4f7d04f569586 commit 0e126b7091edcd9bd905fdbbe5b4f7d04f569586 Author: Shinwoo Kim cinoo@samsung.com Date: Tue Jun 9 14:05:58 2015 +0100 [layout] support mirrored set for layout which is using elm_layout_file_set() Summary: mirroed mode does not work, if layout uses elm_layout_file_set(). Test Plan: the following is test code. [test.edc] collections { group { name: layout/test; parts { part { name: bg; type: RECT; description { state: default 0.0; color: 255 255 0 100; } } part { name: test.rect; type: RECT; description { state: default 0.0; color: 255 0 0 255; rel1.to: bg; rel1.relative: 0.2 0.1; rel2.to: bg; rel2.relative: 0.5 0.2; } } } /* parts */ } /* group */ } /* collections */ [test.c] //Compile with: //gcc -g test.c -o test `pkg-config --cflags --libs elementary` #include Elementary.h #include Ecore_X.h static void _bt_click(void *data, Evas_Object *obj, void *event_info) { Eina_Bool mirrored; Evas_Object *layout; layout = data; mirrored = elm_config_mirrored_get(); mirrored = !mirrored; printf(mirred: %d\n, mirrored); elm_config_mirrored_set(mirrored); } EAPI_MAIN int elm_main(int argc, char **argv) { Evas_Object *win, *box, *layout, *bt, *check; char buf[PATH_MAX]; elm_app_info_set(elm_main, elementary, ./test.edj); elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); win = elm_win_add(NULL, Layout, ELM_WIN_BASIC); elm_win_autodel_set(win, EINA_TRUE); box = elm_box_add(win); evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_win_resize_object_add(win, box); evas_object_show(box); // Adding layout and filling it with widgets layout = elm_layout_add(win); evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL); snprintf(buf, sizeof(buf), ./test.edj); elm_layout_file_set(layout, buf, layout/test); elm_box_pack_end(box, layout); evas_object_show(layout); bt = elm_button_add(win); elm_object_text_set(bt, mirrored); evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_smart_callback_add(bt, clicked, _bt_click, layout); elm_box_pack_end(box, bt); evas_object_show(bt); check = elm_check_add(win); elm_object_text_set(check, test); evas_object_size_hint_weight_set(check, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(check, EVAS_HINT_FILL, EVAS_HINT_FILL); elm_box_pack_end(box, check); evas_object_show(check); evas_object_resize(win, 500, 500); evas_object_show(win); elm_run(); elm_shutdown(); return 0; } ELM_MAIN() Reviewers: seoz, raster, tasn, Hermet Subscribers: seoz, cedric Differential Revision: https://phab.enlightenment.org/D2142 --- src/lib/elm_layout.c| 21 +++-- src/lib/elm_theme.c | 1 - src/lib/elm_widget_layout.h | 1 + 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/lib/elm_layout.c b/src/lib/elm_layout.c index 991112b..f49d158 100644 --- a/src/lib/elm_layout.c +++ b/src/lib/elm_layout.c @@ -359,13 +359,17 @@ _elm_layout_theme_internal(Eo *obj, Elm_Layout_Smart_Data *sd) ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); /* function already prints error messages, if any */ - if (!elm_widget_theme_object_set(obj, wd-resize_obj, sd-klass, sd-group, -elm_widget_style_get(obj))) - return EINA_FALSE; + if (!sd-file_set) + { +ret = elm_widget_theme_object_set +(obj, wd-resize_obj, sd-klass, sd-group, + elm_widget_style_get(obj)); + } - ret = _visuals_refresh(obj, sd); + if (ret) + evas_object_smart_callback_call(obj, SIG_THEME_CHANGED, NULL); - evas_object_smart_callback_call(obj, SIG_THEME_CHANGED, NULL); + ret = _visuals_refresh(obj, sd) ret; return ret; } @@ -852,7 +856,11 @@ _elm_layout_efl_file_file_set(Eo *obj
[EGIT] [core/elementary] master 08/11: notify: fix prevent issue, dereference null return value
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=8bd3e79bb1805f71e13cdca5fbf1850f6ba5d6c7 commit 8bd3e79bb1805f71e13cdca5fbf1850f6ba5d6c7 Author: Shinwoo Kim cinoo@samsung.com Date: Wed Jun 17 15:06:01 2015 +0200 notify: fix prevent issue, dereference null return value Summary: Fix prevent issue: Dereference null return value Test Plan: Use static analysis tool such as prevent Reviewers: raster, woohyun, jaehwan, Hermet Subscribers: seoz Differential Revision: https://phab.enlightenment.org/D2669 Signed-off-by: Cedric BAIL ced...@osg.samsung.com --- src/lib/elm_sys_notify.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/lib/elm_sys_notify.c b/src/lib/elm_sys_notify.c index 2799577..23c936f 100644 --- a/src/lib/elm_sys_notify.c +++ b/src/lib/elm_sys_notify.c @@ -257,6 +257,11 @@ _on_action_invoked(void *data EINA_UNUSED, } d = calloc(1, sizeof(*d)); + if (!d) + { +ERR(Fail to allocate memory); +return; + } if (!eldbus_message_arguments_get(msg, us, (d-id), aux)) { --
[EGIT] [core/efl] master 01/01: ecore: use recursive lock for _ecore_glib_select
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=7a046b0c368d45076f505ca8206b68f6a8554453 commit 7a046b0c368d45076f505ca8206b68f6a8554453 Author: Shinwoo Kim <cinoo@samsung.com> Date: Thu Oct 22 12:28:51 2015 -0700 ecore: use recursive lock for _ecore_glib_select Summary: Fix a deadlock caused by recursive call of _ecore_glib_select. Test Plan: Delete elm_image on the glib callback(ref: g_source_set_callback). The _elm_image_evas_object_smart_del calls ecore_thread_wait. Reviewers: raster, jpeg, woohyun, jaehwan, Hermet, seoz, cedric Reviewed By: cedric Differential Revision: https://phab.enlightenment.org/D3202 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/ecore/ecore_glib.c | 47 +++--- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/src/lib/ecore/ecore_glib.c b/src/lib/ecore/ecore_glib.c index 7eacdeb..e2586c1 100644 --- a/src/lib/ecore/ecore_glib.c +++ b/src/lib/ecore/ecore_glib.c @@ -18,8 +18,11 @@ static size_t _ecore_glib_fds_size = 0; static const size_t ECORE_GLIB_FDS_INITIAL = 128; static const size_t ECORE_GLIB_FDS_STEP = 8; static const size_t ECORE_GLIB_FDS_MAX_FREE = 256; -static GMutex *_ecore_glib_select_lock; -static GCond *_ecore_glib_select_cond; +#if GLIB_CHECK_VERSION(2,32,0) +static GRecMutex *_ecore_glib_select_lock; +#else +static GStaticRecMutex *_ecore_glib_select_lock; +#endif static Eina_Bool _ecore_glib_fds_resize(size_t size) @@ -190,21 +193,26 @@ _ecore_glib_select(int ecore_fds, ctx = g_main_context_default(); - if (g_main_context_acquire(ctx)) + if (!g_main_context_acquire(ctx)) { -g_mutex_lock(_ecore_glib_select_lock); - } - else - { -while (!g_main_context_wait(ctx, _ecore_glib_select_cond, -_ecore_glib_select_lock)) +while (!g_main_context_is_owner(ctx)) g_thread_yield(); } +#if GLIB_CHECK_VERSION(2,32,0) + g_rec_mutex_lock(_ecore_glib_select_lock); +#else + g_static_rec_mutex_lock(_ecore_glib_select_lock); +#endif + ret = _ecore_glib_select__locked (ctx, ecore_fds, rfds, wfds, efds, ecore_timeout); - g_mutex_unlock(_ecore_glib_select_lock); +#if GLIB_CHECK_VERSION(2,32,0) + g_rec_mutex_unlock(_ecore_glib_select_lock); +#else + g_static_rec_mutex_unlock(_ecore_glib_select_lock); +#endif g_main_context_release(ctx); return ret; @@ -217,14 +225,12 @@ _ecore_glib_init(void) { #ifdef HAVE_GLIB #if GLIB_CHECK_VERSION(2,32,0) - _ecore_glib_select_lock = malloc(sizeof(GMutex)); - g_mutex_init(_ecore_glib_select_lock); - _ecore_glib_select_cond = malloc(sizeof(GCond)); - g_cond_init(_ecore_glib_select_cond); + _ecore_glib_select_lock = malloc(sizeof(GRecMutex)); + g_rec_mutex_init(_ecore_glib_select_lock); #else if (!g_thread_get_initialized()) g_thread_init(NULL); - _ecore_glib_select_lock = g_mutex_new(); - _ecore_glib_select_cond = g_cond_new(); + _ecore_glib_select_lock = malloc(sizeof(GStaticRecMutex)); + g_static_rec_mutex_init(_ecore_glib_select_lock); #endif #endif } @@ -247,17 +253,12 @@ _ecore_glib_shutdown(void) _ecore_glib_fds_size = 0; #if GLIB_CHECK_VERSION(2,32,0) - g_mutex_clear(_ecore_glib_select_lock); + g_rec_mutex_clear(_ecore_glib_select_lock); free(_ecore_glib_select_lock); _ecore_glib_select_lock = NULL; - g_cond_clear(_ecore_glib_select_cond); - free(_ecore_glib_select_cond); - _ecore_glib_select_cond = NULL; #else - g_mutex_free(_ecore_glib_select_lock); + g_static_rec_mutex_free(_ecore_glib_select_lock); _ecore_glib_select_lock = NULL; - g_cond_free(_ecore_glib_select_cond); - _ecore_glib_select_cond = NULL; #endif #endif } --
[EGIT] [core/efl] master 01/10: ecore: thread - need to null check of function pointer
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=163b50d0f1bcc160f8c4f2588496540e01cd6361 commit 163b50d0f1bcc160f8c4f2588496540e01cd6361 Author: Shinwoo Kim <cinoo@samsung.com> Date: Tue Nov 10 13:45:37 2015 -0800 ecore: thread - need to null check of function pointer Summary: you can meet a segmentation fault without this patch Test Plan: please use the following snippet Ecore_Thread *th; th = ecore_thread_feedback_run(_heavy_cb, _notify_cb, NULL, NULL, obj, EINA_TRUE); ecore_thread_wait(th, 1.0); Reviewers: raster, Hermet, jaehwan, woohyun, cedric Reviewed By: cedric Subscribers: seoz Differential Revision: https://phab.enlightenment.org/D3315 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/ecore/ecore_thread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/ecore/ecore_thread.c b/src/lib/ecore/ecore_thread.c index befb0fb..6a68d6b 100644 --- a/src/lib/ecore/ecore_thread.c +++ b/src/lib/ecore/ecore_thread.c @@ -762,7 +762,7 @@ _ecore_thread_wait_cancel(void *data, Ecore_Thread *thread) Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker*) thread; Ecore_Thread_Waiter *waiter = data; - waiter->func_cancel((void*) waiter->data, thread); + if (waiter->func_cancel) waiter->func_cancel((void*) waiter->data, thread); _ecore_thread_wait_reset(waiter, worker); } @@ -772,7 +772,7 @@ _ecore_thread_wait_end(void *data, Ecore_Thread *thread) Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker*) thread; Ecore_Thread_Waiter *waiter = data; - waiter->func_end((void*) waiter->data, thread); + if (waiter->func_end) waiter->func_end((void*) waiter->data, thread); _ecore_thread_wait_reset(waiter, worker); } --
[EGIT] [core/efl] efl-1.16 01/02: ecore: thread - need to null check of function pointer
cedric pushed a commit to branch efl-1.16. http://git.enlightenment.org/core/efl.git/commit/?id=6ebb508796ac2eea2c65c9245e989e6b5982398c commit 6ebb508796ac2eea2c65c9245e989e6b5982398c Author: Shinwoo Kim <cinoo@samsung.com> Date: Tue Nov 10 13:45:37 2015 -0800 ecore: thread - need to null check of function pointer Summary: you can meet a segmentation fault without this patch Test Plan: please use the following snippet Ecore_Thread *th; th = ecore_thread_feedback_run(_heavy_cb, _notify_cb, NULL, NULL, obj, EINA_TRUE); ecore_thread_wait(th, 1.0); Reviewers: raster, Hermet, jaehwan, woohyun, cedric Reviewed By: cedric Subscribers: seoz Differential Revision: https://phab.enlightenment.org/D3315 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/ecore/ecore_thread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/ecore/ecore_thread.c b/src/lib/ecore/ecore_thread.c index befb0fb..6a68d6b 100644 --- a/src/lib/ecore/ecore_thread.c +++ b/src/lib/ecore/ecore_thread.c @@ -762,7 +762,7 @@ _ecore_thread_wait_cancel(void *data, Ecore_Thread *thread) Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker*) thread; Ecore_Thread_Waiter *waiter = data; - waiter->func_cancel((void*) waiter->data, thread); + if (waiter->func_cancel) waiter->func_cancel((void*) waiter->data, thread); _ecore_thread_wait_reset(waiter, worker); } @@ -772,7 +772,7 @@ _ecore_thread_wait_end(void *data, Ecore_Thread *thread) Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker*) thread; Ecore_Thread_Waiter *waiter = data; - waiter->func_end((void*) waiter->data, thread); + if (waiter->func_end) waiter->func_end((void*) waiter->data, thread); _ecore_thread_wait_reset(waiter, worker); } --
[EGIT] [core/efl] efl-1.15 01/01: ecore: thread - need to null check of function pointer
cedric pushed a commit to branch efl-1.15. http://git.enlightenment.org/core/efl.git/commit/?id=354e5f0d20cda15d9043b90bb44a25392a9b78e2 commit 354e5f0d20cda15d9043b90bb44a25392a9b78e2 Author: Shinwoo Kim <cinoo@samsung.com> Date: Tue Nov 10 13:45:37 2015 -0800 ecore: thread - need to null check of function pointer Summary: you can meet a segmentation fault without this patch Test Plan: please use the following snippet Ecore_Thread *th; th = ecore_thread_feedback_run(_heavy_cb, _notify_cb, NULL, NULL, obj, EINA_TRUE); ecore_thread_wait(th, 1.0); Reviewers: raster, Hermet, jaehwan, woohyun, cedric Reviewed By: cedric Subscribers: seoz Differential Revision: https://phab.enlightenment.org/D3315 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/ecore/ecore_thread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/ecore/ecore_thread.c b/src/lib/ecore/ecore_thread.c index 7266c09..7b88cf2 100644 --- a/src/lib/ecore/ecore_thread.c +++ b/src/lib/ecore/ecore_thread.c @@ -760,7 +760,7 @@ _ecore_thread_wait_cancel(void *data, Ecore_Thread *thread) Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker*) thread; Ecore_Thread_Waiter *waiter = data; - waiter->func_cancel((void*) waiter->data, thread); + if (waiter->func_cancel) waiter->func_cancel((void*) waiter->data, thread); _ecore_thread_wait_reset(waiter, worker); } @@ -770,7 +770,7 @@ _ecore_thread_wait_end(void *data, Ecore_Thread *thread) Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker*) thread; Ecore_Thread_Waiter *waiter = data; - waiter->func_end((void*) waiter->data, thread); + if (waiter->func_end) waiter->func_end((void*) waiter->data, thread); _ecore_thread_wait_reset(waiter, worker); } --
[EGIT] [core/elementary] master 02/07: conform: retry connect to indicator when confrom fails connect.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=0e03ef5a26b414f3ad8a8fbaf92db21b6103ea8b commit 0e03ef5a26b414f3ad8a8fbaf92db21b6103ea8b Author: Shinwoo Kim <cinoo@samsung.com> Date: Mon Nov 9 16:00:17 2015 -0800 conform: retry connect to indicator when confrom fails connect. Summary: An application starts before the indicator has. In this case, the application should try to connect again with the indicator. Test Plan: 1. Start an application without the indicator service. 2. Start the indicator service. Reviewers: raster, Hermet, woohyun, jaehwan, cedric Subscribers: seoz Differential Revision: https://phab.enlightenment.org/D3258 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/elm_conform.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/elm_conform.c b/src/lib/elm_conform.c index 491a1bf..8b56787 100644 --- a/src/lib/elm_conform.c +++ b/src/lib/elm_conform.c @@ -407,7 +407,8 @@ _create_portrait_indicator(Evas_Object *obj) if (!elm_plug_connect(port_indicator, port_indicator_serv_name, 0, EINA_FALSE)) { DBG("Conformant cannot connect to server[%s]\n", port_indicator_serv_name); -return NULL; +sd->port_indi_timer = ecore_timer_add(ELM_CONFORM_INDICATOR_TIME, + _port_indicator_connect_cb, obj); } elm_widget_sub_object_add(obj, port_indicator); @@ -448,7 +449,8 @@ _create_landscape_indicator(Evas_Object *obj) if (!elm_plug_connect(land_indicator, land_indicator_serv_name, 0, EINA_FALSE)) { DBG("Conformant cannot connect to server[%s]\n", land_indicator_serv_name); -return NULL; +sd->land_indi_timer = ecore_timer_add(ELM_CONFORM_INDICATOR_TIME, + _land_indicator_connect_cb, obj); } elm_widget_sub_object_add(obj, land_indicator); --
[EGIT] [core/efl] master 01/01: ecore_evas_extn: Fix server rendering after restart
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=e97d5973e5fad88c52323a3c3e2f1b957816136e commit e97d5973e5fad88c52323a3c3e2f1b957816136e Author: Shinwoo Kim <cinoo@samsung.com> Date: Tue Sep 8 13:41:23 2015 +0900 ecore_evas_extn: Fix server rendering after restart Summary: The server can render, only after the server get the OP_SHOW from the client. However, if the server relaunches while client is running, the server cannot get the OP_SHOW. In this case, the client should send the OP_SHOW, when the server is added. Test Plan: Relaunch a server especially the indicator, while client is running. Reviewers: raster, cedric, Hermet, woohyun, jaehwan, jypark, jpeg Subscribers: cedric, seoz Differential Revision: https://phab.enlightenment.org/D3028 Signed-off-by: Jean-Philippe Andre <jp.an...@samsung.com> --- src/modules/ecore_evas/engines/extn/ecore_evas_extn.c | 4 1 file changed, 4 insertions(+) diff --git a/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c b/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c index 6dd16ba..c8ef291 100644 --- a/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c +++ b/src/modules/ecore_evas/engines/extn/ecore_evas_extn.c @@ -920,6 +920,10 @@ _ipc_server_add(void *data, int type EINA_UNUSED, void *event) return ECORE_CALLBACK_PASS_ON; extn = bdata->data; if (!extn) return ECORE_CALLBACK_PASS_ON; + /* If a server relaunches while a client is running, the server cannot get the OP_SHOW. + In this case, the client should send the OP_SHOW, when the server is added. */ + if (ee->visible && extn->ipc.server) + ecore_ipc_server_send(extn->ipc.server, MAJOR, OP_SHOW, 0, 0, 0, NULL, 0); //FIXME: find a way to let app know server there return ECORE_CALLBACK_PASS_ON; } --
[EGIT] [core/elementary] master 01/01: [config] fix static analysis issue
raster pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=b034b4884f4690e16fbdd33f5a443d5a2d614bf4 commit b034b4884f4690e16fbdd33f5a443d5a2d614bf4 Author: Shinwoo Kim <cinoo@samsung.com> Date: Tue Dec 22 08:02:19 2015 +0900 [config] fix static analysis issue Summary: Fix static analysis issue Fix possible pointer mis-use in elm profile string handling @fix Test Plan: Static analysis Reviewers: cedric, jpeg, raster Reviewed By: raster Subscribers: seoz Differential Revision: https://phab.enlightenment.org/D3474 --- src/lib/elm_config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c index 50d9b6e..7cbc2c7 100644 --- a/src/lib/elm_config.c +++ b/src/lib/elm_config.c @@ -1132,11 +1132,11 @@ _profile_fetch_from_conf(void) memcpy(_elm_profile, p, len); _elm_profile[len] = 0; free(p); + p = strchr(_elm_profile, '/'); + if (p) *p = 0; } else free(p); eet_close(ef); - p = strchr(_elm_profile, '/'); - if (p) *p = 0; return; } eet_close(ef); --
[EGIT] [core/efl] master 03/04: Edje: enhance embryo stack broken error message
jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=1aafaca172101a0a430ac095ad0d96290ff0d61e commit 1aafaca172101a0a430ac095ad0d96290ff0d61e Author: Shinwoo Kim <cinoo@samsung.com> Date: Wed Jan 13 11:55:46 2016 +0900 Edje: enhance embryo stack broken error message Summary: Enhance embry stack broken error message Test Plan: Make a run_program run a script Reviewers: raster, zmike, jpeg Reviewed By: jpeg Subscribers: cedric, seoz, jpeg Differential Revision: https://phab.enlightenment.org/D3528 --- src/lib/edje/edje_embryo.c | 18 -- src/lib/edje/edje_private.h | 2 +- src/lib/edje/edje_program.c | 5 + 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/lib/edje/edje_embryo.c b/src/lib/edje/edje_embryo.c index c4cba4f..a3fd566 100644 --- a/src/lib/edje/edje_embryo.c +++ b/src/lib/edje/edje_embryo.c @@ -,8 +,9 @@ _edje_embryo_script_reset(Edje *ed) /* this may change in future - thus "test_run" is its name */ void -_edje_embryo_test_run(Edje *ed, const char *fname, const char *sig, const char *src) +_edje_embryo_test_run(Edje *ed, Edje_Program *pr, const char *sig, const char *src) { + char fname[128]; Embryo_Function fn; if (!ed) return; @@ -4455,6 +4456,7 @@ _edje_embryo_test_run(Edje *ed, const char *fname, const char *sig, const char * _edje_embryo_globals_init(ed); // _edje_embryo_script_reset(ed); + snprintf(fname, sizeof(fname), "_p%i", pr->id); fn = embryo_program_function_find(ed->collection->script, (char *)fname); if (fn != EMBRYO_FUNCTION_NONE) { @@ -4478,20 +4480,24 @@ _edje_embryo_test_run(Edje *ed, const char *fname, const char *sig, const char * /* like 0.03 - 0.05 seconds or even more */ embryo_program_max_cycle_run_set(ed->collection->script, 500); if (embryo_program_recursion_get(ed->collection->script) && (!ed->collection->script_recursion)) - ERR("You are running Embryo->EDC->Embryo with script program '%s';\nBy the power of Grayskull, your previous Embryo stack is now broken!", fname); + ERR("You are running Embryo->EDC->Embryo with script program '%s';\n" + "A run_program runs the '%d'th program '%s' in the group '%s' of file %s;\n" + "By the power of Grayskull, your previous Embryo stack is now broken!", + fname, (fn + 1), pr->name, ed->group, ed->path); + ret = embryo_program_run(ed->collection->script, fn); if (ret == EMBRYO_PROGRAM_FAIL) { ERR("ERROR with embryo script. " "OBJECT NAME: '%s', " "OBJECT FILE: '%s', " - "ENTRY POINT: '%s', " + "ENTRY POINT: '%s (%s)', " "SIGNAL: '%s', " "SOURCE: '%s', " "ERROR: '%s'", ed->collection->part, ed->file->path, - fname, + fname, pr->name, sig, src, embryo_error_string_get(embryo_program_error_get(ed->collection->script))); } @@ -4500,13 +4506,13 @@ _edje_embryo_test_run(Edje *ed, const char *fname, const char *sig, const char * ERR("ERROR with embryo script. " "OBJECT NAME: '%s', " "OBJECT FILE: '%s', " - "ENTRY POINT: '%s', " + "ENTRY POINT: '%s (%s)', " "SIGNAL: '%s', " "SOURCE: '%s', " "ERROR: 'Script exceeded maximum allowed cycle count of %i'", ed->collection->part, ed->file->path, - fname, + fname, pr->name, sig, src, embryo_program_max_cycle_run_get(ed->collection->script)); } diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h index 29e0c4d..95fb936 100644 --- a/src/lib/edje/edje_private.h +++ b/src/lib/edje/edje_private.h @@ -2419,7 +2419,7 @@ char *_edje_text_unescape(const char *text); void _edje_embryo_script_init (Edje_Part_Collection *edc); void _edje_embryo_script_shutdown (Edje_Part_Collection *edc); void _edje_embryo_script_reset (Edje *ed); -void _edje_embryo_test_run (Edje *ed, const char *fname, const char *sig, const char *src); +void _edje_embryo_test_run (Edje *ed, Edje_Program *pr, const char *sig, const char *src); Edje_Var *_edje_var_new (v
[EGIT] [core/elementary] master 01/01: elm_access: remove duplicated line, ELM_SAFE_FREE handles NULL assign
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=a63077ab1a884935639863d536d729c4f1f524f3 commit a63077ab1a884935639863d536d729c4f1f524f3 Author: Shinwoo Kim <cinoo@samsung.com> Date: Fri Mar 4 16:02:13 2016 +0900 elm_access: remove duplicated line, ELM_SAFE_FREE handles NULL assign --- src/lib/elm_access.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib/elm_access.c b/src/lib/elm_access.c index 9e31ba7..6e9a829 100644 --- a/src/lib/elm_access.c +++ b/src/lib/elm_access.c @@ -189,7 +189,6 @@ _access_shutdown(void) /* _elm_module_unload(); could access m->api and try to free(); */ ELM_SAFE_FREE(m->api, free); - m->api = NULL; mapi = NULL; } --
[EGIT] [core/elementary] master 09/11: config: handle is_mirrored, and translate are not part of EET file, when config flush occurs
cedric pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=5087a8f94f71294a20b567fdc518cfadee13dd46 commit 5087a8f94f71294a20b567fdc518cfadee13dd46 Author: Shinwoo Kim <cinoo@samsung.com> Date: Fri Mar 4 16:00:06 2016 -0800 config: handle is_mirrored, and translate are not part of EET file, when config flush occurs Summary: is_mirrored, and translate value is reset, when config flush occurs. Reviewers: raster, cedric, jpeg, tasn Subscribers: seoz Differential Revision: https://phab.enlightenment.org/D3748 Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/elm_config.c | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c index f958730..185a0ef 100644 --- a/src/lib/elm_config.c +++ b/src/lib/elm_config.c @@ -1827,12 +1827,22 @@ _config_load(void) static void _config_flush_get(void) { + Eina_Bool is_mirrored; + Eina_Bool translate; + is_mirrored = _elm_config->is_mirrored; + translate = _elm_config->translate; + _elm_config_font_overlays_cancel(); _color_overlays_cancel(); _config_free(_elm_config); _elm_config = NULL; _config_load(); _env_get(); + + /* restore prev value which is not part of the EET file */ + _elm_config->is_mirrored = is_mirrored; + _elm_config->translate = translate; + _config_apply(); _config_sub_apply(); evas_font_reinit(); @@ -3673,7 +3683,7 @@ elm_config_all_flush(void) } static void -_translation_init() +_translation_init(void) { #ifdef ENABLE_NLS const char *cur_dom = textdomain(NULL); @@ -3929,9 +3939,19 @@ end: void _elm_config_reload(void) { + Eina_Bool is_mirrored; + Eina_Bool translate; + is_mirrored = _elm_config->is_mirrored; + translate = _elm_config->translate; + _config_free(_elm_config); _elm_config = NULL; _config_load(); + + /* restore prev value which is not part of the EET file */ + _elm_config->is_mirrored = is_mirrored; + _elm_config->translate = translate; + _config_apply(); _elm_config_font_overlay_apply(); _elm_config_color_overlay_apply(); @@ -4100,6 +4120,11 @@ elm_config_transition_duration_factor_get(void) void _elm_config_profile_set(const char *profile) { + Eina_Bool is_mirrored; + Eina_Bool translate; + is_mirrored = _elm_config->is_mirrored; + translate = _elm_config->translate; + if (!profile) return; if (_elm_profile) @@ -4116,6 +4141,11 @@ _elm_config_profile_set(const char *profile) _config_free(_elm_config); _elm_config = NULL; _config_load(); + + /* restore prev value which is not part of the EET file */ + _elm_config->is_mirrored = is_mirrored; + _elm_config->translate = translate; + _config_apply(); _elm_config_font_overlay_apply(); _elm_config_color_overlay_apply(); --
[EGIT] [core/efl] master 01/01: edje: fix invalid calculation to get a circular dependency
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ca225e7bf3437c7bbe52f55847e719b7468ae7c5 commit ca225e7bf3437c7bbe52f55847e719b7468ae7c5 Author: Shinwoo Kim <cinoo@samsung.com> Date: Thu Apr 14 21:55:14 2016 +0900 edje: fix invalid calculation to get a circular dependency --- src/lib/edje/edje_calc.c | 42 -- 1 file changed, 16 insertions(+), 26 deletions(-) diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c index 3af82de..0a8a8a2 100644 --- a/src/lib/edje/edje_calc.c +++ b/src/lib/edje/edje_calc.c @@ -3660,18 +3660,15 @@ _circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Ein { Edje_Real_Part *rp = NULL; - if (cep && !strcmp(ep->part->name, cep->part->name)) - { -return EINA_TRUE; - } + if (cep == ep) return EINA_TRUE; + if (!cep) cep = ep; - if ((ep->calculating & FLAG_X)) + if ((cep->calculating & FLAG_X)) { -if (ep->param1.description) +if (cep->param1.description) { - if (ep->param1.description->rel1.id_x >= 0) + if (cep->param1.description->rel1.id_x >= 0) { - if (!cep) cep = ep; rp = ed->table_parts[cep->param1.description->rel1.id_x]; if (_circular_dependency_find(ed, ep, rp, clist)) { @@ -3679,9 +3676,8 @@ _circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Ein return EINA_TRUE; } } - if (ep->param1.description->rel2.id_x >= 0) + if (cep->param1.description->rel2.id_x >= 0) { - if (!cep) cep = ep; rp = ed->table_parts[cep->param1.description->rel2.id_x]; if (_circular_dependency_find(ed, ep, rp, clist)) { @@ -3691,11 +3687,10 @@ _circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Ein } } -if (ep->param2) +if (cep->param2) { - if (ep->param2->description->rel1.id_x >= 0) + if (cep->param2->description->rel1.id_x >= 0) { - if (!cep) cep = ep; rp = ed->table_parts[cep->param2->description->rel1.id_x]; if (_circular_dependency_find(ed, ep, rp, clist)) { @@ -3703,9 +3698,8 @@ _circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Ein return EINA_TRUE; } } - if (ep->param2->description->rel2.id_x >= 0) + if (cep->param2->description->rel2.id_x >= 0) { - if (!cep) cep = ep; rp = ed->table_parts[cep->param2->description->rel2.id_x]; if (_circular_dependency_find(ed, ep, rp, clist)) { @@ -3715,13 +3709,12 @@ _circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Ein } } } - if ((ep->calculating & FLAG_Y)) + if ((cep->calculating & FLAG_Y)) { -if (ep->param1.description) +if (cep->param1.description) { - if (ep->param1.description->rel1.id_y >= 0) + if (cep->param1.description->rel1.id_y >= 0) { - if (!cep) cep = ep; rp = ed->table_parts[cep->param1.description->rel1.id_y]; if (_circular_dependency_find(ed, ep, rp, clist)) { @@ -3729,9 +3722,8 @@ _circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Ein return EINA_TRUE; } } - if (ep->param1.description->rel2.id_y >= 0) + if (cep->param1.description->rel2.id_y >= 0) { - if (!cep) cep = ep; rp = ed->table_parts[cep->param1.description->rel2.id_y]; if (_circular_dependency_find(ed, ep, rp, clist)) { @@ -3740,11 +3732,10 @@ _circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Ein } } } -if (ep->param2) +if (cep->param2) { - if (ep->param2->description->rel1.id_y >= 0) + if (cep->param2->description->rel1.id_y >= 0) { - if (!cep) cep = ep; rp = ed->t
[EGIT] [core/efl] master 01/01: elementary: remove documentation error
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=34f11c0a06cf2f56830f55d800079f30ad3b7d35 commit 34f11c0a06cf2f56830f55d800079f30ad3b7d35 Author: Shinwoo Kim <cinoo@samsung.com> Date: Tue Oct 17 16:52:57 2017 +0900 elementary: remove documentation error --- src/lib/elementary/elm_flip.h | 3 --- src/lib/elementary/elm_flipselector.h | 3 --- 2 files changed, 6 deletions(-) diff --git a/src/lib/elementary/elm_flip.h b/src/lib/elementary/elm_flip.h index 9a5470efb2..cbac3689ae 100644 --- a/src/lib/elementary/elm_flip.h +++ b/src/lib/elementary/elm_flip.h @@ -5,9 +5,6 @@ * @image html flip_inheritance_tree.png * @image latex flip_inheritance_tree.eps * - * @image html img/widget/flip/preview-00.png - * @image latex img/widget/flip/preview-00.eps - * * This widget holds 2 content objects(Evas_Object): one on the front and one * on the back. It allows you to flip from front to back and vice-versa using * various animations. diff --git a/src/lib/elementary/elm_flipselector.h b/src/lib/elementary/elm_flipselector.h index 966901e084..40e8d07e7c 100644 --- a/src/lib/elementary/elm_flipselector.h +++ b/src/lib/elementary/elm_flipselector.h @@ -5,9 +5,6 @@ * @image html flipselector_inheritance_tree.png * @image latex flipselector_inheritance_tree.eps * - * @image html img/widget/flipselector/preview-00.png - * @image latex img/widget/flipselector/preview-00.eps - * * A flip selector is a widget to show a set of @b text items, one * at a time, with the same sheet switching style as the @ref Clock * "clock" widget, when one changes the current displaying sheet --
[EGIT] [core/efl] master 01/01: elm: enhance documentation for following files
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=06eee29b76c235864710f6fe9cb9cdc477a0278c commit 06eee29b76c235864710f6fe9cb9cdc477a0278c Author: Shinwoo Kim <cinoo@samsung.com> Date: Wed Oct 18 17:38:16 2017 +0900 elm: enhance documentation for following files - elm_config.h - elm_focus.h - elm_genlist.h - elm_icon.h - elm_image.h - elm_image_legacy.h - elm_index.h --- src/lib/elementary/elm_config.h | 6 ++ src/lib/elementary/elm_focus.h| 1 + src/lib/elementary/elm_genlist.h | 18 -- src/lib/elementary/elm_icon.h | 3 --- src/lib/elementary/elm_image.h| 3 --- src/lib/elementary/elm_image_legacy.h | 7 +++ src/lib/elementary/elm_index.h| 3 --- 7 files changed, 14 insertions(+), 27 deletions(-) diff --git a/src/lib/elementary/elm_config.h b/src/lib/elementary/elm_config.h index 0472052301..3a080fb4e1 100644 --- a/src/lib/elementary/elm_config.h +++ b/src/lib/elementary/elm_config.h @@ -799,6 +799,10 @@ EAPI void elm_config_scroll_thumbscroll_acceleration_weight_set(double w * elementary will automatically scroll the focused area to the visible * viewport. * + * @return ELM_FOCUS_AUTOSCROLL_MODE_SHOW if directly show the focused region or item automatically. + * ELM_FOCUS_AUTOSCROLL_MODE_NONE if do not show the focused region or item automatically. + * ELM_FOCUS_AUTOSCROLL_MODE_BRING_IN if bring_in the focused region or item automatically which might invole the scrolling. + * * @see elm_config_focus_autoscroll_mode_set() * @ingroup Elm_Focus * @since 1.10 @@ -1209,6 +1213,7 @@ EAPI Eina_List *elm_config_text_classes_list_get(void); /** * Free Elementary's list of supported text classes. * + * @param list The text classes list. * @ingroup Elm_Fonts * * @see elm_config_text_classes_list_get(). @@ -1335,6 +1340,7 @@ EAPI void elm_config_font_overlay_apply(void); * EVAS_FONT_HINTING_AUTO < Automatic font hinting * EVAS_FONT_HINTING_BYTECODE < Bytecode font hinting * + * @param type The font hinting type * @ingroup Elm_Fonts * * This applies font hint changes to all windows of the current application. diff --git a/src/lib/elementary/elm_focus.h b/src/lib/elementary/elm_focus.h index 7c114ab151..7e9dee7aef 100644 --- a/src/lib/elementary/elm_focus.h +++ b/src/lib/elementary/elm_focus.h @@ -132,6 +132,7 @@ EAPI void elm_object_focus_custom_chain_unset(Evas_Object *obj); * Get custom focus chain * * @param obj The container object + * @return Chain of objects to pass focus. * @ingroup Elm_Focus */ EAPI const Eina_List *elm_object_focus_custom_chain_get(const Evas_Object *obj); diff --git a/src/lib/elementary/elm_genlist.h b/src/lib/elementary/elm_genlist.h index 04ad5b962c..8f0cf93d32 100644 --- a/src/lib/elementary/elm_genlist.h +++ b/src/lib/elementary/elm_genlist.h @@ -5,8 +5,6 @@ * @image html genlist_inheritance_tree.png * @image latex genlist_inheritance_tree.eps * - * @image html img/widget/genlist/preview-00.png - * @image latex img/widget/genlist/preview-00.eps * @image html img/genlist.png * @image latex img/genlist.eps * @@ -89,25 +87,9 @@ * available item styles: * - default * - default_style - The text part is a textblock - * - * @image html img/widget/genlist/preview-04.png - * @image latex img/widget/genlist/preview-04.eps - * * - double_label - * - * @image html img/widget/genlist/preview-01.png - * @image latex img/widget/genlist/preview-01.eps - * * - icon_top_text_bottom - * - * @image html img/widget/genlist/preview-02.png - * @image latex img/widget/genlist/preview-02.eps - * * - group_index - * - * @image html img/widget/genlist/preview-03.png - * @image latex img/widget/genlist/preview-03.eps - * * - one_icon - Only 1 icon (left) (since 1.7) * - end_icon - Only 1 icon (at end/right) (since 1.7) * - no_icon - No icon (at end/right) (since 1.7) diff --git a/src/lib/elementary/elm_icon.h b/src/lib/elementary/elm_icon.h index a5ca41feb5..a7366fb977 100644 --- a/src/lib/elementary/elm_icon.h +++ b/src/lib/elementary/elm_icon.h @@ -5,9 +5,6 @@ * @image html icon_inheritance_tree.png * @image latex icon_inheritance_tree.eps * - * @image html img/widget/icon/preview-00.png - * @image latex img/widget/icon/preview-00.eps - * * An icon object is used to display standard icon images ("delete", * "edit", "arrows", etc.) or images coming from a custom file (PNG, * JPG, EDJE, etc.), on icon contexts. diff --git a/src/lib/elementary/elm_image.h b/src/lib/elementary/elm_image.h index 27c04d5cca..3e63d445d2 100644 --- a/src/lib/elementary/elm_image.h +++ b/src/lib/elementary/elm_image.h @@ -5,9 +5,6 @@ * @image html image_inheritance_tree.png * @image latex image_inheritance_tree.eps * - * @image html img/widget/image/preview-00.png - * @i
[EGIT] [core/efl] master 01/01: elm: Use EFL_UI_WIN_CLASS to check if an object is window
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=763c634dced12e5973f05b0a1958e8e51b6fbff8 commit 763c634dced12e5973f05b0a1958e8e51b6fbff8 Author: Shinwoo Kim <cinoo@samsung.com> Date: Wed Dec 6 14:54:49 2017 +0900 elm: Use EFL_UI_WIN_CLASS to check if an object is window The EFL_ACCESS_WINDOW_INTERFACE was used to check if an object is window. This could make sense. But it would be better to use EFL_UI_WIN_CLASS for consistency. --- src/lib/elementary/elm_widget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c index 7b7497b045..a059c32457 100644 --- a/src/lib/elementary/elm_widget.c +++ b/src/lib/elementary/elm_widget.c @@ -3882,7 +3882,7 @@ _elm_widget_onscreen_is(Evas_Object *widget) return EINA_FALSE; // window does not have to check viewport and geometry - if (efl_isa(widget, EFL_ACCESS_WINDOW_INTERFACE)) + if (efl_isa(widget, EFL_UI_WIN_CLASS)) return EINA_TRUE; // check if on canvas --
[EGIT] [core/efl] master 01/01: elm: Fix _elm_widget_onscreen_is for window
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=6a6685ab21e70fb0f35a0f10ffbad6efe285620d commit 6a6685ab21e70fb0f35a0f10ffbad6efe285620d Author: Shinwoo Kim <cinoo@samsung.com> Date: Wed Dec 6 11:53:06 2017 +0900 elm: Fix _elm_widget_onscreen_is for window A window is using ecore_evas geometry value for its evas_object geometry value. The evas_output_viewport x(y) value which is used in _elm_widget_onscreen_is is always 0. So _elm_widget_onscreen_is could return EINA_FALSE, if ecore_evas geometry x(y) value is bigger than 0, even though a window object is on screen. So it is not correct to compare ecore_output_viewport and evas_object geometry for a window object. Moreover it does not make sense. --- src/lib/elementary/elm_widget.c | 4 1 file changed, 4 insertions(+) diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c index 5f9a4eb18b..7b7497b045 100644 --- a/src/lib/elementary/elm_widget.c +++ b/src/lib/elementary/elm_widget.c @@ -3881,6 +3881,10 @@ _elm_widget_onscreen_is(Evas_Object *widget) if (eina_rectangle_is_empty()) return EINA_FALSE; + // window does not have to check viewport and geometry + if (efl_isa(widget, EFL_ACCESS_WINDOW_INTERFACE)) + return EINA_TRUE; + // check if on canvas evas_output_viewport_get(evas, , , , ); if (!eina_rectangles_intersect(, )) --
[EGIT] [core/efl] master 01/01: elm: make elm_object_text_get return markup info as well.
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=c07a40c745c5df1b1f6f0bbf666b233d8d072ca7 commit c07a40c745c5df1b1f6f0bbf666b233d8d072ca7 Author: Shinwoo Kim <cinoo@samsung.com> Date: Thu Jan 25 22:10:32 2018 +0900 elm: make elm_object_text_get return markup info as well. This commit solves following issue https://phab.enlightenment.org/T6642 If I set object text as below elm_object_text_set(btn, "Sometext"); then elm_object_text_get(btn) returns "Some text" not "Sometext". --- src/lib/elementary/efl_ui_layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c index 919e02f63f..438c9fe132 100644 --- a/src/lib/elementary/efl_ui_layout.c +++ b/src/lib/elementary/efl_ui_layout.c @@ -2495,7 +2495,7 @@ elm_layout_text_get(const Eo *obj, const char *part) else if (!_elm_layout_part_aliasing_eval(obj, , EINA_TRUE)) return NULL; - return efl_text_get(efl_part(obj, part)); + return efl_text_markup_get(efl_part(obj, part)); } EAPI Eina_Bool --
[EGIT] [core/efl] master 01/01: elm: make elm_layout_text_set use efl_text_markup_set
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=429e19563d15a02d3417ff8fffca994ce6685249 commit 429e19563d15a02d3417ff8fffca994ce6685249 Author: Shinwoo Kim <cinoo@samsung.com> Date: Mon Jan 29 12:25:18 2018 +0900 elm: make elm_layout_text_set use efl_text_markup_set The elm_layout_text_get is using efl_text_markup_get by following commit. commit c07a40c745c5df1b1f6f0bbf666b233d8d072ca7 elm: make elm_object_text_get return markup info as well. This commit solves following issue https://phab.enlightenment.org/T6642 If I set object text as below elm_object_text_set(btn, "Sometext"); then elm_object_text_get(btn) returns "Some text" not "Sometext". So using efl_text_markup_set makes sense. --- src/lib/elementary/efl_ui_layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c index 438c9fe132..6a6c11c5ea 100644 --- a/src/lib/elementary/efl_ui_layout.c +++ b/src/lib/elementary/efl_ui_layout.c @@ -2480,7 +2480,7 @@ elm_layout_text_set(Eo *obj, const char *part, const char *text) else if (!_elm_layout_part_aliasing_eval(obj, , EINA_TRUE)) return EINA_FALSE; - efl_text_set(efl_part(obj, part), text); + efl_text_markup_set(efl_part(obj, part), text); return EINA_TRUE; } --
[EGIT] [core/efl] master 01/01: elm: use Dbus securely
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=610eee1e52eede85bc6d10474e1f8e98e65e35e9 commit 610eee1e52eede85bc6d10474e1f8e98e65e35e9 Author: Shinwoo Kim <cinoo@samsung.com> Date: Fri Feb 2 18:56:58 2018 +0900 elm: use Dbus securely The Efl.Access.Attribute is using key and value. The value could be NULL. If the value is NULL, then following error occurs. *error: arguments to dbus_message_iter_append_basic() were incorrect, assertion "_dbus_check_is_valid_utf8 (*string_p)" failed in file ../../dbus/dbus-message.c line 2712. This is normally a bug in some application using the D-Bus library. Array or variant type requires that type string be written, but end_dict_entry was written. The overall signature expected here was 'a{ss}' and we are on byte 3 of that signature. --- src/lib/elementary/efl_ui_widget.c| 51 +++ src/lib/elementary/elm_atspi_bridge.c | 1 + 2 files changed, 35 insertions(+), 17 deletions(-) diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c index c34608708f..fbf5646665 100644 --- a/src/lib/elementary/efl_ui_widget.c +++ b/src/lib/elementary/efl_ui_widget.c @@ -5365,26 +5365,36 @@ _efl_ui_widget_efl_access_state_set_get(Eo *obj, Elm_Widget_Smart_Data *pd EINA_ EOLIAN static Eina_List* _efl_ui_widget_efl_access_attributes_get(Eo *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED) { + const char *type = NULL; + const char *style = NULL; Eina_List *attr_list = NULL; + Efl_Access_Attribute *attr = NULL; attr_list = efl_access_attributes_get(efl_super(obj, EFL_UI_WIDGET_CLASS)); //Add type and style information in addition. - Efl_Access_Attribute *attr = NULL; - attr = calloc(1, sizeof(Efl_Access_Attribute)); - if (attr) + type = elm_widget_type_get(obj); + if (type) { -attr->key = eina_stringshare_add("type"); -attr->value = eina_stringshare_add(elm_widget_type_get(obj)); -attr_list = eina_list_append(attr_list, attr); +attr = calloc(1, sizeof(Efl_Access_Attribute)); +if (attr) + { + attr->key = eina_stringshare_add("type"); + attr->value = eina_stringshare_add(type); + attr_list = eina_list_append(attr_list, attr); + } } - attr = calloc(1, sizeof(Efl_Access_Attribute)); - if (attr) + style = elm_widget_style_get(obj); + if (style) { -attr->key = eina_stringshare_add("style"); -attr->value = eina_stringshare_add(elm_widget_style_get(obj)); -attr_list = eina_list_append(attr_list, attr); +attr = calloc(1, sizeof(Efl_Access_Attribute)); +if (attr) + { + attr->key = eina_stringshare_add("style"); + attr->value = eina_stringshare_add(style); + attr_list = eina_list_append(attr_list, attr); + } } return attr_list; @@ -5393,15 +5403,22 @@ _efl_ui_widget_efl_access_attributes_get(Eo *obj, Elm_Widget_Smart_Data *pd EINA EOLIAN static Eina_List * _elm_widget_item_efl_access_attributes_get(Eo *eo_item, Elm_Widget_Item_Data *pd EINA_UNUSED) { + const char *style = NULL; Eina_List *attr_list = NULL; - attr_list = efl_access_attributes_get(efl_super(eo_item, ELM_WIDGET_ITEM_CLASS)); Efl_Access_Attribute *attr = NULL; - attr = calloc(1, sizeof(Efl_Access_Attribute)); - if (attr) + + attr_list = efl_access_attributes_get(efl_super(eo_item, ELM_WIDGET_ITEM_CLASS)); + + style = elm_object_item_style_get(eo_item); + if (style) { -attr->key = eina_stringshare_add("style"); -attr->value = eina_stringshare_add(elm_object_item_style_get(eo_item)); -attr_list = eina_list_append(attr_list, attr); +attr = calloc(1, sizeof(Efl_Access_Attribute)); +if (attr) + { + attr->key = eina_stringshare_add("style"); + attr->value = eina_stringshare_add(style); + attr_list = eina_list_append(attr_list, attr); + } } return attr_list; } diff --git a/src/lib/elementary/elm_atspi_bridge.c b/src/lib/elementary/elm_atspi_bridge.c index 8d5cfe7fdf..e85d39b52e 100644 --- a/src/lib/elementary/elm_atspi_bridge.c +++ b/src/lib/elementary/elm_atspi_bridge.c @@ -625,6 +625,7 @@ _accessible_attributes_get(const Eldbus_Service_Interface *iface, const Eldbus_M { iter_entry = eldbus_message_iter_container_new(iter_dict, 'e', NULL); if (!iter_entry) goto error; +fprintf(stderr, "key: %s, value: %s\n", attr->key, attr->value); eldbus_message_iter_arguments_append(iter_entry, "ss", attr->key, attr->value); eldbus_message_iter_container_close(iter_dict, iter_entry); } --
[EGIT] [core/efl] master 01/01: elm: fix typo - remove line to debug
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=3c380717456c6a49808c656ef3bddcddbc611437 commit 3c380717456c6a49808c656ef3bddcddbc611437 Author: Shinwoo Kim <cinoo@samsung.com> Date: Fri Feb 2 19:07:04 2018 +0900 elm: fix typo - remove line to debug --- src/lib/elementary/elm_atspi_bridge.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib/elementary/elm_atspi_bridge.c b/src/lib/elementary/elm_atspi_bridge.c index e85d39b52e..8d5cfe7fdf 100644 --- a/src/lib/elementary/elm_atspi_bridge.c +++ b/src/lib/elementary/elm_atspi_bridge.c @@ -625,7 +625,6 @@ _accessible_attributes_get(const Eldbus_Service_Interface *iface, const Eldbus_M { iter_entry = eldbus_message_iter_container_new(iter_dict, 'e', NULL); if (!iter_entry) goto error; -fprintf(stderr, "key: %s, value: %s\n", attr->key, attr->value); eldbus_message_iter_arguments_append(iter_entry, "ss", attr->key, attr->value); eldbus_message_iter_container_close(iter_dict, iter_entry); } --
[EGIT] [core/efl] master 01/01: eina_tiler: fix typo of rect comparing
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=bb5f4aa857e5fbc1cb067317e690fcc5aae40a24 commit bb5f4aa857e5fbc1cb067317e690fcc5aae40a24 Author: Shinwoo Kim <cinoo@samsung.com> Date: Mon Feb 5 20:02:06 2018 +0900 eina_tiler: fix typo of rect comparing --- src/lib/eina/eina_tiler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/eina/eina_tiler.c b/src/lib/eina/eina_tiler.c index 7597d1e286..e8ea2eb858 100644 --- a/src/lib/eina/eina_tiler.c +++ b/src/lib/eina/eina_tiler.c @@ -1216,7 +1216,7 @@ _rect_same(Eina_Rectangle *rec1, Eina_Rectangle *rec2) // this is ok because all the rects being compared will be aligned to 8bytes Rectangle_Same *same1 = (Rectangle_Same *)rec1; Rectangle_Same *same2 = (Rectangle_Same *)rec2; - return ((same1->x == same2->y) && (same1->y == same2->y)); + return ((same1->x == same2->x) && (same1->y == same2->y)); } EAPI Eina_Bool eina_tiler_rect_add(Eina_Tiler *t, const Eina_Rectangle *r) --
[EGIT] [core/efl] master 01/01: Use ERR instead of CRI if *DATA_GET* returns NULL
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=8aaa3502622ae06e84ff033584765a6ce1ef5399 commit 8aaa3502622ae06e84ff033584765a6ce1ef5399 Author: Shinwoo Kim <cinoo@samsung.com> Date: Thu Feb 1 14:20:20 2018 +0900 Use ERR instead of CRI if *DATA_GET* returns NULL This patch set is for remains. --- src/lib/elementary/elm_widget.h | 2 +- src/lib/evas/canvas/evas_object_box.c | 4 ++-- src/lib/evas/canvas/evas_object_grid.c | 4 ++-- src/lib/evas/canvas/evas_object_table.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lib/elementary/elm_widget.h b/src/lib/elementary/elm_widget.h index 3a8267b76b..e0df6cf245 100644 --- a/src/lib/elementary/elm_widget.h +++ b/src/lib/elementary/elm_widget.h @@ -765,7 +765,7 @@ Efl_Canvas_Object * _efl_ui_widget_bg_get(Efl_Ui_Widget *obj); ptr = efl_data_scope_get(o, EFL_UI_WIDGET_CLASS); \ if (EINA_UNLIKELY(!ptr)) \ {\ - CRI("no widget data for object %p (%s)", \ + ERR("No widget data for object %p (%s)", \ o, evas_object_type_get(o)); \ return __VA_ARGS__; \ } diff --git a/src/lib/evas/canvas/evas_object_box.c b/src/lib/evas/canvas/evas_object_box.c index bbe66b23e7..0a768d6cb1 100644 --- a/src/lib/evas/canvas/evas_object_box.c +++ b/src/lib/evas/canvas/evas_object_box.c @@ -48,7 +48,7 @@ static void _sizing_eval(Evas_Object *obj); EVAS_OBJECT_BOX_DATA_GET(o, ptr);\ if (!ptr) \ { \ - CRI("no widget data for object %p (%s)",\ + ERR("No widget data for object %p (%s)",\ o, evas_object_type_get(o));\ fflush(stderr); \ return; \ @@ -58,7 +58,7 @@ if (!ptr) \ EVAS_OBJECT_BOX_DATA_GET(o, ptr);\ if (!ptr) \ { \ - CRI("no widget data for object %p (%s)",\ + ERR("No widget data for object %p (%s)",\ o, evas_object_type_get(o));\ fflush(stderr); \ return val; \ diff --git a/src/lib/evas/canvas/evas_object_grid.c b/src/lib/evas/canvas/evas_object_grid.c index 8aab7cffd4..f323384ee6 100644 --- a/src/lib/evas/canvas/evas_object_grid.c +++ b/src/lib/evas/canvas/evas_object_grid.c @@ -49,7 +49,7 @@ struct _Evas_Object_Grid_Accessor EVAS_OBJECT_GRID_DATA_GET(o, ptr); \ if (!ptr)\ { \ - CRI("no widget data for object %p (%s)", \ + ERR("No widget data for object %p (%s)", \ o, evas_object_type_get(o)); \ return; \ } @@ -58,7 +58,7 @@ struct _Evas_Object_Grid_Accessor EVAS_OBJECT_GRID_DATA_GET(o, ptr); \ if (!ptr)\ { \ - CRI("No widget data for object %p (%s)",\ + ERR("No widget data for object %p (%s)",\ o, evas_object_type_get(o)); \ return val; \ } diff --git a/src/lib/evas/canvas/evas_object_table.c b/src/lib/evas/canvas/evas_object_table.c index a07461f0f3..6db28e7a16 100644 --- a/src/lib/evas/canvas/evas_object_table.c +++ b/src/lib/evas/canvas/evas_object_table.c @@ -105,7 +105,7 @@ struct _Evas_Object_Table_Accessor EVAS_OBJECT_TABLE_DATA_GET(o, ptr); \ if (!ptr) \ { \ - CRI("no widget data for object %p (%s)",\ + ERR("No widget data for object %p
[EGIT] [core/efl] master 01/01: elm: Use ERR instead of CRI if *DATA_GET* returns NULL
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=9f2e1d050f054c386e691439a8e640d78693e67e commit 9f2e1d050f054c386e691439a8e640d78693e67e Author: Shinwoo Kim <cinoo@samsung.com> Date: Thu Feb 1 12:16:28 2018 +0900 elm: Use ERR instead of CRI if *DATA_GET* returns NULL --- src/lib/elementary/efl_ui_bg_widget_private.h| 4 ++-- src/lib/elementary/efl_ui_button_private.h | 4 ++-- src/lib/elementary/efl_ui_check_private.h| 4 ++-- src/lib/elementary/efl_ui_clock_private.h| 4 ++-- src/lib/elementary/efl_ui_image_zoomable_private.h | 4 ++-- src/lib/elementary/efl_ui_list_private.h | 4 ++-- src/lib/elementary/efl_ui_multibuttonentry_private.h | 4 ++-- src/lib/elementary/efl_ui_pan.c | 2 +- src/lib/elementary/efl_ui_panes_private.h| 4 ++-- src/lib/elementary/efl_ui_radio_private.h| 4 ++-- src/lib/elementary/efl_ui_scroller.c | 2 +- src/lib/elementary/efl_ui_text.c | 4 ++-- src/lib/elementary/efl_ui_video_private.h| 4 ++-- src/lib/elementary/efl_ui_widget_flip.h | 4 ++-- src/lib/elementary/efl_ui_widget_frame.h | 4 ++-- src/lib/elementary/efl_ui_widget_image.h | 4 ++-- src/lib/elementary/efl_ui_win.c | 2 +- src/lib/elementary/elm_gesture_layer.c | 4 ++-- src/lib/elementary/elm_widget_actionslider.h | 4 ++-- src/lib/elementary/elm_widget_bg.h | 4 ++-- src/lib/elementary/elm_widget_box.h | 4 ++-- src/lib/elementary/elm_widget_bubble.h | 4 ++-- src/lib/elementary/elm_widget_clipper.h | 4 ++-- src/lib/elementary/elm_widget_clock.h| 4 ++-- src/lib/elementary/elm_widget_colorselector.h| 4 ++-- src/lib/elementary/elm_widget_combobox.h | 4 ++-- src/lib/elementary/elm_widget_conform.h | 4 ++-- src/lib/elementary/elm_widget_ctxpopup.h | 4 ++-- src/lib/elementary/elm_widget_dayselector.h | 4 ++-- src/lib/elementary/elm_widget_diskselector.h | 4 ++-- src/lib/elementary/elm_widget_entry.h| 4 ++-- src/lib/elementary/elm_widget_fileselector.h | 4 ++-- src/lib/elementary/elm_widget_fileselector_button.h | 4 ++-- src/lib/elementary/elm_widget_fileselector_entry.h | 4 ++-- src/lib/elementary/elm_widget_flipselector.h | 4 ++-- src/lib/elementary/elm_widget_gengrid.h | 4 ++-- src/lib/elementary/elm_widget_genlist.h | 4 ++-- src/lib/elementary/elm_widget_glview.h | 4 ++-- src/lib/elementary/elm_widget_hover.h| 4 ++-- src/lib/elementary/elm_widget_hoversel.h | 4 ++-- src/lib/elementary/elm_widget_icon.h | 4 ++-- src/lib/elementary/elm_widget_index.h| 4 ++-- src/lib/elementary/elm_widget_inwin.h| 4 ++-- src/lib/elementary/elm_widget_label.h| 4 ++-- src/lib/elementary/elm_widget_list.h | 4 ++-- src/lib/elementary/elm_widget_map.h | 4 ++-- src/lib/elementary/elm_widget_mapbuf.h | 4 ++-- src/lib/elementary/elm_widget_menu.h | 4 ++-- src/lib/elementary/elm_widget_naviframe.h| 4 ++-- src/lib/elementary/elm_widget_notify.h | 4 ++-- src/lib/elementary/elm_widget_panel.h| 4 ++-- src/lib/elementary/elm_widget_photo.h| 4 ++-- src/lib/elementary/elm_widget_player.h | 4 ++-- src/lib/elementary/elm_widget_plug.h | 4 ++-- src/lib/elementary/elm_widget_popup.h| 4 ++-- src/lib/elementary/elm_widget_prefs.h| 4 ++-- src/lib/elementary/elm_widget_route.h| 4 ++-- src/lib/elementary/elm_widget_scroller.h | 4 ++-- src/lib/elementary/elm_widget_segment_control.h | 4 ++-- src/lib/elementary/elm_widget_separator.h| 4 ++-- src/lib/elementary/elm_widget_slideshow.h| 4 ++-- src/lib/elementary/elm_widget_spinner.h | 4 ++-- src/lib/elementary/elm_widget_thumb.h| 4 ++-- src/lib/elementary/elm_widget_toolbar.h | 4 ++-- src/lib/elementary/elm_widget_web.h | 4 ++-- 65 files changed, 127 insertions(+), 127 deletions(-) diff --git a/src/lib/elementary/efl_ui_bg_widget_private.h b/src/lib/elementary/efl_ui_bg_widget_private.h index e09c2662f3..0ef56c113b 100644 --- a/src/lib/elementary/efl_ui_bg_widget_private.h +++ b/src/lib/elementary/efl_ui_bg_widget_private.h @@ -41,7 +41,7 @@ Efl_Ui_Bg_Widget_Data * sd = efl_data_scope_get(o, EFL_UI_BG_WIDGET_CLASS) EFL_UI_BG_WIDGET_DATA_GET(o, ptr); \ if (EINA_UNLIKEL
[EGIT] [core/efl] efl-1.20 02/45: eina_tiler: fix typo of rect comparing
raster pushed a commit to branch efl-1.20. http://git.enlightenment.org/core/efl.git/commit/?id=1859cf0556d3c5f61de74b51e0ac9f71f3d64096 commit 1859cf0556d3c5f61de74b51e0ac9f71f3d64096 Author: Shinwoo Kim <cinoo@samsung.com> Date: Mon Feb 5 20:02:06 2018 +0900 eina_tiler: fix typo of rect comparing --- src/lib/eina/eina_tiler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/eina/eina_tiler.c b/src/lib/eina/eina_tiler.c index 7597d1e286..e8ea2eb858 100644 --- a/src/lib/eina/eina_tiler.c +++ b/src/lib/eina/eina_tiler.c @@ -1216,7 +1216,7 @@ _rect_same(Eina_Rectangle *rec1, Eina_Rectangle *rec2) // this is ok because all the rects being compared will be aligned to 8bytes Rectangle_Same *same1 = (Rectangle_Same *)rec1; Rectangle_Same *same2 = (Rectangle_Same *)rec2; - return ((same1->x == same2->y) && (same1->y == same2->y)); + return ((same1->x == same2->x) && (same1->y == same2->y)); } EAPI Eina_Bool eina_tiler_rect_add(Eina_Tiler *t, const Eina_Rectangle *r) --
[EGIT] [core/efl] master 01/01: Efl.Ui.Nstate: do not call "changed" callback
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=fd8e9f9c4e8dbda6c379dc464f562f5b2c681d31 commit fd8e9f9c4e8dbda6c379dc464f562f5b2c681d31 Author: Shinwoo Kim <cinoo@samsung.com> Date: Wed Feb 7 16:18:53 2018 +0900 Efl.Ui.Nstate: do not call "changed" callback Before solving following problem in Efl.Ui.Check https://phab.enlightenment.org/T6673 The changed callback is called with opposite value, if application is using Efl.Ui.Check with state pointer. The reason is that the changed callback is called in efl_ui_nstate_activate, and the value refered by state pointer is changed only after the efl_ui_nstate_activate is called. static void _activate(Evas_Object *obj) { EFL_UI_CHECK_DATA_GET(obj, sd); efl_ui_nstate_activate(obj); if (sd->statep) *sd->statep = efl_ui_nstate_value_get(obj); --- src/lib/elementary/efl_ui_check.c | 2 ++ src/lib/elementary/efl_ui_nstate.c | 18 ++ 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/lib/elementary/efl_ui_check.c b/src/lib/elementary/efl_ui_check.c index d36cdb0b1a..d119a8e6b9 100644 --- a/src/lib/elementary/efl_ui_check.c +++ b/src/lib/elementary/efl_ui_check.c @@ -75,6 +75,8 @@ _activate(Evas_Object *obj) _elm_access_say(E_("State: Off")); } + efl_event_callback_legacy_call(obj, EFL_UI_CHECK_EVENT_CHANGED, NULL); + if (_elm_config->atspi_mode) efl_access_state_changed_signal_emit(obj, EFL_ACCESS_STATE_CHECKED, diff --git a/src/lib/elementary/efl_ui_nstate.c b/src/lib/elementary/efl_ui_nstate.c index c83ebfc8e4..5896826d09 100644 --- a/src/lib/elementary/efl_ui_nstate.c +++ b/src/lib/elementary/efl_ui_nstate.c @@ -63,18 +63,6 @@ _next_state_set(Efl_Ui_Nstate_Data *sd) if (sd->state == sd->nstate) sd->state = 0; } -static void -_state_active(Evas_Object *obj, Efl_Ui_Nstate_Data *sd) -{ - char buf[64]; - - sprintf(buf, "elm,state,changed,%d", sd->state); - elm_layout_signal_emit(obj, buf, "elm"); - edje_object_message_signal_process(elm_layout_edje_get(obj)); - elm_layout_sizing_eval(obj); - efl_event_callback_legacy_call(obj, EFL_UI_NSTATE_EVENT_CHANGED, NULL); -} - EOLIAN static int _efl_ui_nstate_count_get(Eo *obj EINA_UNUSED, Efl_Ui_Nstate_Data *pd) { @@ -106,12 +94,11 @@ _is_valid_state(Efl_Ui_Nstate_Data *sd, int state) } EOLIAN static void -_efl_ui_nstate_value_set(Eo *obj, Efl_Ui_Nstate_Data *pd, int state) +_efl_ui_nstate_value_set(Eo *obj EINA_UNUSED, Efl_Ui_Nstate_Data *pd, int state) { if (!_is_valid_state(pd, state)) return; pd->state = state; - _state_active(obj, pd); } EOLIAN static Efl_Ui_Theme_Apply @@ -133,10 +120,9 @@ _key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED) } EOLIAN static void -_efl_ui_nstate_activate(Eo *obj, Efl_Ui_Nstate_Data *_pd) +_efl_ui_nstate_activate(Eo *obj EINA_UNUSED, Efl_Ui_Nstate_Data *_pd) { _next_state_set(_pd); - _state_active(obj, _pd); } EOLIAN static void --
[EGIT] [core/efl] master 01/01: elm: do not call "changed" callback when setting style
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b1ee35e35ce3132566244abbbd3a804167ef9c00 commit b1ee35e35ce3132566244abbbd3a804167ef9c00 Author: Shinwoo Kim <cinoo@samsung.com> Date: Tue Feb 6 22:38:14 2018 +0900 elm: do not call "changed" callback when setting style --- src/lib/elementary/efl_ui_nstate.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/lib/elementary/efl_ui_nstate.c b/src/lib/elementary/efl_ui_nstate.c index a555cbcd89..c83ebfc8e4 100644 --- a/src/lib/elementary/efl_ui_nstate.c +++ b/src/lib/elementary/efl_ui_nstate.c @@ -19,7 +19,6 @@ typedef struct } Efl_Ui_Nstate_Data; static Eina_Bool _key_action_activate(Evas_Object *obj, const char *params); -static void _state_active(Evas_Object *obj, Efl_Ui_Nstate_Data *sd); static const Elm_Action key_actions[] = { {"activate", _key_action_activate}, @@ -116,15 +115,13 @@ _efl_ui_nstate_value_set(Eo *obj, Efl_Ui_Nstate_Data *pd, int state) } EOLIAN static Efl_Ui_Theme_Apply -_efl_ui_nstate_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Nstate_Data *pd) +_efl_ui_nstate_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Nstate_Data *pd EINA_UNUSED) { Efl_Ui_Theme_Apply int_ret = EFL_UI_THEME_APPLY_FAILED; int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS)); if (!int_ret) return EFL_UI_THEME_APPLY_FAILED; - _state_active(obj, pd); - return int_ret; } --
[EGIT] [core/efl] master 01/01: elm: Fix typo checking ecore_evas for efl_access_component_extents
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=5d8f2df24bdaf76587cc50ebe8e7d9a5836355ed commit 5d8f2df24bdaf76587cc50ebe8e7d9a5836355ed Author: Shinwoo Kim <cinoo@samsung.com> Date: Mon Jan 22 22:07:57 2018 +0900 elm: Fix typo checking ecore_evas for efl_access_component_extents --- src/lib/elementary/efl_access_component.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_access_component.c b/src/lib/elementary/efl_access_component.c index c53c51f294..a8c36429e9 100644 --- a/src/lib/elementary/efl_access_component.c +++ b/src/lib/elementary/efl_access_component.c @@ -106,7 +106,7 @@ _efl_access_component_extents_get(Eo *obj, void *_pd EINA_UNUSED, Eina_Bool scre if (screen_coords) { Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj)); -if (!ee) +if (ee) { int ee_x = 0, ee_y = 0; ecore_evas_geometry_get(ee, _x, _y, NULL, NULL); --
[EGIT] [core/efl] master 01/01: ecore_evas_wayland: handle 0x0 content problem
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b27949dafb4a3f234e5633d65cdd5e50dd48a770 commit b27949dafb4a3f234e5633d65cdd5e50dd48a770 Author: Shinwoo Kim <cinoo@samsung.com> Date: Tue Apr 10 20:38:47 2018 +0900 ecore_evas_wayland: handle 0x0 content problem Someone could NOT use elementary and use ecore_evas only. In this case, content size which is defined by elementary is 0x0. If content size is 0x0, then frame size is equal to window size. But the frame size is defined by elementary as well. So if there is not a content, then the frame size should be 0. --- .../ecore_evas/engines/wayland/ecore_evas_wayland_common.c| 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c index b8f103b030..a6434502d0 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c @@ -517,8 +517,8 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_ nw = ev->w; nh = ev->h; - pfw = fw = wdata->win->set_config.geometry.w - wdata->content.w; - pfh = fh = wdata->win->set_config.geometry.h - wdata->content.h; + pfw = fw = wdata->content.w ? wdata->win->set_config.geometry.w - wdata->content.w : 0; + pfh = fh = wdata->content.h ? wdata->win->set_config.geometry.h - wdata->content.h : 0; if ((prev_max != ee->prop.maximized) || (prev_full != ee->prop.fullscreen) || @@ -526,8 +526,8 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_ { state_change = EINA_TRUE; _ecore_evas_wl_common_state_update(ee); -fw = wdata->win->set_config.geometry.w - wdata->content.w; -fh = wdata->win->set_config.geometry.h - wdata->content.h; +fw = wdata->content.w ? wdata->win->set_config.geometry.w - wdata->content.w : 0; +fh = wdata->content.h ? wdata->win->set_config.geometry.h - wdata->content.h : 0; } if ((!nw) && (!nh)) --
[EGIT] [core/efl] master 01/01: Fix static analysis result
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=3cd2243028f80960d3fe0b464f84514f609bab51 commit 3cd2243028f80960d3fe0b464f84514f609bab51 Author: Shinwoo Kim <kimci...@gmail.com> Date: Thu Apr 5 13:18:03 2018 +0900 Fix static analysis result [Dereference after null check] (1) src/lib/ecore/ecore_main.c - _efl_loop_handler_efl_object_finalize checks if pd->loop_data is NULL. After that, _handler_reset > _handler_clear > _ecore_main_fd_handler_del > _ecore_main_fdh_pool_del is directly dereferencing pd->pool_data. - _efl_loop_handler_efl_object_parent_set checks if pd->loop_data as well. Then it calls _handler_reset as well. (2) src/lib/ecore_wayland/ecore_wl_dnd.c - ecore_wl_dnd_selection_set checks if t - result of wl_array_add - is NULL. And it is dereferecing t directly for wl_data_source_offer. (3) src/lib/elementary/efl_ui_dnd.c - Third parameter const char *data could be NULL. In this case strlen dereferences NULL. The data should be non NULL value. I have checked this with Mr. Thiep Ha. (4) src/lib/evas/canvas/evas_object_inform.c - _efl_canvas_object_efl_gfx_stack_stack_below checks if obj->layer is NULL. So it could call evas_object_inform_call_call_restack which is dereferencing obj->layer directly. --- src/lib/ecore/ecore_main.c | 6 ++ src/lib/ecore_wayland/ecore_wl_dnd.c | 7 +-- src/lib/elementary/efl_ui_dnd.c | 1 + src/lib/evas/canvas/evas_object_inform.c | 3 ++- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c index 738677c22a..7801dd5feb 100644 --- a/src/lib/ecore/ecore_main.c +++ b/src/lib/ecore/ecore_main.c @@ -425,6 +425,12 @@ _ecore_main_fdh_poll_del(Efl_Loop_Data *pd, Ecore_Fd_Handler *fdh) if (!_dl_uv_run) # endif { +if (!pd) + { + WRN("Efl_Loop_Data is NULL!"); + return; + } + if ((!fdh->file) && (pd->epoll_fd >= 0)) { struct epoll_event ev; diff --git a/src/lib/ecore_wayland/ecore_wl_dnd.c b/src/lib/ecore_wayland/ecore_wl_dnd.c index a7694c1587..48c121ffa6 100644 --- a/src/lib/ecore_wayland/ecore_wl_dnd.c +++ b/src/lib/ecore_wayland/ecore_wl_dnd.c @@ -170,8 +170,11 @@ ecore_wl_dnd_selection_set(Ecore_Wl_Input *input, const char **types_offered) for (type = types_offered; *type; type++) { t = wl_array_add(>data_types, sizeof(*t)); -if (t) *t = strdup(*type); -wl_data_source_offer(input->data_source, *t); +if (t) + { + *t = strdup(*type); + wl_data_source_offer(input->data_source, *t); + } } /* add a listener for data source events */ diff --git a/src/lib/elementary/efl_ui_dnd.c b/src/lib/elementary/efl_ui_dnd.c index d0a1df79ee..c70a80ceba 100644 --- a/src/lib/elementary/efl_ui_dnd.c +++ b/src/lib/elementary/efl_ui_dnd.c @@ -307,6 +307,7 @@ elm_drag_start(Evas_Object *obj, Elm_Sel_Format format, const char *data, Elm_Drag_Accept drag_accept_cb, void *drag_accept_data, Elm_Drag_State drag_done_cb, void *drag_done_data) { + if (!data) return EINA_FALSE; Eo *sel_man = _selection_manager_get(obj); int seatid = 1; Eina_Slice sl; diff --git a/src/lib/evas/canvas/evas_object_inform.c b/src/lib/evas/canvas/evas_object_inform.c index 1057cb92e6..cdfa88b6bf 100644 --- a/src/lib/evas/canvas/evas_object_inform.c +++ b/src/lib/evas/canvas/evas_object_inform.c @@ -46,7 +46,8 @@ evas_object_inform_call_restack(Evas_Object *eo_obj, Evas_Object_Protected_Data int event_id = _evas_object_event_new(); evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_RESTACK, NULL, event_id, EFL_GFX_EVENT_RESTACK); - _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas, event_id); + if (obj->layer) + _evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas, event_id); } void --
[EGIT] [core/efl] master 01/01: efl_io_queue: add null check for slice->mem
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=579eeb4a8c68967432ddbaa23ddc675e9b64c6b1 commit 579eeb4a8c68967432ddbaa23ddc675e9b64c6b1 Author: Shinwoo Kim <cinoo@samsung.com> Date: Tue Apr 10 16:13:44 2018 +0900 efl_io_queue: add null check for slice->mem A negative test case leads to segmentation fault. If ecore_evas_msg_parent_send is called with NULL data, then slice->mem would be NULL, and _efl_io_queue_efl_io_writer_write calls memcpy with NULL src. --- src/lib/efl/interfaces/efl_io_queue.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/efl/interfaces/efl_io_queue.c b/src/lib/efl/interfaces/efl_io_queue.c index 80bc0636fe..d073836c93 100644 --- a/src/lib/efl/interfaces/efl_io_queue.c +++ b/src/lib/efl/interfaces/efl_io_queue.c @@ -375,6 +375,7 @@ _efl_io_queue_efl_io_writer_write(Eo *o, Efl_Io_Queue_Data *pd, Eina_Slice *slic int err = EINVAL; EINA_SAFETY_ON_NULL_RETURN_VAL(slice, EINVAL); + EINA_SAFETY_ON_NULL_RETURN_VAL(slice->mem, EINVAL); EINA_SAFETY_ON_TRUE_GOTO(efl_io_closer_closed_get(o), error); err = EBADF; --
[EGIT] [core/efl] master 01/01: evas_image_main: make the cache->usage count eina_file size
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f802c8f482cc3f7f1d2f94f7c9377feffbe0ed3f commit f802c8f482cc3f7f1d2f94f7c9377feffbe0ed3f Author: Shinwoo Kim Date: Fri Oct 26 19:16:32 2018 +0900 evas_image_main: make the cache->usage count eina_file size Summary: The image.data is set to null by evas_common_rgba_image_unload_real. After this point the cache->usage does not count cache_entry.w and h value when evas_gl_common_image_free calls evas_cache_image_flush. So the cache->usage increases just around 300. If the cache->limit is 4194304, then the cache could have around 1398 items. This would be fine. But each items hold eina_file, and the cache does not count eina_file size. If the file size is 326352, then a process could use 456527385 bytes. So this patch set make the cache->usage count eina_file size. This would be better option than https://phab.enlightenment.org/D7029 Reviewers: Hermet, jypark, cedric Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7030 --- src/lib/evas/common/evas_image_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/evas/common/evas_image_main.c b/src/lib/evas/common/evas_image_main.c index f99e76aa77..2403a75e2b 100644 --- a/src/lib/evas/common/evas_image_main.c +++ b/src/lib/evas/common/evas_image_main.c @@ -840,6 +840,7 @@ _evas_common_rgba_image_ram_usage(Image_Entry *ie) if (ie->cache_key) size += strlen(ie->cache_key); if (ie->file) size += strlen(ie->file); if (ie->key) size += strlen(ie->key); + if (ie->f && eina_file_virtual(ie->f)) size += eina_file_size_get(ie->f); if (im->image.data) { --
[EGIT] [core/efl] master 01/01: evas map: calc map geometry when it is out of screen
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=8a7817cdd9e3a347c301370c2d401a4c5691b6d8 commit 8a7817cdd9e3a347c301370c2d401a4c5691b6d8 Author: Shinwoo Kim Date: Tue Nov 27 11:21:51 2018 +0900 evas map: calc map geometry when it is out of screen Summary: The map geometry(cur.map->normal_geometry) is calculated only if evas_render_updates_internal_loop calls evas_render_mapped as below. evas_render_mapped -> evas_object_map_update -> evas_object_map_update -> _evas_map_calc_map_geometry If the mapped object is not on screen, then evas_render_updates_internal_loop does not call evas_render_mapped, because the mapped object is not active. The mapped object is not active(i.e. is_active is 0) always because cache.clip data including visilbe and geometry is not updated after the object goes out of screen. Usually the unmapped object updates its cache.clip data with updated geometry even though it is out of screen as below. _efl_canvas_object_efl_gfx_entity_position_set -> evas_object_recalc_clippees -> evas_object_clip_recalc -> evas_object_clip_recalc_do So the mapped object geometry(cur.map->normal_geometry) should be updated in evas_object_clip_recalc_do if it is out of screen. Test Plan: Sample code {F3455674} {F3455673} {F3455672} {F3455671} Reviewers: Hermet, jypark Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7344 --- src/lib/evas/canvas/evas_object_main.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c index e0f02da945..69e2fcf219 100644 --- a/src/lib/evas/canvas/evas_object_main.c +++ b/src/lib/evas/canvas/evas_object_main.c @@ -364,11 +364,29 @@ evas_object_clip_recalc_do(Evas_Object_Protected_Data *obj, Evas_Object_Protecte int cx, cy, cw, ch, cr, cg, cb, ca; int nx, ny, nw, nh, nr, ng, nb, na; Eina_Bool cvis, nvis; + Evas_Public_Data *e; evas_object_coords_recalc(obj->object, obj); if (EINA_UNLIKELY((!!obj->map) && (obj->map->cur.map) && (obj->map->cur.usemap))) { +e = obj->layer->evas; +if (!evas_object_is_active(obj->object, obj) && +((obj->map->cur.map->normal_geometry.x + + obj->map->cur.map->normal_geometry.w <= 0) || + (obj->map->cur.map->normal_geometry.y + + obj->map->cur.map->normal_geometry.h <= 0) || + (obj->map->cur.map->normal_geometry.x >= e->output.w) || + obj->map->cur.map->normal_geometry.y >= e->output.h)) + { + /* out of screen, but need to calc map geometry to update cache */ + cy = obj->map->cur.map->normal_geometry.y; + cx = obj->map->cur.map->normal_geometry.x; + cw = obj->cur->geometry.w; + ch = obj->cur->geometry.h; + evas_object_map_update(obj->object, cx, cy, cw, ch, cw, ch); + } + cx = obj->map->cur.map->normal_geometry.x; cy = obj->map->cur.map->normal_geometry.y; cw = obj->map->cur.map->normal_geometry.w; --
[EGIT] [core/efl] master 02/03: eina_vpath_vdg: free locally allocated memory before return
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=fe036fd67f3b6d90021c71b981cb42f15264972a commit fe036fd67f3b6d90021c71b981cb42f15264972a Author: Shinwoo Kim Date: Fri Sep 21 03:11:24 2018 + eina_vpath_vdg: free locally allocated memory before return The eina_vpath_resolve could allocate memory and return it. But the eina_xdg_env_init does not release it. *Detected by static analysis with the Coverity Differential Revision: https://phab.enlightenment.org/D7066 --- src/lib/eina/eina_vpath_xdg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/eina/eina_vpath_xdg.c b/src/lib/eina/eina_vpath_xdg.c index 6a1d4d8248..2d533040fa 100644 --- a/src/lib/eina/eina_vpath_xdg.c +++ b/src/lib/eina/eina_vpath_xdg.c @@ -15,10 +15,10 @@ eina_xdg_env_init(void) { char buf[PATH_MAX]; char *s; - const char *home; + char home[PATH_MAX]; Eina_Vpath_Interface_User user; - home = eina_vpath_resolve("(:home:)/"); + eina_vpath_resolve_snprintf(home, sizeof(home), "(:home:)/"); memset(, 0, sizeof(Eina_Vpath_Interface_User)); --
[EGIT] [core/efl] master 01/01: evas_object_smart: fix dereference of null
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=040bef8f13932db69f7e8f70c9964aed3591bf87 commit 040bef8f13932db69f7e8f70c9964aed3591bf87 Author: Shinwoo Kim Date: Fri Sep 21 16:46:03 2018 +0900 evas_object_smart: fix dereference of null Summary: The cso could b NULL so we need to check if the cso is NULL or not before dereferencing it. Reviewers: jpeg, Hermet, jypark Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7075 --- src/lib/evas/canvas/evas_object_smart.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c index a0e1e1108b..52ad3cd7f0 100644 --- a/src/lib/evas/canvas/evas_object_smart.c +++ b/src/lib/evas/canvas/evas_object_smart.c @@ -581,16 +581,21 @@ evas_object_smart_members_get_direct(const Evas_Object *eo_obj) static void _efl_canvas_group_group_members_all_del_internal(Evas_Smart_Data *o) { - Evas_Object_Smart_Clipped_Data *cso = o->clipped ? o->data : NULL; + Evas_Object *clipper; Evas_Object_Protected_Data *memobj; Eina_Inlist *itrn; - EINA_INLIST_FOREACH_SAFE(o->contained, itrn, memobj) + clipper = _smart_clipper_get(o); + if (clipper) { -if (memobj->object != cso->clipper) - _evas_wrap_del(>object, memobj); +EINA_INLIST_FOREACH_SAFE(o->contained, itrn, memobj) + { + if (memobj->object != clipper) + _evas_wrap_del(>object, memobj); + } +_evas_wrap_del(, efl_data_scope_get(clipper, EFL_CANVAS_OBJECT_CLASS)); } - _evas_wrap_del(>clipper, efl_data_scope_get(cso->clipper, EFL_CANVAS_OBJECT_CLASS)); + o->group_del_called = EINA_TRUE; } --
[EGIT] [core/efl] master 01/01: tests: fix a build error on the 0.12.0 check
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f84408e3253e2573d71bbf0939e6ecc1e44f6e3a commit f84408e3253e2573d71bbf0939e6ecc1e44f6e3a Author: Shinwoo Kim Date: Tue Sep 4 14:58:10 2018 +0900 tests: fix a build error on the 0.12.0 check Summary: (1) EFL_START_TEST(TEST_NAME) is defined as follows if you are using the 0.12.0 check: START_TEST(TEST_NAME) \ _timing_start(); (2) START_TEST(__testname) is defined as follows (To make it simple I am using 'blah-blah' here): static void __testname_fn (blah-blah);\ static const TTest __testname_ttest = { blah-blah };\ static const TTest * __testname = & __testname_ttest;\ static void __testname_fn (blah-blah) For example we are using as follows in a test case: EFL_START_TEST(evas_object_smart_paragraph_direction) { ... } EFL_END_TEST This made a build error. Test Plan: make check Reviewers: Hermet, zmike Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6969 --- src/tests/efl_check.h | 2 ++ src/tests/eio/eio_suite.c | 2 ++ src/tests/elementary/elm_code_test_indent.c | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tests/efl_check.h b/src/tests/efl_check.h index d1a064943b..29c9aeeb01 100644 --- a/src/tests/efl_check.h +++ b/src/tests/efl_check.h @@ -207,10 +207,12 @@ _timing_end(void) # define EFL_START_TEST(TEST_NAME) \ START_TEST(TEST_NAME) \ + { \ _timing_start(); # define EFL_END_TEST \ _timing_end(); \ + } \ END_TEST #else diff --git a/src/tests/eio/eio_suite.c b/src/tests/eio/eio_suite.c index 9998e1fac4..45ea556639 100644 --- a/src/tests/eio/eio_suite.c +++ b/src/tests/eio/eio_suite.c @@ -10,6 +10,8 @@ #include EFL_START_TEST(eio_init_test) +{ +} EFL_END_TEST static void diff --git a/src/tests/elementary/elm_code_test_indent.c b/src/tests/elementary/elm_code_test_indent.c index 6b564420f0..b27f1a0834 100644 --- a/src/tests/elementary/elm_code_test_indent.c +++ b/src/tests/elementary/elm_code_test_indent.c @@ -184,7 +184,7 @@ EFL_START_TEST (elm_code_indent_tab_matching_braces) elm_code_free(code); elm_shutdown(); } -END_TEST +EFL_END_TEST EFL_START_TEST (elm_code_indent_startswith_keyword) { --
[EGIT] [core/efl] master 01/01: ecore_event: initialize uninitialized variable
netstar pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ad97989b28dff5744fdbe66943fa20789a5c2d2a commit ad97989b28dff5744fdbe66943fa20789a5c2d2a Author: Shinwoo Kim Date: Tue Sep 4 11:54:17 2018 +0100 ecore_event: initialize uninitialized variable Summary: The following commit (1) made an abort (2) (1) commit d1e4c6bab84e55837a70b8883a28e7eb6d49db09 Author: Jean Guyomarc'h Date: Mon Aug 27 12:04:35 2018 +0900 ecore: fix built-in event types generation (2) abort /lib/x86_64-linux-gnu/libc.so.6(+0x777e5) /lib/x86_64-linux-gnu/libc.so.6(+0x8037a) /lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c) /home/kimcinoo/install/lib/libecore.so.1(+0x237d7) /home/kimcinoo/install/lib/libeo.so.1(efl_destructor+0x64) /home/kimcinoo/install/lib/libeo.so.1(+0x18029) /home/kimcinoo/install/lib/libeo.so.1(efl_unref+0x44c) /home/kimcinoo/install/lib/libecore.so.1(+0x201f2) /home/kimcinoo/install/lib/libecore.so.1(ecore_shutdown+0x145) /home/kimcinoo/Upstream/efl/src/tests/ecore/.libs/lt-efl_app_suite(+0xb85d) /home/kimcinoo/install/lib/libcheck.so.0(srunner_run_tagged+0xa13) /home/kimcinoo/Upstream/efl/src/tests/ecore/.libs/lt-efl_app_suite(+0xead9) /home/kimcinoo/Upstream/efl/src/tests/ecore/.libs/lt-efl_app_suite(+0x4ade) /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) /home/kimcinoo/Upstream/efl/src/tests/ecore/.libs/lt-efl_app_suite And following commit (3) fixed the abort. (3) commit 3f306491a32a1880bccfe64861b5fec2ba09049b Author: Yeongjong Lee Date: Mon Sep 3 15:55:13 2018 + ecore_event: fix ecore event handler iterator range The above commit fixed the abort though, we could access uninitialized memory and make another abort again. This would prevent such unwanted case. Reviewers: Hermet, YOhoho, bu5hm4n, netstar Reviewed By: netstar Subscribers: netstar, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6970 --- src/lib/ecore/ecore_event_message_handler.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/ecore/ecore_event_message_handler.c b/src/lib/ecore/ecore_event_message_handler.c index 6df1227cf0..60ab2c9395 100644 --- a/src/lib/ecore/ecore_event_message_handler.c +++ b/src/lib/ecore/ecore_event_message_handler.c @@ -134,6 +134,7 @@ _ecore_event_message_handler_type_new(Eo *obj EINA_UNUSED, Ecore_Event_Message_H tmp = realloc(pd->handlers, sizeof(Eina_Inlist *) * (evnum + 1)); if (!tmp) return 0; pd->handlers = tmp; + pd->handlers[ECORE_EVENT_NONE] = NULL; pd->handlers[evnum] = NULL; pd->event_type_count = evnum; return evnum; --
[EGIT] [core/efl] master 01/02: Efl.Canvas.Group: use desired function
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=9666f288ae606f181f676ad1768864d830d29ee3 commit 9666f288ae606f181f676ad1768864d830d29ee3 Author: Shinwoo Kim Date: Thu Aug 2 09:10:41 2018 -0400 Efl.Canvas.Group: use desired function Summary: If a smart class overrides Evas_Smart_Class.move as below, then original behavior must not be used for the smart class. Evas_Smart_Class sc = EVAS_SMART_CLASS_INIT_NAME_VERSION("MyClass"); evas_object_smart_clipped_smart_set(); sc.move = But current implementation makes original behavior work. So before using the original method, this patch is checking if the original method is changed or not. Reviewers: zmike, devilhorns Reviewed By: zmike Subscribers: woohyun, jypark, cedric, raster, jpeg, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6468 --- src/lib/evas/canvas/evas_object_smart.c | 9 - src/lib/evas/canvas/evas_object_smart_clipped.c | 2 +- src/lib/evas/include/evas_private.h | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c index 37c8868479..6223792cae 100644 --- a/src/lib/evas/canvas/evas_object_smart.c +++ b/src/lib/evas/canvas/evas_object_smart.c @@ -888,10 +888,17 @@ _efl_canvas_group_efl_gfx_entity_visible_set(Eo *eo_obj, Evas_Smart_Data *o, Ein EOLIAN static void _efl_canvas_group_efl_gfx_entity_position_set(Eo *eo_obj, Evas_Smart_Data *o, Eina_Position2D pos) { + Eina_Bool is_overridden; + Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj); + if (_evas_object_intercept_call(eo_obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y)) return; - if (o->clipped) + is_overridden = (obj->is_smart && obj->smart.smart && +obj->smart.smart->smart_class->move != +(void *)evas_object_smart_clipped_smart_move); + + if (o->clipped && !is_overridden) _evas_object_smart_clipped_smart_move_internal(eo_obj, pos.x, pos.y); efl_gfx_entity_position_set(efl_super(eo_obj, MY_CLASS), pos); } diff --git a/src/lib/evas/canvas/evas_object_smart_clipped.c b/src/lib/evas/canvas/evas_object_smart_clipped.c index 60cdc78e7d..a904479c01 100644 --- a/src/lib/evas/canvas/evas_object_smart_clipped.c +++ b/src/lib/evas/canvas/evas_object_smart_clipped.c @@ -33,7 +33,7 @@ evas_object_smart_clipped_smart_del(Evas_Object *eo_obj) cso->clipper = NULL; } -static void +void evas_object_smart_clipped_smart_move(Evas_Object *eo_obj, Evas_Coord x, Evas_Coord y) { if (!efl_isa(eo_obj, EFL_CANVAS_GROUP_CLASS)) return; diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h index a63194df3f..b149c0b19e 100644 --- a/src/lib/evas/include/evas_private.h +++ b/src/lib/evas/include/evas_private.h @@ -1633,6 +1633,7 @@ const Eina_List *evas_object_event_grabber_members_list(const Eo *eo_obj); const Eina_Inlist *evas_object_smart_members_get_direct(const Evas_Object *obj); void _efl_canvas_group_group_members_all_del(Evas_Object *eo_obj); void _evas_object_smart_clipped_init(Evas_Object *eo_obj); +void evas_object_smart_clipped_smart_move(Evas_Object *eo_obj, Evas_Coord x, Evas_Coord y); void _evas_object_smart_clipped_smart_move_internal(Evas_Object *eo_obj, Evas_Coord x, Evas_Coord y); void evas_call_smarts_calculate(Evas *e); void evas_object_smart_bounding_box_update(Evas_Object_Protected_Data *obj); --
[EGIT] [core/efl] master 01/01: evas_image: do not render while preloading
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=117a0ca298d97ce95a031c919f0fa9aa92f651aa commit 117a0ca298d97ce95a031c919f0fa9aa92f651aa Author: Shinwoo Kim Date: Wed Aug 8 13:51:40 2018 +0900 evas_image: do not render while preloading Summary: Unexpected image shows if image data is not ready. Even though there is a change to check the 'preloading' in pre_render phase, evas_object_image_render is called. So we need to check here as well. Reference: https://phab.enlightenment.org/D6739 It seems that the 'preloading' is not enough. The 'preloading' could be reset to FALSE by _evas_image_load_async_cancel > _image_preload_internal. If the following step happens, then this patch set is neccessary. (1) evas_object_image_pre_render (2) _evas_iamge_load_async_start (3) evas_object_image_render I could not find out what the correct step, but it actullay happens. The evas_object_image_render could be called with the 'preloading' TURE. Reviewers: Hermet Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers, zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6778 --- src/lib/evas/canvas/evas_object_image.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index c5bdc58184..22c1c7d99c 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -1749,6 +1749,9 @@ evas_object_image_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, v { Evas_Image_Data *o = type_private_data; + /* image is not ready yet, skip rendering. Leave it to next frame */ + if (o->preloading) return; + if ((o->cur->fill.w < 1) || (o->cur->fill.h < 1)) return; /* no error message, already printed in pre_render */ --
[EGIT] [core/efl] master 01/01: test/evas: add to check smart class overriding
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=355effed5f53e8df37712d72d80968e4cd2e38c1 commit 355effed5f53e8df37712d72d80968e4cd2e38c1 Author: Shinwoo Kim Date: Mon Aug 6 16:21:55 2018 +0900 test/evas: add to check smart class overriding Summary: If Evas_Smart_Class.move is overridden, then user defined move function should be used. Check if "https://phab.enlightenment.org/D6468; works or not. Reviewers: zmike Subscribers: cedric, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6740 --- src/tests/evas/evas_test_object_smart.c | 39 + 1 file changed, 39 insertions(+) diff --git a/src/tests/evas/evas_test_object_smart.c b/src/tests/evas/evas_test_object_smart.c index 287c673291..dd72980cd0 100644 --- a/src/tests/evas/evas_test_object_smart.c +++ b/src/tests/evas/evas_test_object_smart.c @@ -175,7 +175,46 @@ EFL_START_TEST(evas_object_smart_paragraph_direction) } EFL_END_TEST + +void +_move_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) +{ + ck_abort_msg("This function should be not called"); +} + +EFL_START_TEST(evas_object_smart_clipped_smart_move) +{ + Evas *evas; + Evas_Smart *smart; + Evas_Object *smart_obj, *smart_child; + + evas = _setup_evas(); + + Evas_Smart_Class sc = EVAS_SMART_CLASS_INIT_NAME_VERSION("MyClass"); + evas_object_smart_clipped_smart_set(); + sc.move = NULL; + + smart = evas_smart_class_new(); + fail_if(!smart); + + smart_obj = evas_object_smart_add(evas, smart); + fail_if(!smart_obj); + + smart_child = evas_object_box_add(evas); + evas_object_smart_member_add(smart_child, smart_obj); + + evas_object_event_callback_add(smart_child, EVAS_CALLBACK_MOVE, _move_cb, NULL); + evas_object_move(smart_obj, 100, 100); + + evas_object_smart_member_del(smart_child); + evas_object_del(smart_child); + evas_object_del(smart_obj); + evas_free(evas); +} +EFL_END_TEST + void evas_test_object_smart(TCase *tc) { tcase_add_test(tc, evas_object_smart_paragraph_direction); + tcase_add_test(tc, evas_object_smart_clipped_smart_move); } --
[EGIT] [core/efl] master 01/03: eina_file: check copied using copied
discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=cbe9b6f7700aaa3c87a203e69b5ab543cee68c20 commit cbe9b6f7700aaa3c87a203e69b5ab543cee68c20 Author: Shinwoo Kim Date: Fri Aug 17 12:42:18 2018 -0400 eina_file: check copied using copied Summary: From (1) "the following commit" message, the changed condition in this patch should check if the virtualized file is copied or not. In eina_file_virtualize head_padded = 16 * ((sizeof(Eina_File) + slen + 15) / 16); file->global_map = ((char *)file) + head_padded; In eina_file_dup file->global_map != (void*)(file->filename + strlen(file->filename) + 1) Because of this discord condition makes eina_file_dup copies always. (1) This is "the following commit": commit 4766316935589b6191e047ad697ab10ae2027a43 Author: Cedric Bail Date: Wed Mar 8 10:13:36 2017 -0800 eina: force copy of not copied virtualized file while doing an eina_file_dup. The other way around is pretty much impossible as you don't know who does an eina_file_dup and for how long they keep there reference. T5234 Reviewers: zmike, Hermet Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6857 --- src/lib/eina/eina_file_common.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/lib/eina/eina_file_common.c b/src/lib/eina/eina_file_common.c index 3de42523ca..c87b7d94aa 100644 --- a/src/lib/eina/eina_file_common.c +++ b/src/lib/eina/eina_file_common.c @@ -474,18 +474,16 @@ eina_file_dup(const Eina_File *f) { EINA_FILE_MAGIC_CHECK(f, NULL); eina_lock_take(>lock); -if (file->virtual) + +// For ease of use and safety of the API, if you dup a virtualized file, we prefer to make a copy +if (file->virtual && !file->copied) { - // For ease of use and safety of the API, if you dup a virtualized file, we prefer to make a copy - if (file->global_map != (void*)(file->filename + strlen(file->filename) + 1)) - { - Eina_File *r; + Eina_File *r; - r = eina_file_virtualize(file->filename, file->global_map, file->length, EINA_TRUE); - eina_lock_release(>lock); + r = eina_file_virtualize(file->filename, file->global_map, file->length, EINA_TRUE); + eina_lock_release(>lock); - return r; - } + return r; } file->refcount++; eina_lock_release(>lock); --
[EGIT] [core/efl] master 01/01: elm/win: check object class before using it
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=1c0f878fa6e02d930b3a88ad7281889cc15da145 commit 1c0f878fa6e02d930b3a88ad7281889cc15da145 Author: Shinwoo Kim Date: Mon Aug 20 16:19:02 2018 +0900 elm/win: check object class before using it Summary: elm_win_focus_get with non Efl.Ui.Win object could return incorrect value. If an object implements Efl.Ui.Focus.Object.focus { get; } then the return value of elm_win_focus_get with this object depends upon the object status. Reviewers: Hermet, YOhoho Reviewed By: YOhoho Subscribers: cedric, #reviewers, #committers, zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6868 --- src/lib/elementary/efl_ui_win.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index df7094af13..29dce4dabb 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -8735,6 +8735,7 @@ elm_win_socket_listen(Efl_Ui_Win *obj, const char *svcname, int svcnum, Eina_Boo EAPI Eina_Bool elm_win_focus_get(const Efl_Ui_Win *obj) { + EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(obj, MY_CLASS), EINA_FALSE); return efl_ui_focus_object_focus_get(obj); } --
[EGIT] [core/efl] master 01/01: Elm.Mapbuf: do not set is_static_clip to its content
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=37f1a46c4a23a19e8aeece005b506dd0727f6196 commit 37f1a46c4a23a19e8aeece005b506dd0727f6196 Author: Shinwoo Kim Date: Wed Aug 29 16:05:35 2018 +0900 Elm.Mapbuf: do not set is_static_clip to its content Summary: If an object's is_static_clip is TRUE then _evas_render_phase1_object_process does not draw the object and its smart member from the below commit (1). On the other hand, the Elm.Mapbuf sets is_static_clip to its content from the below commit (2). So you cannot see the content. If the commit tried to solve over-render, it could be changed to: if (wd->content) evas_object_static_clip_set(wd->content, !wd->enabled); from: if (wd->content) evas_object_static_clip_set(wd->content, wd->enabled); or there could be another way. (1) commit 1bba6d5759d859d0db9ad5b5556883044d3a1b11 Author: Carsten Haitzler (Rasterman) Date: Wed Nov 23 13:57:27 2016 +0900 evas phase 1 process - shortcut objects that are pure static clips only these objects don't actually produce - or should produce update regions etc. etc. as the objects that are clipped should produce those. they are not active objects. so skip them very early after just ensuring they are in delete objects if needed. (2) commit 7ca0a3dcac2ee7fc7d7ae62277dde05a3b77b276 (of core/elementary.git) Author: Carsten Haitzler Date: Wed Jan 19 11:59:53 2011 + fix over-render bug in map/mapbuf and with changed flags! that was nasty to find! SVN revision: 56220 Test Plan: [Sample Code] #include EAPI_MAIN int elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED) { Evas_Object *win, *bx, *mb, *layout, *icon; unsigned int i, j; char buf[255]; elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); win = elm_win_util_standard_add("mapbuf", "Mapbuf Example"); elm_win_autodel_set(win, EINA_TRUE); bx = elm_box_add(win); evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_win_resize_object_add(win, bx); evas_object_show(bx); mb = elm_mapbuf_add(win); evas_object_size_hint_weight_set(mb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(mb, EVAS_HINT_FILL, EVAS_HINT_FILL); elm_box_pack_end(bx, mb); layout = elm_layout_add(win); evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_win_resize_object_add(win, layout); snprintf(buf, sizeof(buf), "/home/kimcinoo/Upstream/efl/src/examples/elementary/layout_example.edj"); elm_layout_file_set(layout, buf, "example/mylayout"); evas_object_show(layout); icon = elm_icon_add(win); elm_icon_standard_set(icon, "home"); evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(icon, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_show(icon); elm_object_part_content_set(layout, "example/custom", icon); elm_object_content_set(mb, layout); evas_object_show(mb); elm_mapbuf_enabled_set(mb, EINA_TRUE); evas_object_resize(win, 240, 320); evas_object_show(win); elm_run(); return 0; } ELM_MAIN() Reviewers: raster, Hermet Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers, zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6915 --- src/lib/elementary/elm_mapbuf.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/lib/elementary/elm_mapbuf.c b/src/lib/elementary/elm_mapbuf.c index 8be2124a6c..36c9a46977 100644 --- a/src/lib/elementary/elm_mapbuf.c +++ b/src/lib/elementary/elm_mapbuf.c @@ -329,8 +329,6 @@ _internal_enable_set(Eo *obj, Elm_Mapbuf_Data *sd, Eina_Bool enabled) if (sd->enabled == enabled) return; sd->enabled = enabled; - if (sd->content) evas_object_static_clip_set(sd->content, sd->enabled); - if (!sd->enabled && sd->content) { evas_object_map_set(sd->content, NULL); --
[EGIT] [core/efl] master 01/03: efl_ui_win: make win work for evas_norender
derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b447a37ed877beeb40ecbb294f34a3fbfb432379 commit b447a37ed877beeb40ecbb294f34a3fbfb432379 Author: Shinwoo Kim Date: Tue Dec 18 10:40:33 2018 + efl_ui_win: make win work for evas_norender The evas_norender updates the canvas internal objects. But efl_ui_win does not evaluate its internal objects, when evas_norender is called before showing, after resizing as below. evas_object_resize(win, 300, 600); evas_norender(evas_object_evas_get(win)); evas_object_show(win); This problem could be verified by checking if a resize function of internal object is called or not. minw,h is 0 in _elm_win_resize_objects_eval but deferred_resize_job is TRUE. evas_norender -> _window_layout_stack -> _elm_win_resize_objects_eval So if _elm_win_resize_objects_eval does not return if deferred_resize_job is TRUE even if minw,h is 0, and calls _elm_win_resize_job, then it will work. _elm_win_resize_objects_eval -> _elm_win_resize_job -> evas_object_geometry_set -> _efl_canvas_group_group_need_recalculate_set -> _window_layout_stack -> evas_object_geometry_set -> resize function. I have checked this behavior without elementary. It seems that evas_norender works between resize and show in this case. Let me share examples. ecore_evas_resize(ee, 100, 100); evas_norender(evas); ecore_evas_show(ee); Differential Revision: https://phab.enlightenment.org/D7425 --- src/lib/elementary/efl_ui_win.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index 64a78514df..aeafaf8db4 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -3564,7 +3564,7 @@ _elm_win_resize_objects_eval(Evas_Object *obj, Eina_Bool force_resize) double wx, wy; evas_object_size_hint_combined_min_get(sd->legacy.edje, , ); - if ((!minw) && (!minh)) return; + if ((!minw) && (!minh) && (!sd->deferred_resize_job)) return; // If content has a weight, make resizable efl_gfx_size_hint_weight_get(sd->legacy.edje, , ); @@ -3610,6 +3610,12 @@ _elm_win_resize_objects_eval(Evas_Object *obj, Eina_Bool force_resize) sd->tmp_updating_hints = 0; _elm_win_size_hints_update(obj, sd); + if (sd->deferred_resize_job) + _elm_win_resize_job(sd->obj); + + /* do not need to go below. if you go, ee could become 0. */ + if ((!minw) && (!minh)) return; + evas_object_geometry_get(obj, NULL, NULL, , ); w = ow; h = oh; --
[EGIT] [core/efl] master 01/01: evas cache image: compare with cached image file
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=3a89ea15b9d58f195986cb363f421782b0150272 commit 3a89ea15b9d58f195986cb363f421782b0150272 Author: Shinwoo Kim Date: Thu Aug 23 05:56:58 2018 + evas cache image: compare with cached image file As cache2 knows cached image could be not matched even though hash key is not different. Please refer to the following comment of evas_cache2_image_open. /* image we found doesn't match what's on disk (stat info wise) * so dirty the active cache entry so we never find it again. this * also implicitly guarantees that we only have 1 active copy * of an image at a given key. we wither find it and keep re-reffing * it or we dirty it and get it out */ The hash key is created base on the image file address. If the image file address to find does not equal cached image file address then it means that the cached image is no longer valid. This case could happen with the following step. (1) Call evas_object_image_memfile_set with content data A (2) Call evas_object_image_memfile_set with content data B (3) Add timer with short time (ex: 0.01 sec) (4) Delete A image, and add A image in timer callback (5) Delete B image, and add B image in timer callback Sometimes you could see image of A from the B image, because newly created image at step 5 has same address of setp 1. Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D6870 --- src/lib/evas/cache/evas_cache_image.c | 46 +-- src/tests/evas/evas_test_image.c | 103 ++ 2 files changed, 133 insertions(+), 16 deletions(-) diff --git a/src/lib/evas/cache/evas_cache_image.c b/src/lib/evas/cache/evas_cache_image.c index 52447df9d0..adc38a86ec 100644 --- a/src/lib/evas/cache/evas_cache_image.c +++ b/src/lib/evas/cache/evas_cache_image.c @@ -796,28 +796,42 @@ evas_cache_image_mmap_request(Evas_Cache_Image *cache, /* find image by key in active mmap hash */ SLKL(engine_lock); im = eina_hash_find(cache->mmap_activ, hkey); - if ((im) && (!im->load_failed)) goto on_ok; - else if ((im) && (im->load_failed)) + if (im) { -_evas_cache_image_dirty_add(im); -im = NULL; +if (im->f != f) + { + /* as active cache find - if we match in lru and its invalid, dirty */ + _evas_cache_image_dirty_add(im); + /* this image never used, so it have to be deleted */ + _evas_cache_image_entry_delete(cache, im); + im = NULL; + } +else if (!im->load_failed) goto on_ok; +else if (im->load_failed) + { + _evas_cache_image_dirty_add(im); + im = NULL; + } } /* find image by key in inactive/lru hash */ im = eina_hash_find(cache->mmap_inactiv, hkey); - if ((im) && (!im->load_failed)) - { -_evas_cache_image_lru_del(im); -_evas_cache_image_activ_add(im); -goto on_ok; - } - else if ((im) && (im->load_failed)) + if (im) { -/* as active cache find - if we match in lru and its invalid, dirty */ -_evas_cache_image_dirty_add(im); -/* this image never used, so it have to be deleted */ -_evas_cache_image_entry_delete(cache, im); -im = NULL; +if (im->f != f) + { + /* as active cache find - if we match in lru and its invalid, dirty */ + _evas_cache_image_dirty_add(im); + /* this image never used, so it have to be deleted */ + _evas_cache_image_entry_delete(cache, im); + im = NULL; + } +else if (!im->load_failed) + { + _evas_cache_image_lru_del(im); + _evas_cache_image_activ_add(im); + goto on_ok; + } } im = _evas_cache_image_entry_new(cache, hkey, NULL, f, NULL, key, lo, error); diff --git a/src/tests/evas/evas_test_image.c b/src/tests/evas/evas_test_image.c index bbe64654af..9e7da26b16 100644 --- a/src/tests/evas/evas_test_image.c +++ b/src/tests/evas/evas_test_image.c @@ -627,6 +627,108 @@ EFL_START_TEST(evas_object_image_partially_load_orientation) } EFL_END_TEST +static int +_file_to_memory(const char *filename, char **result) +{ + int size; + FILE *f; + + f = fopen(filename, "rb"); + if (f == NULL) + { +*result = NULL; +return -1; + } + + fseek(f, 0, SEEK_END); + size = ftell(f); + fseek(f, 0, SEEK_SET); + *result = (char *)malloc(size + 1); + if ((size_t)size != fread(*result, sizeof(char), size, f)) + { +free(*result); +return -1; + } + fclose(f); + (*result)[size] = 0; + return size; +} + +EFL_START_TEST(e
[EGIT] [core/efl] efl-1.21 03/04: tests: fix a build error on the 0.12.0 check
stefan pushed a commit to branch efl-1.21. http://git.enlightenment.org/core/efl.git/commit/?id=953adb8724af3301c6b91f1baa0385481e2bec04 commit 953adb8724af3301c6b91f1baa0385481e2bec04 Author: Shinwoo Kim Date: Tue Sep 4 14:58:10 2018 +0900 tests: fix a build error on the 0.12.0 check Summary: (1) EFL_START_TEST(TEST_NAME) is defined as follows if you are using the 0.12.0 check: START_TEST(TEST_NAME) \ _timing_start(); (2) START_TEST(__testname) is defined as follows (To make it simple I am using 'blah-blah' here): static void __testname_fn (blah-blah);\ static const TTest __testname_ttest = { blah-blah };\ static const TTest * __testname = & __testname_ttest;\ static void __testname_fn (blah-blah) For example we are using as follows in a test case: EFL_START_TEST(evas_object_smart_paragraph_direction) { ... } EFL_END_TEST This made a build error. Test Plan: make check Reviewers: Hermet, zmike Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6969 --- src/tests/efl_check.h | 2 ++ src/tests/eio/eio_suite.c | 2 ++ src/tests/elementary/elm_code_test_indent.c | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tests/efl_check.h b/src/tests/efl_check.h index d1a064943b..29c9aeeb01 100644 --- a/src/tests/efl_check.h +++ b/src/tests/efl_check.h @@ -207,10 +207,12 @@ _timing_end(void) # define EFL_START_TEST(TEST_NAME) \ START_TEST(TEST_NAME) \ + { \ _timing_start(); # define EFL_END_TEST \ _timing_end(); \ + } \ END_TEST #else diff --git a/src/tests/eio/eio_suite.c b/src/tests/eio/eio_suite.c index 9998e1fac4..45ea556639 100644 --- a/src/tests/eio/eio_suite.c +++ b/src/tests/eio/eio_suite.c @@ -10,6 +10,8 @@ #include EFL_START_TEST(eio_init_test) +{ +} EFL_END_TEST static void diff --git a/src/tests/elementary/elm_code_test_indent.c b/src/tests/elementary/elm_code_test_indent.c index 6b564420f0..b27f1a0834 100644 --- a/src/tests/elementary/elm_code_test_indent.c +++ b/src/tests/elementary/elm_code_test_indent.c @@ -184,7 +184,7 @@ EFL_START_TEST (elm_code_indent_tab_matching_braces) elm_code_free(code); elm_shutdown(); } -END_TEST +EFL_END_TEST EFL_START_TEST (elm_code_indent_startswith_keyword) { --
[EGIT] [core/efl] master 01/01: evas_clip: do not set clip->changed to true
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=70ae090254ff68aedaa193b5ee09200e15f03890 commit 70ae090254ff68aedaa193b5ee09200e15f03890 Author: Shinwoo Kim Date: Mon Jan 28 14:49:02 2019 +0900 evas_clip: do not set clip->changed to true Summary: [Issuse] The issue solved by this commit occurs with 'export EVAS_GL_PARTIAL_DISABLE=0'. The _efl_canvas_object_clip_set set clip->changed to true, but did not add the clip object to e->pending_objects. So there is no chance to reset it to false. (Please refer to evas_render_object_recalc.) The clip->changed is always ture so its clipees cannot change its 'changed' to true. Because if 'changed' is true, evas_object_change returns before calling evas_object_change for its clipees. (Please see evas_object_change.) So 'changed' of clipees is false always, and clipees cannot call render_pre in _evas_render_phase1_direct, and eglSwapBuffersWithDamage is not called. This caused rendering issue. This could be rare case. The _efl_canvas_object_clip_set is called when the clipper and its clipees are out of view. [Solution] I would like to explain why removing line setting clip->changed to true makes sense. First, the following commit added line setting clip->changed to true. (1) committ 5e8d46e884930f109a28147cda4ce002e6836017 Author: Carsten Haitzler Date: Wed Sep 22 04:37:51 2004 + clip bug fix :) And following commit removed line calling evas_damage_rectangle_add which is part of commit (1) above. (2) commit 8767a80b0dbda4e2c3a6b2a41a04bf35f43a3ed1 Author: Carsten Haitzler (Rasterman) Date: Wed Apr 16 16:14:16 2014 +0900 fix overdraw issue in evas when clips change Between above two commits, another commit calling evas_object_change(clip) was added. This commit sets clip->changed to ture, and adds clip object to e->pending_objects by evas_object_change -> evas_render_object_recalc. (3) commit 4aca7949f581eaaf943785759b542acd8fc6794c Author: Carsten Haitzler Date: Wed Nov 2 04:03:55 2005 + fix excess overdraw bug So we do not need the remains of commit (1). REMOVE!! :-] Reviewers: raster, Hermet, jypark Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7767 --- src/lib/evas/canvas/evas_clip.c | 16 1 file changed, 16 deletions(-) diff --git a/src/lib/evas/canvas/evas_clip.c b/src/lib/evas/canvas/evas_clip.c index 54c021f1b2..b4af44edc6 100644 --- a/src/lib/evas/canvas/evas_clip.c +++ b/src/lib/evas/canvas/evas_clip.c @@ -353,22 +353,6 @@ _efl_canvas_object_clip_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Ob } /* clip me */ - if ((!clip->clip.clipees) && (clip->cur->visible)) - { -/* Basically it just went invisible */ -clip->changed = 1; -e = clip->layer->evas; -e->changed = 1; -/* i know this was to handle a case where a clip starts having children and - * stops being a solid colored box - no one ever does that... they hide the clp - * so dont add damages -evas_damage_rectangle_add(e->evas, - clip->cur->geometry.x + e->framespace.x, - clip->cur->geometry.y + e->framespace.y, - clip->cur->geometry.w, clip->cur->geometry.h); - */ - } - EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur) state_write->clipper = clip; EINA_COW_STATE_WRITE_END(obj, state_write, cur); --
[EGIT] [core/efl] master 02/02: evas_object_image: render_post returns if preloading.
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=5d651d523bd8d883b76e14953339e1fb80be7021 commit 5d651d523bd8d883b76e14953339e1fb80be7021 Author: Shinwoo Kim Date: Thu Feb 21 06:57:17 2019 + evas_object_image: render_post returns if preloading. The render_post calls evas_object_change if o->changed is true which is added by commit "36fc2e6 evas image: fix non-rendered preload image.". But an image could lose chance to render. Please refer to the following. (1) 1st render_updates_internal render_post - evas_object_change for image and its parents evas_object_reset - for its parent (2) _evas_image_load_post_update - o->preload is changed to true here (3) 2nd render_updates_internal evas_render_mapped cannot call render The reason of (3) would be unchanged parents. If render_post returns if an image is preloading, then evas_object_change works for the image and its parents at (2). And finally (3) will call render. It would be reasonable because render_pre, and render returns as well. Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D7973 --- src/lib/evas/canvas/evas_object_image.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index 02ec6493dd..03d37df5a4 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -2703,6 +2703,9 @@ evas_object_image_render_post(Evas_Object *eo_obj EINA_UNUSED, Evas_Image_Data *o = type_private_data; Eina_Rectangle *r; + /* image is not ready yet, skip rendering. Leave it to next frame */ + if (o->preload & EVAS_IMAGE_PRELOADING) return; + /* this moves the current data to the previous state parts of the object */ /* in whatever way is safest for the object. also if we don't need object */ /* data anymore we can free it if the object deems this is a good idea */ --
[EGIT] [core/efl] master 01/04: edje_calc: add ERR message to find out incorrect size problem
cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=1f7d7d06065e1865f32bbb499efe7ed1037520ae commit 1f7d7d06065e1865f32bbb499efe7ed1037520ae Author: Shinwoo Kim Date: Wed Mar 6 10:41:45 2019 + edje_calc: add ERR message to find out incorrect size problem When I amended https://phab.enlightenment.org/D7842 I removed line to handle negative value size of params final in _edje_part_pixel_adjust. Because It was not related to the what the commit wants to fix, and I could not find the case making param final size value negative , although I got the negative value when I tested on a specific case. Now it seems that the negative value is telling me "Witness Me!". So I would like to add this change, and never let me forget the issue. Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D8105 --- src/lib/edje/edje_calc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c index 140ed449ec..ffb46c075b 100644 --- a/src/lib/edje/edje_calc.c +++ b/src/lib/edje/edje_calc.c @@ -2447,6 +2447,9 @@ _edje_part_pixel_adjust(Edje *ed, } } + if (params->final.w < 0 || params->final.h < 0) + ERR("The params final size became negative"); + } static void --
[EGIT] [core/efl] master 01/01: edje_calc: make INTP use TO_INT_ROUND
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=be00af9bc3d534ede3965693618684fe38fd8786 commit be00af9bc3d534ede3965693618684fe38fd8786 Author: Shinwoo Kim Date: Fri Mar 8 13:28:21 2019 +0900 edje_calc: make INTP use TO_INT_ROUND Summary: The edje_part_recalc calculates next postion(p3). Please refer to following line. p3->final.y = INTP(p1->final.y, p2->final.y, pos); If the condition is as blow, then p3->final.y becomes -50 only if pos is 1.0. Because INP uses TO_INT not TO_INT_ROUND. p1->final.y == -32 p2->final.y == -50 So we had nonsmooth ending of transition. Test Plan: Sample application to check this issue. Please look carefully when the rect moves from bottom to top. {F3627740} {F3627739} Reviewers: cedric, Hermet, jypark Reviewed By: Hermet Subscribers: zmike, akanad, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7842 --- src/lib/edje/edje_calc.c| 35 ++- src/lib/edje/edje_private.h | 6 -- 2 files changed, 30 insertions(+), 11 deletions(-) diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c index ffb46c075b..3e3bf29850 100644 --- a/src/lib/edje/edje_calc.c +++ b/src/lib/edje/edje_calc.c @@ -2397,12 +2397,29 @@ _edje_filter_get(Edje *ed, Edje_Part_Description_Spec_Filter *filter) static void _edje_part_pixel_adjust(Edje *ed, Edje_Real_Part *ep, -Edje_Calc_Params *params) +Edje_Calc_Params *params, +Eina_Bool round) { + int xw, yh, fxw, fyh; + + xw = ABS(params->final.x) + params->final.w; + yh = ABS(params->final.y) + params->final.h; + + if (round) + { +fxw = TO_INT_ROUND(ADD(ABS(params->eval.x), params->eval.w)); +fyh = TO_INT_ROUND(ADD(ABS(params->eval.y), params->eval.h)); + } + else + { +fxw = TO_INT(ADD(ABS(params->eval.x), params->eval.w)); +fyh = TO_INT(ADD(ABS(params->eval.y), params->eval.h)); + } + /* Adjust rounding to not loose one pixels compared to float information only when rendering to avoid infinite adjustement when doing min restricted calc */ - if (ABS(params->final.x) + params->final.w < TO_INT(ADD(ABS(params->eval.x), params->eval.w))) + if (xw < fxw) { if (!ed->calc_only) { @@ -2413,7 +2430,7 @@ _edje_part_pixel_adjust(Edje *ed, ep->invalidate = EINA_TRUE; } } - else if (ABS(params->final.x) + params->final.w > TO_INT(ADD(ABS(params->eval.x), params->eval.w))) + else if (xw > fxw) { if (!ed->calc_only) { @@ -2424,7 +2441,8 @@ _edje_part_pixel_adjust(Edje *ed, ep->invalidate = EINA_TRUE; } } - if (ABS(params->final.y) + params->final.h < TO_INT(ADD(ABS(params->eval.y), params->eval.h))) + + if (yh < fyh) { if (!ed->calc_only) { @@ -2435,7 +2453,7 @@ _edje_part_pixel_adjust(Edje *ed, ep->invalidate = EINA_TRUE; } } - else if (ABS(params->final.y) + params->final.h > TO_INT(ADD(ABS(params->eval.y), params->eval.h))) + else if (yh > fyh) { if (!ed->calc_only) { @@ -2449,7 +2467,6 @@ _edje_part_pixel_adjust(Edje *ed, if (params->final.w < 0 || params->final.h < 0) ERR("The params final size became negative"); - } static void @@ -2994,7 +3011,7 @@ _edje_part_recalc_single(Edje *ed, params->final.w = TO_INT(params->eval.w); params->final.h = TO_INT(params->eval.h); - _edje_part_pixel_adjust(ed, ep, params); + _edje_part_pixel_adjust(ed, ep, params, EINA_FALSE); /* fill */ if (ep->part->type == EDJE_PART_TYPE_IMAGE) _edje_part_recalc_single_fill(ep, &((Edje_Part_Description_Image *)desc)->image.fill, params); @@ -3456,7 +3473,7 @@ _edje_physics_body_add(Edje *ed, Edje_Real_Part *rp, EPhysics_World *world) ? (_x1)\ : ADD(_x1, MUL(_p, SUB(_x2, _x1; -#define INTP(_x1, _x2, _p) TO_INT(FINTP(_x1, _x2, _p)) +#define INTP(_x1, _x2, _p) TO_INT_ROUND(FINTP(_x1, _x2, _p)) static void _map_colors_free(Edje_Calc_Params *pf) @@ -4343,7 +4360,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta p3->req.w = INTP(p1->req.w, p2->req.w, pos); p3->req.h = INTP(p1->req.h, p2->req.h, pos); -_edje_part_pixel_adjust(ed, ep, p3); +_edje_part_pixel_adjust(ed, ep, p3, EINA_TRUE); if (ep->part->dragable.x) { diff --git a/src/lib/edje
[EGIT] [core/efl] master 01/01: Efl.Ui.Textpath: enhance to support legacy API
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=4e6539725e59fce99a861566219c5b23d4f5868a commit 4e6539725e59fce99a861566219c5b23d4f5868a Author: Shinwoo Kim Date: Mon May 13 13:09:24 2019 +0900 Efl.Ui.Textpath: enhance to support legacy API Summary: The legacy API is available after https://phab.enlightenment.org/D7033 but internal function does not care of it. This change makes textpath work with the legacy style file(./data/elementary/themes/edc/elm/textpath.edc). Reviewers: Hermet, jsuya Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8875 --- src/lib/elementary/efl_ui_textpath.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/lib/elementary/efl_ui_textpath.c b/src/lib/elementary/efl_ui_textpath.c index 2e4eff536f..593339c059 100644 --- a/src/lib/elementary/efl_ui_textpath.c +++ b/src/lib/elementary/efl_ui_textpath.c @@ -528,7 +528,7 @@ _textpath_ellipsis_set(Efl_Ui_Textpath_Data *pd, Eina_Bool enabled) } static void -_ellipsis_set(Efl_Ui_Textpath_Data *pd) +_ellipsis_set(Efl_Ui_Textpath_Data *pd, Eo *obj) { if (!pd->text_obj) return; @@ -536,7 +536,11 @@ _ellipsis_set(Efl_Ui_Textpath_Data *pd) Eina_Bool is_ellipsis = EINA_FALSE; const Evas_Object *tb; - tb = edje_object_part_object_get(pd->text_obj, "efl.text"); + if (elm_widget_is_legacy(obj)) + tb = edje_object_part_object_get(pd->text_obj, "elm.text"); + else + tb = edje_object_part_object_get(pd->text_obj, "efl.text"); + evas_object_textblock_size_native_get(tb, , ); evas_object_size_hint_min_set(pd->text_obj, w, h); if (pd->ellipsis) @@ -566,7 +570,7 @@ _textpath_text_set_internal(Eo *obj, Efl_Ui_Textpath_Data *pd, const char *part, if (!text) text = ""; ret = edje_object_part_text_set(pd->text_obj, part, text); - _ellipsis_set(pd); + _ellipsis_set(pd, obj); _sizing_eval(pd); return ret; @@ -663,7 +667,7 @@ _efl_ui_textpath_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Textpath_Data *pd) elm_widget_theme_object_set(obj, pd->text_obj, "textpath", "base", elm_widget_style_get(obj)); - _ellipsis_set(pd); + _ellipsis_set(pd, obj); return ret; } @@ -728,12 +732,12 @@ _efl_ui_textpath_slice_number_set(Eo *obj EINA_UNUSED, Efl_Ui_Textpath_Data *pd, } EOLIAN static void -_efl_ui_textpath_ellipsis_set(Eo *obj EINA_UNUSED, Efl_Ui_Textpath_Data *pd, Eina_Bool ellipsis) +_efl_ui_textpath_ellipsis_set(Eo *obj, Efl_Ui_Textpath_Data *pd, Eina_Bool ellipsis) { if (pd->ellipsis == ellipsis) return; pd->ellipsis = ellipsis; - _ellipsis_set(pd); + _ellipsis_set(pd, obj); _sizing_eval(pd); } --
[EGIT] [core/efl] master 01/01: evas_object_image: save EVAS_IMAGE_CONTENT_HINT_DYNAMIC image
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=c3c9fed7d9660a983ebd306eb2193640aa558fe3 commit c3c9fed7d9660a983ebd306eb2193640aa558fe3 Author: Shinwoo Kim Date: Thu May 2 20:50:24 2019 +0900 evas_object_image: save EVAS_IMAGE_CONTENT_HINT_DYNAMIC image Summary: evas_gl_common_image_content_hint_set makes RGBA_Image NULL if content hint is EVAS_IMAGE_CONTENT_HINT_DYNAMIC with 'sec_tbm_surface' and 'egl_tbm_ext'. efl_file_save(_efl_canvas_image_internal_efl_file_save_save) does not work in this case because ENFN->image_data_direct_get returns FALSE. This patch makes ENFN->image_data_direct_get work but you need to free its returned data after using it. Reviewers: Hermet, jsuya Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8516 --- src/lib/evas/canvas/efl_canvas_image.c | 3 +- src/lib/evas/canvas/evas_object_image.c| 5 +- src/lib/evas/include/evas_private.h| 2 +- src/modules/evas/engines/gl_generic/evas_engine.c | 76 -- .../evas/engines/software_generic/evas_engine.c| 3 +- 5 files changed, 80 insertions(+), 9 deletions(-) diff --git a/src/lib/evas/canvas/efl_canvas_image.c b/src/lib/evas/canvas/efl_canvas_image.c index 9d4c6c4594..9b19be0775 100644 --- a/src/lib/evas/canvas/efl_canvas_image.c +++ b/src/lib/evas/canvas/efl_canvas_image.c @@ -722,7 +722,8 @@ _efl_canvas_image_efl_gfx_buffer_buffer_managed_get(Eo *eo_obj, void *_pd EINA_U if (!o->buffer_data_set || !o->engine_data || !ENFN->image_data_direct_get) return slice; - ENFN->image_data_direct_get(ENC, o->engine_data, plane, , , EINA_FALSE); + ENFN->image_data_direct_get(ENC, o->engine_data, plane, , , EINA_FALSE, NULL); + return slice; } diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index 1d9ede0de7..289ffaaa3d 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -880,6 +880,7 @@ _efl_canvas_image_internal_efl_file_save_save(const Eo *eo_obj, Evas_Image_Data Evas_Colorspace want_cspace = EVAS_COLORSPACE_ARGB; Evas_Object_Protected_Data *obj; Eina_Bool unmap_it = EINA_FALSE; + Eina_Bool tofree = EINA_FALSE; int imagew, imageh, uvw, uvh; Eina_Rw_Slice slice = {}; DATA32 *data = NULL; @@ -932,7 +933,7 @@ _efl_canvas_image_internal_efl_file_save_save(const Eo *eo_obj, Evas_Image_Data Evas_Colorspace cs; Eina_Slice sl; -ok = ENFN->image_data_direct_get(ENC, pixels, 0, , , EINA_TRUE); +ok = ENFN->image_data_direct_get(ENC, pixels, 0, , , EINA_TRUE, ); if (ok && (cs == want_cspace)) data = (DATA32 *)sl.mem; } @@ -966,6 +967,8 @@ _efl_canvas_image_internal_efl_file_save_save(const Eo *eo_obj, Evas_Image_Data if (unmap_it) ENFN->image_data_unmap(ENC, pixels, ); + if (tofree) free(data); + if (!ok) ERR("Image save failed."); return ok; diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h index 5a4bd9cc5e..7d6d1c452f 100644 --- a/src/lib/evas/include/evas_private.h +++ b/src/lib/evas/include/evas_private.h @@ -1336,7 +1336,7 @@ struct _Evas_Func void *(*image_dirty_region) (void *engine, void *image, int x, int y, int w, int h); void *(*image_data_get) (void *engine, void *image, int to_write, DATA32 **image_data, int *err, Eina_Bool *tofree); void *(*image_data_put) (void *engine, void *image, DATA32 *image_data); - Eina_Bool (*image_data_direct_get) (void *engine, void *image, int plane, Eina_Slice *slice, Evas_Colorspace *cspace, Eina_Bool load); + Eina_Bool (*image_data_direct_get) (void *engine, void *image, int plane, Eina_Slice *slice, Evas_Colorspace *cspace, Eina_Bool load, Eina_Bool *tofree); void (*image_data_preload_request) (void *engine, void *image, const Eo *target); void (*image_data_preload_cancel) (void *engine, void *image, const Eo *target, Eina_Bool force); void *(*image_alpha_set)(void *engine, void *image, int has_alpha); diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c index 60301d4283..00989e8e17 100644 --- a/src/modules/evas/engines/gl_generic/evas_engine.c +++ b/src/modules/evas/engines/gl_generic/evas_engine.c @@ -301,20 +301,86 @@ eng_image_file_colorspace_get(void *engine EINA_UNUSED, void *image) static Eina_Bool eng_image_data_direct_get(void *engine EINA_UNUSED, void *image, int plane, Eina_Slice *slice, Evas_Colorspace *cspace, - Eina_Bool load) +
[EGIT] [core/efl] master 01/03: gfx_filter: add an example
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=1aed64f2697321a0558cfd9a04183f11781e5ae5 commit 1aed64f2697321a0558cfd9a04183f11781e5ae5 Author: Shinwoo Kim Date: Thu May 2 06:57:28 2019 + gfx_filter: add an example Add an example using efl_gfx_filter_program_set with text and image object. Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D8719 --- src/examples/elementary/filter_example.c | 129 +++ src/examples/elementary/meson.build | 1 + 2 files changed, 130 insertions(+) diff --git a/src/examples/elementary/filter_example.c b/src/examples/elementary/filter_example.c new file mode 100644 index 00..cc05b7d36f --- /dev/null +++ b/src/examples/elementary/filter_example.c @@ -0,0 +1,129 @@ +/** + * gcc -g filter_example.c -o filter_example `pkg-config --cflags --libs elementary` + */ +#define EFL_BETA_API_SUPPORT 1 +#include + +typedef struct _Filter +{ + const char *name; + const char *code; +} Filter; + +static Filter filters[] = { + { "no", NULL }, + { "blend", + "blend { color = '#fff8' }" }, + { "blur", + "blur { 15 }" }, + { "grow", + "a = buffer { 'rgba' }\n" + "blend { dst = a }\n" + "grow { 6, src = a }" }, + { "curve", + "a = buffer ('alpha')\n" + "blur ({ 4, dst = a })\n" + "p = {}\n" + "p[0] = 0\n" + "p[20] = 0\n" + "p[60] = 255\n" + "p[160] = 255\n" + "p[200] = 0\n" + "p[255] = 0\n" + "curve ({ points = p, src = a, dst = a })\n" + "blend ({ src = a, color = 'white' })\n" }, + { "fill", + "fill { color = 'darkblue' }" }, + { "mask", + "a = buffer ('alpha')\n" + "blur ({ 6, dst = a })\n" + "p = {}\n" + "p[0] = 255\n" + "p[128] = 255\n" + "p[255] = 0\n" + "curve ({ points = p, src = a, dst = a })\n" + "blend ({ color = 'black' })\n" + "mask ({ mask = a, color = 'cyan' })" }, + { "bump", + "a = buffer { 'alpha' }\n" + "grow { 5, dst = a }\n" + "blur { 6, src = a , dst = a }\n" + "bump { map = a, color = '#f60', specular = 1, compensate = true }" }, + { "trans", + "t = buffer ('alpha')\n" + "transform ({ oy = 20, dst = t })\n" + "blend ({ src = t, color = '#fff8' })\n" + "blend ({ color = 'white' })" }, +}; + +EAPI_MAIN int +elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED) +{ + Filter *f; + unsigned int i; + char buf[PATH_MAX]; + Eo *win, *scroller, *hbox, *box, *text, *img; + + elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); + elm_app_info_set(elm_main, "elementary", "images"); + + win = elm_win_util_standard_add("Gfx Filter Test", "Gfx Filter Test"); + elm_win_autodel_set(win, EINA_TRUE); + + scroller = elm_scroller_add(win); + evas_object_size_hint_weight_set(scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(win, scroller); + evas_object_show(scroller); + + hbox = elm_box_add(win); + elm_box_horizontal_set(hbox, EINA_TRUE); + evas_object_size_hint_weight_set(hbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_object_content_set(scroller, hbox); + evas_object_show(hbox); + + box = elm_box_add(win); + evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_box_pack_end(hbox, box); + evas_object_show(box); + + for (i = 0; i < EINA_C_ARRAY_LENGTH(filters); i++) + { +f = [i]; +text = evas_object_text_add(evas_object_evas_get(win)); +evas_object_size_hint_align_set(text, 0, EVAS_HINT_FILL); +evas_object_size_hint_min_set(text, 100, 100); +evas_object_text_font_set(text, "Sans:style=Bold", 50); +evas_object_text_text_set(text, f->name); +elm_box_pack_end(box, text); +evas_object_show(text); + +efl_gfx_filter_program_set(text, f->code, f->name); + } + + box = elm_box_add(win); + evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_box_pack_end(hbox, box); + evas_object_show(box); + + snprintf(buf, sizeof(buf), "%s/images/logo.png", elm_app_data_dir_get()); + for (i = 0; i < EINA_C_ARRAY_LENGTH(filters); i++) + { +f = [i]; +img = evas_object_image_filled_add(evas_object_evas_get(win)); +evas_object_size_hint_align_set(img, 0, EVAS_HINT_FILL); +evas_object_image_file_set(img, buf, 0); +evas_object_size_h
[EGIT] [core/efl] master 01/01: Revert "edje_calc: make INTP use TO_INT_ROUND"
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=e9b2e3c6c3a5b31c03557afbcdc59393c148f6fd commit e9b2e3c6c3a5b31c03557afbcdc59393c148f6fd Author: Shinwoo Kim Date: Fri Apr 19 17:18:26 2019 +0900 Revert "edje_calc: make INTP use TO_INT_ROUND" Summary: This reverts commit be00af9bc3d534ede3965693618684fe38fd8786 which has incorrect calculation. For more information please refer to: https://phab.enlightenment.org/D8665 Reviewers: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8666 --- src/lib/edje/edje_calc.c| 35 +-- src/lib/edje/edje_private.h | 6 ++ 2 files changed, 11 insertions(+), 30 deletions(-) diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c index 3e3bf29850..ffb46c075b 100644 --- a/src/lib/edje/edje_calc.c +++ b/src/lib/edje/edje_calc.c @@ -2397,29 +2397,12 @@ _edje_filter_get(Edje *ed, Edje_Part_Description_Spec_Filter *filter) static void _edje_part_pixel_adjust(Edje *ed, Edje_Real_Part *ep, -Edje_Calc_Params *params, -Eina_Bool round) +Edje_Calc_Params *params) { - int xw, yh, fxw, fyh; - - xw = ABS(params->final.x) + params->final.w; - yh = ABS(params->final.y) + params->final.h; - - if (round) - { -fxw = TO_INT_ROUND(ADD(ABS(params->eval.x), params->eval.w)); -fyh = TO_INT_ROUND(ADD(ABS(params->eval.y), params->eval.h)); - } - else - { -fxw = TO_INT(ADD(ABS(params->eval.x), params->eval.w)); -fyh = TO_INT(ADD(ABS(params->eval.y), params->eval.h)); - } - /* Adjust rounding to not loose one pixels compared to float information only when rendering to avoid infinite adjustement when doing min restricted calc */ - if (xw < fxw) + if (ABS(params->final.x) + params->final.w < TO_INT(ADD(ABS(params->eval.x), params->eval.w))) { if (!ed->calc_only) { @@ -2430,7 +2413,7 @@ _edje_part_pixel_adjust(Edje *ed, ep->invalidate = EINA_TRUE; } } - else if (xw > fxw) + else if (ABS(params->final.x) + params->final.w > TO_INT(ADD(ABS(params->eval.x), params->eval.w))) { if (!ed->calc_only) { @@ -2441,8 +2424,7 @@ _edje_part_pixel_adjust(Edje *ed, ep->invalidate = EINA_TRUE; } } - - if (yh < fyh) + if (ABS(params->final.y) + params->final.h < TO_INT(ADD(ABS(params->eval.y), params->eval.h))) { if (!ed->calc_only) { @@ -2453,7 +2435,7 @@ _edje_part_pixel_adjust(Edje *ed, ep->invalidate = EINA_TRUE; } } - else if (yh > fyh) + else if (ABS(params->final.y) + params->final.h > TO_INT(ADD(ABS(params->eval.y), params->eval.h))) { if (!ed->calc_only) { @@ -2467,6 +2449,7 @@ _edje_part_pixel_adjust(Edje *ed, if (params->final.w < 0 || params->final.h < 0) ERR("The params final size became negative"); + } static void @@ -3011,7 +2994,7 @@ _edje_part_recalc_single(Edje *ed, params->final.w = TO_INT(params->eval.w); params->final.h = TO_INT(params->eval.h); - _edje_part_pixel_adjust(ed, ep, params, EINA_FALSE); + _edje_part_pixel_adjust(ed, ep, params); /* fill */ if (ep->part->type == EDJE_PART_TYPE_IMAGE) _edje_part_recalc_single_fill(ep, &((Edje_Part_Description_Image *)desc)->image.fill, params); @@ -3473,7 +3456,7 @@ _edje_physics_body_add(Edje *ed, Edje_Real_Part *rp, EPhysics_World *world) ? (_x1)\ : ADD(_x1, MUL(_p, SUB(_x2, _x1; -#define INTP(_x1, _x2, _p) TO_INT_ROUND(FINTP(_x1, _x2, _p)) +#define INTP(_x1, _x2, _p) TO_INT(FINTP(_x1, _x2, _p)) static void _map_colors_free(Edje_Calc_Params *pf) @@ -4360,7 +4343,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta p3->req.w = INTP(p1->req.w, p2->req.w, pos); p3->req.h = INTP(p1->req.h, p2->req.h, pos); -_edje_part_pixel_adjust(ed, ep, p3, EINA_TRUE); +_edje_part_pixel_adjust(ed, ep, p3); if (ep->part->dragable.x) { diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h index 6ae592680f..a92e5b1273 100644 --- a/src/lib/edje/edje_private.h +++ b/src/lib/edje/edje_private.h @@ -155,9 +155,7 @@ EAPI extern int _edje_default_log_dom ; #define FROM_DOUBLE(a) eina_f32p32_double_from(a) #define FROM_INT(a) eina_f32p32_int_from(a) #define TO_INT(a) eina_f32p32_int_to(a) -#define TO_INT_ROUND(a) (((a) >= 0.0) \ - ? eina_f32p32_int_
[EGIT] [core/efl] master 01/01: evas filter: fix crash issue
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=e0b4ddaeb8c266e4a499984138c5bcd8f958645b commit e0b4ddaeb8c266e4a499984138c5bcd8f958645b Author: Shinwoo Kim Date: Fri Jan 31 21:34:49 2020 +0900 evas filter: fix crash issue Summary: If image object geometry is same with image size, then a crash occurs on both GL and SW engine. [Test Code] evas_object_image_size_get(img, , ); evas_object_resize(img, w, h); [GL engine] eng_ector_buffer_wrap should use output instead of engine for calling evas_ector_buffer_engine_image, because it expects the output not the engine. [SW engine] eng_ector_buffer_wrap should check if im->image.data is NULL because _evas_ector_software_buffer_evas_ector_buffer_engine_image_set returns before calling evas_cache_iamge_ref if im->image.data is NULL, and it causes a segmentation fault finally with following backtrace. (#0) evas_cache_image_drop (im=0x0) (#1) _evas_ector_software_buffer_efl_object_destructor (#2) efl_destructor (#3) _efl_del_internal (#4) _efl_unref_internal (#5) _efl_add_internal_end (#6) _efl_add_end (#7) eng_ector_buffer_wrap Test Plan: {F3841366} Reviewers: Hermet, jsuya Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11258 --- src/lib/evas/filters/evas_filter.c | 2 ++ src/modules/evas/engines/gl_generic/evas_engine.c | 5 - src/modules/evas/engines/software_generic/evas_engine.c | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib/evas/filters/evas_filter.c b/src/lib/evas/filters/evas_filter.c index c9d8005e26..a35ad8131f 100644 --- a/src/lib/evas/filters/evas_filter.c +++ b/src/lib/evas/filters/evas_filter.c @@ -608,6 +608,8 @@ evas_filter_buffer_backing_set(Evas_Filter_Context *ctx, int bufid, if (fb->is_render) goto end; buffer = ENFN->ector_buffer_wrap(ENC, ctx->evas->evas, engine_buffer); + if (!buffer) return EINA_FALSE; + ret = EINA_TRUE; end: diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c index ec14e2bacc..5514b7d97d 100644 --- a/src/modules/evas/engines/gl_generic/evas_engine.c +++ b/src/modules/evas/engines/gl_generic/evas_engine.c @@ -2564,11 +2564,14 @@ static Ector_Buffer * eng_ector_buffer_wrap(void *engine EINA_UNUSED, Evas *evas, void *engine_image) { Evas_GL_Image *im = engine_image; + Render_Output_GL_Generic *output; EINA_SAFETY_ON_NULL_RETURN_VAL(engine_image, NULL); + output = _evgl_output_find(engine); + if (!output) return NULL; return efl_add(EVAS_ECTOR_GL_IMAGE_BUFFER_CLASS, evas, - evas_ector_buffer_engine_image_set(efl_added, evas, im)); + evas_ector_buffer_engine_image_set(efl_added, output, im)); } //FIXME: Currently Ector GL doens't work properly. Use software instead. diff --git a/src/modules/evas/engines/software_generic/evas_engine.c b/src/modules/evas/engines/software_generic/evas_engine.c index b548322539..44c169c781 100644 --- a/src/modules/evas/engines/software_generic/evas_engine.c +++ b/src/modules/evas/engines/software_generic/evas_engine.c @@ -4275,8 +4275,10 @@ eng_ector_buffer_wrap(void *data, Evas *e EINA_UNUSED, void *engine_image) { Image_Entry *ie = engine_image; Ector_Buffer *buf = NULL; + RGBA_Image *im = (RGBA_Image *)ie; if (!ie) return NULL; + if (!im->image.data) return NULL; if (!efl_domain_current_push(EFL_ID_DOMAIN_SHARED)) return NULL; --
[EGIT] [core/efl] master 01/01: Efl.Canvas.Group: make mask filter work on GL engine
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=1dc6ccfba0ee33b8b09d66d139d768f0688c6ee1 commit 1dc6ccfba0ee33b8b09d66d139d768f0688c6ee1 Author: Shinwoo Kim Date: Fri Jan 31 18:31:08 2020 +0900 Efl.Canvas.Group: make mask filter work on GL engine Summary: The _gl_filter_mask defines value of gc->dc->clip.mask, and make_color but those are not used at all, because the evas_gl_common_Filter_blend_push calls evas_gl_common_context_image_push which doesn't care of those values. So this patch is using evas_gl_common_image_draw to use mask and mask_color. Test Plan: [Filter Program] efl_gfx_filter_program_set(text, "buffer:a(alpha); buffer:fat(alpha); buffer:rgbfat(rgba); curve (0:255-255:0, dst = a); blend (a, color = #00ca00ff); grow (1, dst = fat); blur (3, src = fat, color=#b9ff, ox = -2, oy = -2, dst = rgbfat); mask (a, src = rgbfat);padding_set(t=5);", "name"); [Before] {F3835430} [After] {F3835431} Reviewers: Hermet, jsuya Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11139 --- src/modules/evas/engines/gl_generic/filters/gl_filter_mask.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/evas/engines/gl_generic/filters/gl_filter_mask.c b/src/modules/evas/engines/gl_generic/filters/gl_filter_mask.c index 755dedb04a..36aaa39d78 100644 --- a/src/modules/evas/engines/gl_generic/filters/gl_filter_mask.c +++ b/src/modules/evas/engines/gl_generic/filters/gl_filter_mask.c @@ -50,8 +50,8 @@ _gl_filter_mask(Render_Engine_GL_Generic *re, Evas_Filter_Command *cmd) gc->dc->clip.mask_x = x; gc->dc->clip.mask_y = y; - evas_gl_common_filter_blend_push(gc, image->tex, x, y, sw, sh, x, y, sw, sh, - cmd->draw.alphaonly); + evas_gl_common_image_draw(gc, image, x, y, sw, sh, +x, y, sw, sh, EINA_TRUE); } evas_gl_common_image_free(use_mask); --
[EGIT] [core/efl] master 02/02: evas proxy: make it work for load_region
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=8986f8d2dc6c2aeb5d1c3a4c9cdafaffcf88c901 commit 8986f8d2dc6c2aeb5d1c3a4c9cdafaffcf88c901 Author: Shinwoo Kim Date: Tue Feb 4 12:14:23 2020 +0900 evas proxy: make it work for load_region Summary: This makes a proxy object use a selective region of a source object. So far a proxy has not worked for load_region at all. This should be better solution than https://phab.enlightenment.org/D10604 introducing new interface. This is useful when the source is too big to allocate a proxy surface. This will be used by elm_scroller to solve following issue. [Issue] If size of elm_sclloer content is too big, then the proxy of elm_scroller to show loop effect does not work. Because evas_gl_common_image_surface_new does not allow bigger size surface than max_texture_size Reviewers: Hermet, jsuya Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10626 --- src/lib/evas/canvas/evas_object_image.c | 3 ++- src/lib/evas/canvas/evas_render.c | 12 +++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index ab4d5e6f4c..e2bfebfedb 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -2355,7 +2355,8 @@ _evas_image_pixels_get(Eo *eo_obj, Evas_Object_Protected_Data *obj, *uvw = *imagew; *uvh = *imageh; } - else if (oi && oi->engine_data) + else if (oi && oi->engine_data && +(!o->cur->source || o->load_opts->region.w == 0 || o->load_opts->region.h == 0)) { if (oi->has_filter) pixels = evas_filter_output_buffer_get(source->object); diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c index d655bbdc27..f5ebf9c2c1 100644 --- a/src/lib/evas/canvas/evas_render.c +++ b/src/lib/evas/canvas/evas_render.c @@ -2323,6 +2323,7 @@ evas_render_proxy_subrender(Evas *eo_e, void *output, Evas_Object *eo_source, Ev int level = 1; void *ctx; int w, h, off_x = 0, off_y = 0; + Eina_Rectangle lr; #ifdef REND_DBG level = __RD_level; @@ -2333,7 +2334,16 @@ evas_render_proxy_subrender(Evas *eo_e, void *output, Evas_Object *eo_source, Ev source = efl_data_scope_get(eo_source, EFL_CANVAS_OBJECT_CLASS); proxy = efl_data_scope_get(eo_proxy, EFL_CANVAS_OBJECT_CLASS); - if (proxy->proxy->proxies || (!proxy->cur->clipper) || (!proxy->cur->has_fixed_size)) + evas_object_image_load_region_get(eo_proxy, , , , ); + + if (lr.w > 0 && lr.h > 0) + { +w = lr.w; +h = lr.h; +off_x = -lr.x; +off_y = -lr.y; + } + else if (proxy->proxy->proxies || (!proxy->cur->clipper) || (!proxy->cur->has_fixed_size)) { /* make full surface available if this proxy is being sampled from */ w = source->cur->geometry.w; --
[EGIT] [core/efl] master 01/02: evas proxy: make it work for File_Save.save
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=50f3648391c1fc6045bf29168e7ff9d9f65cbdf4 commit 50f3648391c1fc6045bf29168e7ff9d9f65cbdf4 Author: Shinwoo Kim Date: Tue Feb 4 12:06:37 2020 +0900 evas proxy: make it work for File_Save.save Summary: File_Save.save does not work for proxy object from following commit. c53f152 evas: Make save() work on snapshots Test Plan: 1. Add an image object and set source object. evas_object_image_source_set(obj, source); 2. Save the object as a file when you need. evas_object_image_save(obj, "./file_name.png", NULL, NULL); Reviewers: cedric, Hermet, jsuya Reviewed By: Hermet Subscribers: zmike, subodh6129, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10629 --- src/lib/evas/canvas/evas_object_image.c | 2 ++ src/tests/evas/evas_test_image.c| 45 + 2 files changed, 47 insertions(+) diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index fa3a4a8462..ab4d5e6f4c 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -2301,6 +2301,8 @@ _evas_image_pixels_get(Eo *eo_obj, Evas_Object_Protected_Data *obj, if (filtered && o->has_filter) pixels = evas_filter_output_buffer_get(eo_obj); + else + needs_post_render = EINA_FALSE; if (!pixels && o->cur->source) { diff --git a/src/tests/evas/evas_test_image.c b/src/tests/evas/evas_test_image.c index bfc581992a..3f39b270e5 100644 --- a/src/tests/evas/evas_test_image.c +++ b/src/tests/evas/evas_test_image.c @@ -1117,6 +1117,50 @@ EFL_START_TEST(evas_object_image_9patch) } EFL_END_TEST +EFL_START_TEST(evas_object_image_save_from_proxy) +{ + Evas *e; + Evas_Object *obj, *proxy, *ref; + int w, h, r_w, r_h; + const uint32_t *d, *r_d; + const char *img_path, *img_path2; + Eina_Bool ret; + + e = _setup_evas(); + img_path = TESTS_IMG_DIR "/Pic1.png"; + img_path2 = TESTS_IMG_DIR "/Pic1_saved.png"; + + obj = evas_object_image_add(e); + proxy = evas_object_image_add(e); + ref = evas_object_image_add(e); + + evas_object_image_file_set(obj, img_path, NULL); + fail_if(evas_object_image_load_error_get(obj) != EVAS_LOAD_ERROR_NONE); + evas_object_image_size_get(obj, , ); + d = evas_object_image_data_get(obj, EINA_FALSE); + + evas_object_image_source_set(proxy, obj); + ret = evas_object_image_save(proxy, img_path2, NULL, NULL); + fail_if(!ret); + + evas_object_image_file_set(ref, img_path2, NULL); + fail_if(evas_object_image_load_error_get(ref) != EVAS_LOAD_ERROR_NONE); + evas_object_image_size_get(ref, _w, _h); + r_d = evas_object_image_data_get(ref, EINA_FALSE); + + fail_if(w != r_w || h != r_h); + fail_if(memcmp(d, r_d, w * h * 4)); + + evas_object_del(proxy); + evas_object_del(obj); + evas_object_del(ref); + + remove(img_path2); + + evas_free(e); +} +EFL_END_TEST + void evas_test_image_object(TCase *tc) { tcase_add_test(tc, evas_object_image_api); @@ -1143,6 +1187,7 @@ void evas_test_image_object(TCase *tc) tcase_add_test(tc, evas_object_image_partially_load_orientation); tcase_add_test(tc, evas_object_image_cached_data_comparision); tcase_add_test(tc, evas_object_image_9patch); + tcase_add_test(tc, evas_object_image_save_from_proxy); } --
[EGIT] [core/efl] master 01/01: efl_ui_image: unload file before memfile_set
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=bfdb01161a79b4e920f438c52116a43df3a2fc8c commit bfdb01161a79b4e920f438c52116a43df3a2fc8c Author: Shinwoo Kim Date: Fri Feb 21 13:16:32 2020 +0900 efl_ui_image: unload file before memfile_set Summary: If memfile_set does not remove prev file information, it is not possilbe to load image using the same file information after memefile_set. It means that below line 3 does not work because the same file information remains for Efl.Ui.Image_Legacy. 1 | elm_image_file_set(obj, "1.jpg", NULL) 2 | elm_image_memfile_set(obj, img, size, "jpg", NULL) 3 | elm_image_file_set(obj, "1.jpg", NULL) This patch removes line calling _efl_ui_image_file_set_do becasue it is called in efl_file_unload > _efl_ui_image_efl_file_unload. Test Plan: [Sample Code] {F3848315} [Reproduce Step] 1. File2 2. Memfile 3. File2 Reviewers: Hermet, jsuya Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11392 --- src/lib/elementary/efl_ui_image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c index 96d6b1abd5..a13f7047fd 100644 --- a/src/lib/elementary/efl_ui_image.c +++ b/src/lib/elementary/efl_ui_image.c @@ -2415,7 +2415,7 @@ elm_image_memfile_set(Evas_Object *obj, const void *img, size_t size, const char EFL_UI_IMAGE_CHECK(obj) EINA_FALSE; EFL_UI_IMAGE_DATA_GET(obj, sd); - _efl_ui_image_file_set_do(obj); + efl_file_unload(obj); evas_object_image_memfile_set (sd->img, (void *)img, size, (char *)format, (char *)key); --
[EGIT] [core/efl] master 02/02: evas_render: initialize variable
zmike pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=2f852c92e87ba07df0332405e65ecaa00d64a6e5 commit 2f852c92e87ba07df0332405e65ecaa00d64a6e5 Author: Shinwoo Kim Date: Tue Feb 11 09:03:43 2020 -0500 evas_render: initialize variable Summary: evas_object_image_load_region_get could be called with following stack. (#0) evas_object_image_load_region_get (#1) evas_render_proxy_subrender (#2) evas_filter_context_proxy_render_all (#3) evas_filter_object_render (#4) evas_object_text_render This means that evas_object_image_load_region_get is called by text object. In this case, the load region value has garbabe, and it leads to invalid memory access which is detected by Assan(T8610). This patch initialize variable before using evas_object_image_load_region_set. Reviewers: Hermet, jsuya, bu5hm4n, zmike Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11316 --- src/lib/evas/canvas/evas_render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c index 27b3c52130..aba4103907 100644 --- a/src/lib/evas/canvas/evas_render.c +++ b/src/lib/evas/canvas/evas_render.c @@ -2323,7 +2323,7 @@ evas_render_proxy_subrender(Evas *eo_e, void *output, Evas_Object *eo_source, Ev int level = 1; void *ctx; int w, h, off_x = 0, off_y = 0; - Eina_Rectangle lr; + Eina_Rectangle lr = {0, 0, 0, 0}; #ifdef REND_DBG level = __RD_level; --
[EGIT] [core/efl] master 01/01: elm_transit: remove unnecessary image preload invocation
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=5b349c1ea1a580c81bec2eb726d8cf7cfc311c82 commit 5b349c1ea1a580c81bec2eb726d8cf7cfc311c82 Author: Shinwoo Kim Date: Mon Feb 17 21:29:56 2020 +0900 elm_transit: remove unnecessary image preload invocation Summary: If user uses image object with following step, then unnecessary preloading related line is invocated in elm_image_file_set. elm_image_file_set(obj, file, NULL) elm_icon_preload_disabled_set(obj, EINA_TRUE) The following is the preloading related line triggered by elm_image_file_set. (#0) _image_preload_internal (#1) _evas_image_load_async_start (#2) evas_object_image_preload (#3) _efl_ui_image_smart_internal_file_set (#4) _efl_ui_image_efl_file_load (#5) efl_file_load (#6) efl_file_simple_load (#7) elm_image_file_set Moreover there is a flickering issue caused by the unnecessary preloading. A test code is attached. Test Plan: Use following test code. The flickering issue occurs with `ELM_SCALE=10 ELM_ACCEL=gl ./test_transit` {F3847288} Reviewers: Hermet, jsuya Reviewed By: Hermet, jsuya Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11364 --- src/lib/elementary/elm_transit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/elm_transit.c b/src/lib/elementary/elm_transit.c index 39dc755604..590c416535 100644 --- a/src/lib/elementary/elm_transit.c +++ b/src/lib/elementary/elm_transit.c @@ -2621,8 +2621,8 @@ _transit_effect_image_animation_op(Elm_Transit_Effect *effect, Elm_Transit *tran const char *file = eina_list_nth(image_animation->images, idx); - elm_image_file_set(obj, file, NULL); elm_image_preload_disabled_set(obj, EINA_TRUE); + elm_image_file_set(obj, file, NULL); } } --
[EGIT] [core/efl] master 01/01: Efl.Canvas.Group: implement Efl.Gfx.Filter
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=7311b6fe323e00e9636676f9e7ae658167998dc3 commit 7311b6fe323e00e9636676f9e7ae658167998dc3 Author: Shinwoo Kim Date: Tue Jan 21 19:28:59 2020 +0900 Efl.Canvas.Group: implement Efl.Gfx.Filter Summary: This patch makes Efl.Canvas.Group work for Efl.Gfx.Filter Reviewers: Hermet, jsuya, zmike Reviewed By: Hermet Subscribers: zmike, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10435 --- src/lib/evas/canvas/efl_canvas_group.eo | 4 ++- src/lib/evas/canvas/evas_object_smart.c | 53 + src/lib/evas/canvas/evas_render.c | 7 + src/lib/evas/include/evas_private.h | 1 + 4 files changed, 64 insertions(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/efl_canvas_group.eo b/src/lib/evas/canvas/efl_canvas_group.eo index 500b521f88..31105a0fc6 100644 --- a/src/lib/evas/canvas/efl_canvas_group.eo +++ b/src/lib/evas/canvas/efl_canvas_group.eo @@ -1,4 +1,4 @@ -class Efl.Canvas.Group extends Efl.Canvas.Object +class Efl.Canvas.Group extends Efl.Canvas.Object implements Efl.Gfx.Filter { [[A group object is a container for other canvas objects. Its children move along their parent and are often clipped with a common clipper. @@ -127,6 +127,8 @@ class Efl.Canvas.Group extends Efl.Canvas.Object Efl.Gfx.Color.color { set; } Efl.Gfx.Entity.visible { set; } Efl.Gfx.Entity.position { set; } + Efl.Gfx.Entity.size { set; } + Efl.Gfx.Filter.filter_program { set; } Efl.Canvas.Object.clipper { set; } Efl.Canvas.Object.no_render { set; } Efl.Canvas.Object.paragraph_direction { get; set; } diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c index 7f07d826e3..0af4fb5ad6 100644 --- a/src/lib/evas/canvas/evas_object_smart.c +++ b/src/lib/evas/canvas/evas_object_smart.c @@ -23,6 +23,7 @@ struct _Evas_Smart_Data Eina_Rectangle bounding_box; } cur, prev; Evas_Object *object; + Evas_Object *filter_img; void *engine_data; void *data; Eina_Inlist *callbacks; @@ -909,6 +910,9 @@ _efl_canvas_group_efl_gfx_entity_visible_set(Eo *eo_obj, Evas_Smart_Data *o, Ein efl_gfx_entity_visible_set(clipper, vis); } + + if (o->filter_img) + efl_gfx_entity_visible_set(o->filter_img, vis); } EOLIAN static void @@ -927,6 +931,55 @@ _efl_canvas_group_efl_gfx_entity_position_set(Eo *eo_obj, Evas_Smart_Data *o, Ei if (o->clipped && !is_overridden) _evas_object_smart_clipped_smart_move_internal(eo_obj, pos.x, pos.y); efl_gfx_entity_position_set(efl_super(eo_obj, MY_CLASS), pos); + efl_gfx_entity_position_set(o->filter_img, pos); +} + +EOLIAN static void +_efl_canvas_group_efl_gfx_entity_size_set(Eo *obj, Evas_Smart_Data *o, Eina_Size2D size) +{ + if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, size.w, size.h)) + return; + + efl_gfx_entity_size_set(efl_super(obj, MY_CLASS), size); + efl_gfx_entity_size_set(o->filter_img, size); +} + +EOLIAN static void +_efl_canvas_group_efl_gfx_filter_filter_program_set(Eo *eo_obj, Evas_Smart_Data *o, +const char *code, const char *name) +{ + Evas_Object_Protected_Data *obj, *fobj; + obj = EVAS_OBJ_GET_OR_RETURN(eo_obj); + + if (!code && !name) + { +if (o->filter_img) + { + evas_object_del(o->filter_img); + o->filter_img = NULL; + } +return; + } + + if (o->filter_img) + { +efl_gfx_filter_program_set(o->filter_img, code, name); +return; + } + + o->filter_img = efl_add(EFL_CANVAS_PROXY_CLASS, eo_obj, + efl_gfx_fill_auto_set(efl_added, EINA_TRUE), + efl_canvas_group_member_add(obj->object, efl_added), + efl_canvas_proxy_source_events_set(efl_added, EINA_TRUE), + efl_canvas_proxy_source_set(efl_added, eo_obj), + evas_object_repeat_events_set(efl_added, EINA_TRUE), + efl_gfx_filter_program_set(efl_added, code, name), + efl_gfx_entity_geometry_set(efl_added, (Eina_Rect)obj->cur->geometry), + efl_gfx_entity_visible_set(efl_added, obj->cur->visible)); + + fobj = efl_data_scope_get(o->filter_img, EFL_CANVAS_OBJECT_CLASS); + if (!fobj) return; + fobj->is_filter_object = EINA_TRUE; } EOLIAN static void diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c index 70ed55a953..d655bbdc27 100644 --- a/src/lib/evas/canvas/evas_render.c +++ b/src/lib/evas/canvas/evas_ren
[EGIT] [core/efl] master 01/01: evas.image: add evas_object_image_animated_frame_get
zmike pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a89a2ef1dee61da73cb8d67e8c70450674d02ed5 commit a89a2ef1dee61da73cb8d67e8c70450674d02ed5 Author: Shinwoo Kim Date: Tue Mar 10 09:27:30 2020 -0400 evas.image: add evas_object_image_animated_frame_get this adds an api for getting the current frame of an animation Differential Revision: https://phab.enlightenment.org/D11455 --- src/lib/evas/Evas_Legacy.h| 19 +++ src/lib/evas/canvas/efl_canvas_image.c| 8 src/lib/evas/canvas/evas_image_legacy.c | 7 +++ src/lib/evas/include/evas_private.h | 1 + src/modules/evas/engines/gl_generic/evas_engine.c | 16 .../evas/engines/software_generic/evas_engine.c | 13 + 6 files changed, 64 insertions(+) diff --git a/src/lib/evas/Evas_Legacy.h b/src/lib/evas/Evas_Legacy.h index 78ca7df9ec..eb8850d3fc 100644 --- a/src/lib/evas/Evas_Legacy.h +++ b/src/lib/evas/Evas_Legacy.h @@ -4930,6 +4930,7 @@ EAPI Eina_Bool evas_object_image_animated_get(const Eo *obj); * @ref evas_object_image_animated_loop_type_get, * @ref evas_object_image_animated_loop_count_get, * @ref evas_object_image_animated_frame_duration_get. + * @ref evas_object_image_animated_frame_get. * * @param[in] frame_index The index of current frame. * @@ -4937,6 +4938,24 @@ EAPI Eina_Bool evas_object_image_animated_get(const Eo *obj); */ EAPI void evas_object_image_animated_frame_set(Evas_Object *obj, int frame_index); +/** + * @brief Get the frame to current frame of an image object. + * + * This returns image object's current frame. + * + * See also @ref evas_object_image_animated_get, + * @ref evas_object_image_animated_frame_count_get, + * @ref evas_object_image_animated_loop_type_get, + * @ref evas_object_image_animated_loop_count_get, + * @ref evas_object_image_animated_frame_duration_get. + * @ref evas_object_image_animated_frame_set. + * + * @param[in] frame_index The index of current frame. + * + * @since 1.24 + */ +EAPI int evas_object_image_animated_frame_get(Evas_Object *obj); + /** * @brief Get the total number of frames of the image object. * diff --git a/src/lib/evas/canvas/efl_canvas_image.c b/src/lib/evas/canvas/efl_canvas_image.c index d45efcbf73..822c94600e 100644 --- a/src/lib/evas/canvas/efl_canvas_image.c +++ b/src/lib/evas/canvas/efl_canvas_image.c @@ -40,6 +40,7 @@ _evas_image_file_load(Eo *eo_obj, Evas_Image_Data *o) const Eina_File *f = efl_file_mmap_get(eo_obj); const char *key = efl_file_key_get(eo_obj); int load_error; + int frame_index; if (!o->skip_head) EINA_SAFETY_ON_NULL_RETURN_VAL(f, EINA_FALSE); @@ -59,6 +60,13 @@ _evas_image_file_load(Eo *eo_obj, Evas_Image_Data *o) o->engine_data = ENFN->image_mmap(ENC, o->cur->f, o->cur->key, _error, ); else o->engine_data = ENFN->image_load(ENC, efl_file_get(eo_obj), o->cur->key, _error, ); + + if (_evas_image_animated_get(eo_obj)) + { +frame_index = ENFN->image_animated_frame_get(ENC, o->engine_data); +_evas_image_animated_frame_set(eo_obj, frame_index); + } + o->load_error = _evas_load_error_to_efl_gfx_image_load_error(load_error); o->buffer_data_set = EINA_FALSE; _evas_image_done_set(eo_obj, obj, o); diff --git a/src/lib/evas/canvas/evas_image_legacy.c b/src/lib/evas/canvas/evas_image_legacy.c index 2702b31f5e..12d53a4a10 100644 --- a/src/lib/evas/canvas/evas_image_legacy.c +++ b/src/lib/evas/canvas/evas_image_legacy.c @@ -270,6 +270,13 @@ evas_object_image_animated_frame_set(Evas_Object *obj, int frame_index) _evas_image_animated_frame_set(obj, frame_index); } +EAPI int +evas_object_image_animated_frame_get(Evas_Object *obj) +{ + EVAS_IMAGE_API(obj, 0); + return _evas_image_animated_frame_get(obj); +} + EAPI int evas_object_image_animated_frame_count_get(const Evas_Object *obj) { diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h index f0f209d3e3..3aa70bf3f8 100644 --- a/src/lib/evas/include/evas_private.h +++ b/src/lib/evas/include/evas_private.h @@ -1478,6 +1478,7 @@ struct _Evas_Func int (*image_animated_loop_count_get) (void *engine, void *image); double (*image_animated_frame_duration_get) (void *engine, void *image, int start_frame, int frame_num); Eina_Bool (*image_animated_frame_set) (void *engine, void *image, int frame_index); + int (*image_animated_frame_get) (void *engine, void *image); /* max size query */ void (*image_max_size_get)(void *engine, int *maxw, int *maxh); diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c index 3f4c36c73b..e73c486073 100644 --- a/src/modules/evas/engines/gl_generic/evas_engine.c +++ b/src/modules/evas/engines
[EGIT] [core/efl] master 01/01: evas_render: use do_async for mapped child (SW)
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=4a74a9fc697446e0b8bba6c7f676059366f43931 commit 4a74a9fc697446e0b8bba6c7f676059366f43931 Author: Shinwoo Kim Date: Mon Mar 16 19:15:17 2020 +0900 evas_render: use do_async for mapped child (SW) Summary: On the SW engine, the rendering has inconsistent between smart object and non-smart object, if they are mapped children. The smart object does ASYNC render while the non-smart object does SYNC render. Because of this there is a filckering rendering problem. [Problem] The following is a case of problems. elm_layout (mapped, map_surface_1) │ ├─ elm_image_1 (mapped) │ └─ elm_image_2 (not mapped) │ └─ evas_object_image After elm_image_1 adds draw command to the draw thread queue, and it starts its drawing on the map_surface_1 on a thread, and stops middle of drawing. At this point, evas_object_image does SYNC draw on the same surface map_surface_1. And the thread for elm_image_1 works for remains. Because the evas_object_image draws before finishing drawing of elm_image_1, There is the problem. F.Y.I. From the first evas_render has done SYNC render for mapped child. cb10c7d evas: Modify software_generic ... with threaded renderer This patch makes mapped children do ASYNC render. Test Plan: {F3856130} {F3856131} Reviewers: Hermet, jsuya, herb Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11506 --- src/lib/evas/canvas/evas_render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c index 53179ec5bc..4738c80480 100644 --- a/src/lib/evas/canvas/evas_render.c +++ b/src/lib/evas/canvas/evas_render.c @@ -2241,7 +2241,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj, #endif obj->func->render(eo_obj, obj, obj->private_data, -ENC, output, ctx, surface, off_x, off_y, EINA_FALSE); +ENC, output, ctx, surface, off_x, off_y, do_async); } } else if (!obj->is_smart) --
[EGIT] [core/efl] master 01/01: evas: fix dereference after null check
zmike pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=90cc0c465cd7ea4085170b2bfeb8ba7ebf29eee2 commit 90cc0c465cd7ea4085170b2bfeb8ba7ebf29eee2 Author: Shinwoo Kim Date: Fri Apr 10 08:45:22 2020 -0400 evas: fix dereference after null check Summary: Static analysis tool reports passing a null pointer 'im->gc' to _evas_gl_image_cache_add which directly dereferences it, so lets be sure that 'im->gc' is valid before passing it to cache_add Reviewers: Hermet, jsuya, herb, zmike Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11676 --- src/modules/evas/engines/gl_common/evas_gl_image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/evas/engines/gl_common/evas_gl_image.c b/src/modules/evas/engines/gl_common/evas_gl_image.c index 37de0ba068..41806c1ea6 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_image.c +++ b/src/modules/evas/engines/gl_common/evas_gl_image.c @@ -716,7 +716,7 @@ evas_gl_common_image_free(Evas_GL_Image *im) { if (!im->cs.no_free) free(im->cs.data); } - if (im->cached) + if (im->cached && im->gc) { if (_evas_gl_image_cache_add(im)) return; } --
[EGIT] [core/efl] master 01/01: elm_atspi_bridge: fix memory leak
woohyun pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b79b3eea00c7f7d7cd3268df4fc1bb8b5f66444e commit b79b3eea00c7f7d7cd3268df4fc1bb8b5f66444e Author: Shinwoo Kim Date: Mon Apr 13 11:17:19 2020 +0900 elm_atspi_bridge: fix memory leak Summary: Dynamic memory is allocated by calling function 'eldbus_message_iter_container_new' and lost by returning without free. Reviewers: Hermet, woohyun, jsuya, herb Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11688 --- src/lib/elementary/elm_atspi_bridge.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/elementary/elm_atspi_bridge.c b/src/lib/elementary/elm_atspi_bridge.c index 0693fdb22a..ff0f35e102 100644 --- a/src/lib/elementary/elm_atspi_bridge.c +++ b/src/lib/elementary/elm_atspi_bridge.c @@ -1644,6 +1644,7 @@ _text_attributes_get(const Eldbus_Service_Interface *iface, const Eldbus_Message } else { +eldbus_message_iter_container_close(iter, iter_array); goto fail; } @@ -1706,6 +1707,7 @@ _text_default_attributes_get(const Eldbus_Service_Interface *iface, const Eldbus else { eldbus_message_unref(ret); +eldbus_message_iter_container_close(iter, iter_array); return _dbus_invalid_ref_error_new(msg); } --
[EGIT] [core/efl] master 01/01: elm_atspi_bridge: initialize variables
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=85199d546240641404ceb8f20efd5f049478af8c commit 85199d546240641404ceb8f20efd5f049478af8c Author: Shinwoo Kim Date: Mon Mar 30 05:19:19 2020 + elm_atspi_bridge: initialize variables The efl_access_text_attribute_get is resolved by elm_entry. Please refer to _elm_entry_efl_access_text_attribute_get first. Uninitialized variables are used for its parameters, and it is able to return before setting these variables. Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D11619 --- src/lib/elementary/elm_atspi_bridge.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/elementary/elm_atspi_bridge.c b/src/lib/elementary/elm_atspi_bridge.c index 23cbd98a97..0693fdb22a 100644 --- a/src/lib/elementary/elm_atspi_bridge.c +++ b/src/lib/elementary/elm_atspi_bridge.c @@ -1303,7 +1303,7 @@ _text_string_at_offset_get(const Eldbus_Service_Interface *iface, const Eldbus_M const char *obj_path = eldbus_message_path_get(msg); char *str; Efl_Access_Text_Granularity gran; - int start, end; + int start = 0, end = 0; Eldbus_Message *ret; Eo *bridge = eldbus_service_object_data_get(iface, ELM_ATSPI_BRIDGE_CLASS_NAME); Eo *obj = _bridge_object_from_path(bridge, obj_path); @@ -1523,7 +1523,7 @@ _text_attribute_value_get(const Eldbus_Service_Interface *iface, const Eldbus_Me char *value = NULL; Eo *bridge = eldbus_service_object_data_get(iface, ELM_ATSPI_BRIDGE_CLASS_NAME); Eo *obj = _bridge_object_from_path(bridge, obj_path); - int start, end; + int start = 0, end = 0; Eldbus_Message *ret; Eina_Bool res = EINA_FALSE; Eina_Iterator *annotations; @@ -1589,7 +1589,7 @@ _text_attributes_get(const Eldbus_Service_Interface *iface, const Eldbus_Message const char *obj_path = eldbus_message_path_get(msg); Eo *bridge = eldbus_service_object_data_get(iface, ELM_ATSPI_BRIDGE_CLASS_NAME); Eo *obj = _bridge_object_from_path(bridge, obj_path); - int start, end; + int start = 0, end = 0; Eldbus_Message *ret; Eldbus_Message_Iter *iter, *iter_array; Efl_Access_Text_Attribute *attr; @@ -2203,7 +2203,7 @@ _text_run_attributes_get(const Eldbus_Service_Interface *iface, const Eldbus_Mes const char *obj_path = eldbus_message_path_get(msg); Eo *bridge = eldbus_service_object_data_get(iface, ELM_ATSPI_BRIDGE_CLASS_NAME); Eo *obj = _bridge_object_from_path(bridge, obj_path); - int start, end; + int start = 0, end = 0; Eldbus_Message *ret; Eldbus_Message_Iter *iter, *iter_array; Eina_List *attrs, *defaults; --
[EGIT] [core/efl] master 01/01: evas: fix png regression issue
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=5801bc07f501cba34d0345bca2dae39d7628e175 commit 5801bc07f501cba34d0345bca2dae39d7628e175 Author: Shinwoo Kim Date: Thu May 7 12:15:02 2020 +0900 evas: fix png regression issue Summary: Accidentally commit "382c580 evas: add support for .9.png file to PNG loader." adding the 9 patch feature with small code refactoring made use of setjmp incorrectly. [Problem] evas_image_load_file_data_png calls _evas_image_load_file_internal_head_png, and _evas_image_load_file_internal_head_png calls setjmp and returns without problem. And png_read_row calls longjmp. This causes jumping into a function which was exited. Problematic png file will be attached. [Solution] Save calling environment i.e. call setjmp, after returning from _evas_image_load_file_internal_head_png. Test Plan: Problematic png file {F3876983} And example code. {F3876986} Reviewers: Hermet, jsuya, herb Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11782 --- src/modules/evas/image_loaders/png/evas_image_load_png.c | 12 1 file changed, 12 insertions(+) diff --git a/src/modules/evas/image_loaders/png/evas_image_load_png.c b/src/modules/evas/image_loaders/png/evas_image_load_png.c index 3af01a1a2d..5b8d33f8d3 100644 --- a/src/modules/evas/image_loaders/png/evas_image_load_png.c +++ b/src/modules/evas/image_loaders/png/evas_image_load_png.c @@ -316,6 +316,12 @@ evas_image_load_file_head_with_data_png(void *loader_data, if (!_evas_image_load_file_internal_head_png(loader, prop, , error, EINA_FALSE)) return EINA_FALSE; + if (setjmp(png_jmpbuf(epi.png_ptr))) + { +*error = EVAS_LOAD_ERROR_CORRUPT_FILE; +goto close_file; + } + image_w = epi.w32; image_h = epi.h32; @@ -613,6 +619,12 @@ evas_image_load_file_data_png(void *loader_data, if (!_evas_image_load_file_internal_head_png(loader, prop, , error, EINA_FALSE)) return EINA_FALSE; + if (setjmp(png_jmpbuf(epi.png_ptr))) + { +*error = EVAS_LOAD_ERROR_CORRUPT_FILE; +goto close_file; + } + image_w = epi.w32; image_h = epi.h32; if (opts->emile.scale_down_by > 1) --
[EGIT] [core/efl] efl-1.24 01/01: evas: fix png regression issue
raster pushed a commit to branch efl-1.24. http://git.enlightenment.org/core/efl.git/commit/?id=6a5b253a72f659f36d6e19bf467672c529d56b86 commit 6a5b253a72f659f36d6e19bf467672c529d56b86 Author: Shinwoo Kim Date: Thu May 7 12:15:02 2020 +0900 evas: fix png regression issue Summary: Accidentally commit "382c580 evas: add support for .9.png file to PNG loader." adding the 9 patch feature with small code refactoring made use of setjmp incorrectly. [Problem] evas_image_load_file_data_png calls _evas_image_load_file_internal_head_png, and _evas_image_load_file_internal_head_png calls setjmp and returns without problem. And png_read_row calls longjmp. This causes jumping into a function which was exited. Problematic png file will be attached. [Solution] Save calling environment i.e. call setjmp, after returning from _evas_image_load_file_internal_head_png. Test Plan: Problematic png file {F3876983} And example code. {F3876986} Reviewers: Hermet, jsuya, herb Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11782 --- src/modules/evas/image_loaders/png/evas_image_load_png.c | 12 1 file changed, 12 insertions(+) diff --git a/src/modules/evas/image_loaders/png/evas_image_load_png.c b/src/modules/evas/image_loaders/png/evas_image_load_png.c index 3af01a1a2d..5b8d33f8d3 100644 --- a/src/modules/evas/image_loaders/png/evas_image_load_png.c +++ b/src/modules/evas/image_loaders/png/evas_image_load_png.c @@ -316,6 +316,12 @@ evas_image_load_file_head_with_data_png(void *loader_data, if (!_evas_image_load_file_internal_head_png(loader, prop, , error, EINA_FALSE)) return EINA_FALSE; + if (setjmp(png_jmpbuf(epi.png_ptr))) + { +*error = EVAS_LOAD_ERROR_CORRUPT_FILE; +goto close_file; + } + image_w = epi.w32; image_h = epi.h32; @@ -613,6 +619,12 @@ evas_image_load_file_data_png(void *loader_data, if (!_evas_image_load_file_internal_head_png(loader, prop, , error, EINA_FALSE)) return EINA_FALSE; + if (setjmp(png_jmpbuf(epi.png_ptr))) + { +*error = EVAS_LOAD_ERROR_CORRUPT_FILE; +goto close_file; + } + image_w = epi.w32; image_h = epi.h32; if (opts->emile.scale_down_by > 1) --
[EGIT] [core/efl] efl-1.24 01/01: evas: use SEQUENTIAL for decoding png file
raster pushed a commit to branch efl-1.24. http://git.enlightenment.org/core/efl.git/commit/?id=16378307fa1f39a513862942a6d104a07cc62f1a commit 16378307fa1f39a513862942a6d104a07cc62f1a Author: Shinwoo Kim Date: Thu May 7 08:56:40 2020 +0100 evas: use SEQUENTIAL for decoding png file Summary: There was a mistake caused by "2a0eeba evas: fix png regression issue". The flag is_for_data was close_file before this commit. _evas_image_load_file_internal_head_png closes file if it is called only for header. So the close_file does not mean is_for_data. This patch is changing is_for_data to is_for_head, and make _evas_image_load_file_internal_head_png use EINA_FILE_SEQUENTIAL for data decoding. Reviewers: Hermet, jsuya, herb, raster Reviewed By: raster Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11783 --- src/modules/evas/image_loaders/png/evas_image_load_png.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modules/evas/image_loaders/png/evas_image_load_png.c b/src/modules/evas/image_loaders/png/evas_image_load_png.c index 5b8d33f8d3..686cc2966c 100644 --- a/src/modules/evas/image_loaders/png/evas_image_load_png.c +++ b/src/modules/evas/image_loaders/png/evas_image_load_png.c @@ -116,7 +116,7 @@ static Eina_Bool _evas_image_load_file_internal_head_png(Evas_Loader_Internal *loader, Evas_Image_Property *prop, Evas_PNG_Info *epi, -int *error, Eina_Bool is_for_data) +int *error, Eina_Bool is_for_head) { Evas_Image_Load_Opts *opts = loader->opts; Eina_File *f = loader->f; @@ -125,10 +125,10 @@ _evas_image_load_file_internal_head_png(Evas_Loader_Internal *loader, *error = EVAS_LOAD_ERROR_NONE; epi->hasa = 0; - if (!is_for_data) - epi->map = eina_file_map_all(f, EINA_FILE_RANDOM); - else + if (!is_for_head) epi->map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); + else + epi->map = eina_file_map_all(f, EINA_FILE_RANDOM); if (!epi->map) { *error = EVAS_LOAD_ERROR_CORRUPT_FILE; @@ -219,7 +219,7 @@ _evas_image_load_file_internal_head_png(Evas_Loader_Internal *loader, if (png_get_valid(epi->png_ptr, epi->info_ptr, PNG_INFO_tRNS)) { /* expand transparency entry -> alpha channel if present */ -if (!is_for_data) png_set_tRNS_to_alpha(epi->png_ptr); +if (!is_for_head) png_set_tRNS_to_alpha(epi->png_ptr); epi->hasa = 1; } @@ -248,7 +248,7 @@ _evas_image_load_file_internal_head_png(Evas_Loader_Internal *loader, r = EINA_TRUE; - if (!is_for_data) return r; + if (!is_for_head) return r; close_file: if (epi->png_ptr) png_destroy_read_struct(>png_ptr, --
[EGIT] [core/efl] master 01/01: evas: use SEQUENTIAL for decoding png file
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=5f159ae624bbe4211c50e1122756c341c437656a commit 5f159ae624bbe4211c50e1122756c341c437656a Author: Shinwoo Kim Date: Thu May 7 08:56:40 2020 +0100 evas: use SEQUENTIAL for decoding png file Summary: There was a mistake caused by "2a0eeba evas: fix png regression issue". The flag is_for_data was close_file before this commit. _evas_image_load_file_internal_head_png closes file if it is called only for header. So the close_file does not mean is_for_data. This patch is changing is_for_data to is_for_head, and make _evas_image_load_file_internal_head_png use EINA_FILE_SEQUENTIAL for data decoding. Reviewers: Hermet, jsuya, herb, raster Reviewed By: raster Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11783 --- src/modules/evas/image_loaders/png/evas_image_load_png.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modules/evas/image_loaders/png/evas_image_load_png.c b/src/modules/evas/image_loaders/png/evas_image_load_png.c index 5b8d33f8d3..686cc2966c 100644 --- a/src/modules/evas/image_loaders/png/evas_image_load_png.c +++ b/src/modules/evas/image_loaders/png/evas_image_load_png.c @@ -116,7 +116,7 @@ static Eina_Bool _evas_image_load_file_internal_head_png(Evas_Loader_Internal *loader, Evas_Image_Property *prop, Evas_PNG_Info *epi, -int *error, Eina_Bool is_for_data) +int *error, Eina_Bool is_for_head) { Evas_Image_Load_Opts *opts = loader->opts; Eina_File *f = loader->f; @@ -125,10 +125,10 @@ _evas_image_load_file_internal_head_png(Evas_Loader_Internal *loader, *error = EVAS_LOAD_ERROR_NONE; epi->hasa = 0; - if (!is_for_data) - epi->map = eina_file_map_all(f, EINA_FILE_RANDOM); - else + if (!is_for_head) epi->map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); + else + epi->map = eina_file_map_all(f, EINA_FILE_RANDOM); if (!epi->map) { *error = EVAS_LOAD_ERROR_CORRUPT_FILE; @@ -219,7 +219,7 @@ _evas_image_load_file_internal_head_png(Evas_Loader_Internal *loader, if (png_get_valid(epi->png_ptr, epi->info_ptr, PNG_INFO_tRNS)) { /* expand transparency entry -> alpha channel if present */ -if (!is_for_data) png_set_tRNS_to_alpha(epi->png_ptr); +if (!is_for_head) png_set_tRNS_to_alpha(epi->png_ptr); epi->hasa = 1; } @@ -248,7 +248,7 @@ _evas_image_load_file_internal_head_png(Evas_Loader_Internal *loader, r = EINA_TRUE; - if (!is_for_data) return r; + if (!is_for_head) return r; close_file: if (epi->png_ptr) png_destroy_read_struct(>png_ptr, --
[EGIT] [core/efl] master 01/01: png: handle file name .9.png
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=9c0484c9cb5bc9d9569a31d8e49f4fff31b0b472 commit 9c0484c9cb5bc9d9569a31d8e49f4fff31b0b472 Author: Shinwoo Kim Date: Tue May 19 11:57:55 2020 +0900 png: handle file name .9.png Summary: .9.png is not 9 patch file, but a png file which name is .9 Test Plan: evas_object_image_file_set(image, "./.9.png", NULL); Reviewers: Hermet, jsuya, herb Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11848 --- src/modules/evas/image_loaders/png/evas_image_load_png.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/modules/evas/image_loaders/png/evas_image_load_png.c b/src/modules/evas/image_loaders/png/evas_image_load_png.c index 686cc2966c..0558c3e9cf 100644 --- a/src/modules/evas/image_loaders/png/evas_image_load_png.c +++ b/src/modules/evas/image_loaders/png/evas_image_load_png.c @@ -121,6 +121,8 @@ _evas_image_load_file_internal_head_png(Evas_Loader_Internal *loader, Evas_Image_Load_Opts *opts = loader->opts; Eina_File *f = loader->f; volatile Eina_Bool r = EINA_FALSE; + const char *filename; + unsigned int filename_len = 0; *error = EVAS_LOAD_ERROR_NONE; @@ -238,7 +240,10 @@ _evas_image_load_file_internal_head_png(Evas_Loader_Internal *loader, } if (epi->hasa) prop->info.alpha = 1; - prop->need_data = eina_str_has_extension(eina_file_filename_get(f), ".9.png"); + filename = eina_file_filename_get(f); + if (filename) filename_len = strlen(filename); + prop->need_data = (filename_len > 6 && filename[filename_len - 7] != '/') && + (eina_str_has_extension(filename, ".9.png")); if (prop->need_data) { // Adjust size to take into account the 9 patch pixels information --
[EGIT] [core/efl] master 01/01: evas: do not call evas_object_change in reneder_post
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=7b21b6fb97aa7c069ab378b6af81bc96a6842d9b commit 7b21b6fb97aa7c069ab378b6af81bc96a6842d9b Author: Shinwoo Kim Date: Tue May 19 13:14:29 2020 +0900 evas: do not call evas_object_change in reneder_post Summary: evas_render_updates_internal > eina_array_remove is calling pending_change pending_change > render_post could call evas_object_change > evas_render_object_recalc. The eina_array is removing its item from pending_objects, while the evas_object_change that is calling evas_render_object_recalc is adding item to pending_objects. As a result, the pending_objects.count is incorrect, and it breaks render. Reviewers: Hermet, jsuya, herb Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11835 --- src/lib/evas/canvas/evas_main.c | 2 ++ src/lib/evas/canvas/evas_object_image.c | 2 +- src/lib/evas/canvas/evas_render.c | 19 +++ src/lib/evas/include/evas_private.h | 2 ++ 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c index 956e13dbcf..b6eab9f411 100644 --- a/src/lib/evas/canvas/evas_main.c +++ b/src/lib/evas/canvas/evas_main.c @@ -363,6 +363,7 @@ _evas_canvas_efl_object_constructor(Eo *eo_obj, Evas_Public_Data *e) EVAS_ARRAY_SET(e, glyph_unref_queue); EVAS_ARRAY_SET(e, texts_unref_queue); + eina_array_step_set(>render_post_change_objects, sizeof(e->render_post_change_objects), 10); eina_array_step_set(>map_clip_objects, sizeof(e->map_clip_objects), 64); e->active_objects.version = EINA_ARRAY_VERSION; @@ -648,6 +649,7 @@ _evas_canvas_efl_object_destructor(Eo *eo_e, Evas_Public_Data *e) eina_array_flush(>texts_unref_queue); eina_array_flush(>map_clip_objects); eina_hash_free(e->focused_objects); + eina_array_flush(>render_post_change_objects); SLKL(e->post_render.lock); EINA_INLIST_FREE(e->post_render.jobs, job) diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index cad6291286..958fabaf00 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -3256,7 +3256,7 @@ evas_object_image_render_post(Evas_Object *eo_obj EINA_UNUSED, /* FIXME: copy strings across */ //Somehow(preloading cancelled) image has been changed, need to redraw. - if (o->changed) evas_object_change(eo_obj, obj); + if (o->changed) evas_render_post_change_object_push(obj); } static void * diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c index 1d47ba06af..139e292ad3 100644 --- a/src/lib/evas/canvas/evas_render.c +++ b/src/lib/evas/canvas/evas_render.c @@ -3761,6 +3761,14 @@ evas_render_updates_internal(Evas *eo_e, } eina_evlog("-render_post_reset", eo_e, 0.0, NULL); + for (i = 0; i < e->render_post_change_objects.count; ++i) + { +obj = eina_array_data_get(>render_post_change_objects, i); +eo_obj = obj->object; +evas_object_change(eo_obj, obj); + } + OBJS_ARRAY_CLEAN(>render_post_change_objects); + eina_evlog("+render_end", eo_e, 0.0, NULL); e->changed = EINA_FALSE; e->viewport.changed = EINA_FALSE; @@ -4327,5 +4335,16 @@ evas_post_render_job_add(Evas_Public_Data *pd, void (*func)(void *), void *data) SLKU(pd->post_render.lock); } +void +evas_render_post_change_object_push(Evas_Object_Protected_Data *obj) +{ + Evas_Public_Data *e; + + if (!obj || !obj->layer || !obj->layer->evas) return; + + e = obj->layer->evas; + OBJ_ARRAY_PUSH(>render_post_change_objects, obj); +} + /* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/ diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h index 3a24821dd2..6d00cd7a21 100644 --- a/src/lib/evas/include/evas_private.h +++ b/src/lib/evas/include/evas_private.h @@ -455,6 +455,7 @@ struct _Evas_Public_Data Eina_Array texts_unref_queue; Eina_Array map_clip_objects; Eina_List *finalize_objects; + Eina_Array render_post_change_objects; struct { Evas_Post_Render_Job *jobs; @@ -1283,6 +1284,7 @@ void evas_unref_queue_image_put(Evas_Public_Data *pd, void *image); void evas_unref_queue_glyph_put(Evas_Public_Data *pd, void *glyph); void evas_unref_queue_texts_put(Evas_Public_Data *pd, void *glyph); void evas_post_render_job_add(Evas_Public_Data *pd, void (*func)(void *), void *data); +void evas_render_post_change_object_push(Evas_Object_Protected_Data *obj); void evas_draw_image_map_async_check(Evas_Object_Protected_Data *obj, void *engine, void *data, void *context, void *surface, --
[EGIT] [core/efl] master 01/01: evas filter: work for native surface
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=c58fef1f6ee324d947bcc819ec4229f8aee50dc8 commit c58fef1f6ee324d947bcc819ec4229f8aee50dc8 Author: Shinwoo Kim Date: Fri Mar 20 15:37:31 2020 +0900 evas filter: work for native surface Summary: Filter does not know how to draw native surface image using engine_data. It means that only image knows how to draw it. In case of GL engine, image is using a shader program for IMAGENATIVE in the common_context_image_push. This patch makes filter work for native surface image by drawing the native surface first using the common_context_image_push as below. Before: image -> common_filter_*_push -> filter_output After: image -> common_context_image_push -> filter_input -> common_filter_*_push -> filter_output Test Plan: {F3856981} Reviewers: Hermet, jsuya, herb Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11546 --- src/lib/evas/canvas/evas_object_image.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index 6ed0fe0ed2..32939b769c 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -2044,7 +2044,8 @@ _efl_canvas_image_internal_efl_canvas_filter_internal_filter_input_render( H = obj->cur->geometry.h; // FIXME: In GL we could use the image even if scaled - if (!_image_has_border(obj, o) && _image_is_filled(obj, o) && !_image_is_scaled(obj, o)) + if (!(ENFN->image_native_get && ENFN->image_native_get(engine, o->engine_data)) && + !_image_has_border(obj, o) && _image_is_filled(obj, o) && !_image_is_scaled(obj, o)) { int imagew, imageh, uvw, uvh; --
[EGIT] [core/efl] master 01/01: evas vg: check object changed as well
raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=7b7f69e09fb198a881a931bd79ac61b5260b1bb0 commit 7b7f69e09fb198a881a931bd79ac61b5260b1bb0 Author: Shinwoo Kim Date: Wed Sep 9 12:14:48 2020 +0100 evas vg: check object changed as well Summary: evas cannot render vg object if Efl_Canvas_Vg_Object_Data.changed is ture and Evas_Object_Protected_Data.changed is false, when vg object marks itself as changed. Above case is possible depending on the draw area which is calculated by eng_output_redraws_next_update_get. If this function returns NULL, the vg object render function is not called, and vd->changed remains true. Only vd->obj->changed is set to false by vas_object_change_reset. Reviewers: Hermet, jsuya, herb, raster Reviewed By: raster Subscribers: raster, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12136 --- src/lib/evas/canvas/evas_vg_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/evas_vg_private.h b/src/lib/evas/canvas/evas_vg_private.h index aba4e9d27b..2431722b46 100644 --- a/src/lib/evas/canvas/evas_vg_private.h +++ b/src/lib/evas/canvas/evas_vg_private.h @@ -154,7 +154,7 @@ void efl_canvas_vg_container_blend_buffer_clear(Efl_VG *o static inline void efl_canvas_vg_object_change(Efl_Canvas_Vg_Object_Data *vd) { - if (!vd || vd->changed) return; + if (!vd || (vd->changed && vd->obj->changed)) return; vd->changed = EINA_TRUE; evas_object_change(vd->obj->object, vd->obj); } --
[EGIT] [core/efl] master 01/01: efl_ui_image: update orientation immediately
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b954640db8cd34061592c6c8865ddbeea7a3e640 commit b954640db8cd34061592c6c8865ddbeea7a3e640 Author: Shinwoo Kim Date: Fri Aug 28 14:54:11 2020 +0900 efl_ui_image: update orientation immediately Summary: It is able to get orientation information of inlined image object. This information should be same during its life time. The inlined image object got correct information only after size calculation, so there is a kind of timing issue. An example will be attached for more details. I am not sure what the regression bug mentioned on D6855, but this will keep compatibility of behavior. Actually it seems that the compatibility was broken by D9686 which does not call _efl_ui_image_sizing_eval immediately. Test Plan: {F3947703} Reviewers: Hermet, jsuya, herb Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12114 --- src/lib/elementary/efl_ui_image.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c index 1cabdf32c3..9e91dd7ac0 100644 --- a/src/lib/elementary/efl_ui_image.c +++ b/src/lib/elementary/efl_ui_image.c @@ -2605,6 +2605,9 @@ elm_image_orient_set(Evas_Object *obj, Elm_Image_Orient elm_orient) EINA_SAFETY_ON_FALSE_RETURN(elm_orient >= 0 && elm_orient < 8); sd->image_orient = elm_orient; efl_gfx_image_orientation_set(obj, efl_orient[elm_orient]); + + // to keep behavior compatibility, update inlined image orientation + if (sd->img) efl_gfx_image_orientation_set(sd->img, efl_orient[elm_orient]); } EAPI Elm_Image_Orient --
[EGIT] [core/efl] master 01/01: evas vg: check vg changed
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=46eca1108c6982fbb26bc60ff5bc6a1f92444bc2 commit 46eca1108c6982fbb26bc60ff5bc6a1f92444bc2 Author: Shinwoo Kim Date: Thu Sep 24 12:16:49 2020 +0900 evas vg: check vg changed Summary: It is not able to render even though vg object has a chance to render, because evas_object_smart_changed_get checks only Evas_Object_Protected_Data, when Efl_Canvas_Vg_Object_Data.changed is TRUE. Reviewers: Hermet, jsuya, herb Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12152 --- src/lib/evas/canvas/efl_canvas_vg_object.c | 8 src/lib/evas/canvas/evas_object_smart.c| 5 - src/lib/evas/include/evas_private.h| 2 ++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/efl_canvas_vg_object.c b/src/lib/evas/canvas/efl_canvas_vg_object.c index 1c49ac5ac1..5317c375a6 100644 --- a/src/lib/evas/canvas/efl_canvas_vg_object.c +++ b/src/lib/evas/canvas/efl_canvas_vg_object.c @@ -384,6 +384,7 @@ _efl_canvas_vg_object_efl_object_constructor(Eo *eo_obj, Efl_Canvas_Vg_Object_Da obj->func = _func; obj->private_data = efl_data_ref(eo_obj, MY_CLASS); obj->type = o_type; + obj->is_vg_object = EINA_TRUE; /* default root node */ pd->obj = obj; @@ -1163,5 +1164,12 @@ evas_object_vg_fill_mode_get(const Evas_Object *obj) return _efl_ui_canvas_object_vg_fill_mode_to_evas_object_vg_fill_mode(efl_canvas_vg_object_fill_mode_get(obj)); } +Eina_Bool +evas_object_vg_changed_get(Evas_Object_Protected_Data *obj) +{ + Efl_Canvas_Vg_Object_Data *pd = obj->private_data; + return pd->changed; +} + #include "efl_canvas_vg_object.eo.c" #include "efl_canvas_vg_object_eo.legacy.c" diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c index 2a27d7b1e8..cc0ab2c09d 100644 --- a/src/lib/evas/canvas/evas_object_smart.c +++ b/src/lib/evas/canvas/evas_object_smart.c @@ -1392,7 +1392,10 @@ evas_object_smart_changed_get(Evas_Object_Protected_Data *obj) if (has_map) { if ((obj->need_surface_clear && obj->changed && !obj->is_smart) || - ((obj->changed_pchange) && (obj->changed_map))) + ((obj->changed_pchange) && (obj->changed_map)) || + /* A condition for a rare case which has obj->changed is FALSE, +but Efl_Canvas_Vg_Object_Data.changed is TRUE. */ + (obj->is_vg_object && evas_object_vg_changed_get(obj))) return EINA_TRUE; } } diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h index d270b2be65..1af914f51c 100644 --- a/src/lib/evas/include/evas_private.h +++ b/src/lib/evas/include/evas_private.h @@ -825,6 +825,7 @@ struct _Evas_Object_Protected_Data Eina_Bool events_filter_enabled : 1; Eina_Bool is_pointer_inside_legacy : 1; Eina_Bool is_filter_object : 1; + Eina_Bool is_vg_object : 1; }; struct _Evas_Data_Node @@ -1251,6 +1252,7 @@ void evas_call_smarts_calculate(Evas *e); void evas_object_smart_bounding_box_update(Evas_Object_Protected_Data *obj); void evas_object_smart_need_bounding_box_update(Evas_Smart_Data *o, Evas_Object_Protected_Data *obj); Eina_Bool evas_object_smart_changed_get(Evas_Object_Protected_Data *obj); +Eina_Bool evas_object_vg_changed_get(Evas_Object_Protected_Data *obj); void evas_object_smart_attach(Evas_Object *eo_obj, Evas_Smart *s); void _evas_post_event_callback_call_real(Evas *e, Evas_Public_Data* e_pd, int min_event_id); #define _evas_post_event_callback_call(e, pd, id) do { \ --
[EGIT] [core/efl] master 01/01: evas_render: do not use mask of proxy source
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ea531d1c4dd767a8895baf8d8bdd113b8a96d76b commit ea531d1c4dd767a8895baf8d8bdd113b8a96d76b Author: Shinwoo Kim Date: Thu May 28 10:40:40 2020 +0900 evas_render: do not use mask of proxy source Summary: A mask of proxy source can be same with a mask of proxy source's child. If source_clip is false, then the child object should not use the mask. Test Plan: {F3888363} Reviewers: Hermet, herb, jsuya Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11870 --- src/lib/evas/canvas/evas_render.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c index f8abfd5700..f80cb24c8d 100644 --- a/src/lib/evas/canvas/evas_render.c +++ b/src/lib/evas/canvas/evas_render.c @@ -1755,6 +1755,9 @@ _evas_render_mapped_mask(Evas_Public_Data *evas, Evas_Object_Protected_Data *obj Evas_Proxy_Render_Data *proxy_render_data, void *output, void *ctx, int off_x, int off_y, int level, Eina_Bool do_async) { if (!mask) return; + if (proxy_render_data && + !proxy_render_data->source_clip && + proxy_render_data->src_obj->clip.mask == mask) return; // This path can be hit when we're multiplying masks on top of each other... Evas_Object_Protected_Data *prev_mask = obj->clip.prev_mask; --
[EGIT] [core/efl] master 01/01: evas image: reload after alpha_set
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=104caf05148a79e195179e723e508f21b8664b07 commit 104caf05148a79e195179e723e508f21b8664b07 Author: Shinwoo Kim Date: Mon May 25 14:48:31 2020 +0900 evas image: reload after alpha_set Summary: The alpha_set cancels preload, and do not try to load it again. So the image is not showing, if the alpha_set is called while preloading. [Sample] Evas_Object *image = elm_image_add(box); elm_box_pack_end(box, image); evas_object_show(image); elm_image_file_set(image, "img.png", NULL); // start preloading Evas_Object *eimg = elm_image_object_get(image); evas_object_image_alpha_set(eimg, EINA_TRUE); // cancel preloading Reviewers: Hermet, jsuya, herb Reviewed By: Hermet Subscribers: zmike, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11864 --- src/lib/evas/canvas/evas_object_image.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index 958fabaf00..1e8e32cd94 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -1142,6 +1142,10 @@ _efl_canvas_image_internal_efl_gfx_buffer_alpha_set(Eo *eo_obj, Evas_Image_Data { Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); + has_alpha = !!has_alpha; + if (has_alpha == o->cur->has_alpha) + return; + evas_object_async_block(obj); if ((o->preload & EVAS_IMAGE_PRELOADING) && (o->engine_data)) { @@ -1149,10 +1153,6 @@ _efl_canvas_image_internal_efl_gfx_buffer_alpha_set(Eo *eo_obj, Evas_Image_Data ENFN->image_data_preload_cancel(ENC, o->engine_data, eo_obj, EINA_TRUE); } - has_alpha = !!has_alpha; - if (has_alpha == o->cur->has_alpha) - return; - EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write) { state_write->has_alpha = has_alpha; --
[EGIT] [core/efl] efl-1.24 09/09: evas image: reload after alpha_set
stefan pushed a commit to branch efl-1.24. http://git.enlightenment.org/core/efl.git/commit/?id=5b8a1f4a788666d7c74af63f36a5413f5463174e commit 5b8a1f4a788666d7c74af63f36a5413f5463174e Author: Shinwoo Kim Date: Mon May 25 14:48:31 2020 +0900 evas image: reload after alpha_set Summary: The alpha_set cancels preload, and do not try to load it again. So the image is not showing, if the alpha_set is called while preloading. [Sample] Evas_Object *image = elm_image_add(box); elm_box_pack_end(box, image); evas_object_show(image); elm_image_file_set(image, "img.png", NULL); // start preloading Evas_Object *eimg = elm_image_object_get(image); evas_object_image_alpha_set(eimg, EINA_TRUE); // cancel preloading Reviewers: Hermet, jsuya, herb Reviewed By: Hermet Subscribers: zmike, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11864 --- src/lib/evas/canvas/evas_object_image.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index cad6291286..d8cfc60425 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -1142,6 +1142,10 @@ _efl_canvas_image_internal_efl_gfx_buffer_alpha_set(Eo *eo_obj, Evas_Image_Data { Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); + has_alpha = !!has_alpha; + if (has_alpha == o->cur->has_alpha) + return; + evas_object_async_block(obj); if ((o->preload & EVAS_IMAGE_PRELOADING) && (o->engine_data)) { @@ -1149,10 +1153,6 @@ _efl_canvas_image_internal_efl_gfx_buffer_alpha_set(Eo *eo_obj, Evas_Image_Data ENFN->image_data_preload_cancel(ENC, o->engine_data, eo_obj, EINA_TRUE); } - has_alpha = !!has_alpha; - if (has_alpha == o->cur->has_alpha) - return; - EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write) { state_write->has_alpha = has_alpha; --
[EGIT] [core/efl] efl-1.24 01/09: png: handle file name .9.png
stefan pushed a commit to branch efl-1.24. http://git.enlightenment.org/core/efl.git/commit/?id=1230184ccf82aeae2c1d75bff07c10efe9f9498e commit 1230184ccf82aeae2c1d75bff07c10efe9f9498e Author: Shinwoo Kim Date: Tue May 19 11:57:55 2020 +0900 png: handle file name .9.png Summary: .9.png is not 9 patch file, but a png file which name is .9 Test Plan: evas_object_image_file_set(image, "./.9.png", NULL); Reviewers: Hermet, jsuya, herb Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11848 --- src/modules/evas/image_loaders/png/evas_image_load_png.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/modules/evas/image_loaders/png/evas_image_load_png.c b/src/modules/evas/image_loaders/png/evas_image_load_png.c index 686cc2966c..0558c3e9cf 100644 --- a/src/modules/evas/image_loaders/png/evas_image_load_png.c +++ b/src/modules/evas/image_loaders/png/evas_image_load_png.c @@ -121,6 +121,8 @@ _evas_image_load_file_internal_head_png(Evas_Loader_Internal *loader, Evas_Image_Load_Opts *opts = loader->opts; Eina_File *f = loader->f; volatile Eina_Bool r = EINA_FALSE; + const char *filename; + unsigned int filename_len = 0; *error = EVAS_LOAD_ERROR_NONE; @@ -238,7 +240,10 @@ _evas_image_load_file_internal_head_png(Evas_Loader_Internal *loader, } if (epi->hasa) prop->info.alpha = 1; - prop->need_data = eina_str_has_extension(eina_file_filename_get(f), ".9.png"); + filename = eina_file_filename_get(f); + if (filename) filename_len = strlen(filename); + prop->need_data = (filename_len > 6 && filename[filename_len - 7] != '/') && + (eina_str_has_extension(filename, ".9.png")); if (prop->need_data) { // Adjust size to take into account the 9 patch pixels information --
[EGIT] [core/efl] master 01/02: ecore_wl2_window: do not unmap subsurface in hide
devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d584696f12c6d93e26923ad1ce45f3129b6162e6 commit d584696f12c6d93e26923ad1ce45f3129b6162e6 Author: Shinwoo Kim Date: Tue May 26 11:49:07 2020 -0400 ecore_wl2_window: do not unmap subsurface in hide Summary: If window_hide should unmap subsurface, then window_show should re-map the unmapeed subsurface. I have no idea why window_hide unmap all subsurfs. Reviewers: zmike, devilhorns Reviewed By: zmike, devilhorns Subscribers: devilhorns, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11869 --- src/lib/ecore_wl2/ecore_wl2_window.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index f596a7a9de..3ca227abbc 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -635,9 +635,6 @@ ecore_wl2_window_hide(Ecore_Wl2_Window *window) _ecore_wl2_window_hide_send(window); - EINA_INLIST_FOREACH_SAFE(window->subsurfs, tmp, subsurf) - _ecore_wl2_subsurf_unmap(subsurf); - if (window->commit_pending) { /* We've probably been hidden while an animator --
[EGIT] [core/efl] master 01/01: evas vg: check object changed as well 2
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=e5958965e80724b335fc8b0470d46586e7f29051 commit e5958965e80724b335fc8b0470d46586e7f29051 Author: Shinwoo Kim Date: Thu Sep 17 10:40:24 2020 +0900 evas vg: check object changed as well 2 Summary: evas cannot render vg object if Efl_Canvas_Vg_Node_Data flag is not EFL_GFX_CHANGE_FLAG_NONE and Evas_Object_Protected_Data.changed is FALSE, when vg object marks its node as changed. Above case could be possible if vg object render_pre is not called, and only nd->vd->obj->changed is set to false by evas_object_change_reset. Reviewers: Hermet, jsuya, herb Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12142 --- src/lib/evas/canvas/efl_canvas_vg_node.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/efl_canvas_vg_node.c b/src/lib/evas/canvas/efl_canvas_vg_node.c index a076136815..f2bead512f 100644 --- a/src/lib/evas/canvas/efl_canvas_vg_node.c +++ b/src/lib/evas/canvas/efl_canvas_vg_node.c @@ -19,7 +19,15 @@ static const Efl_Canvas_Vg_Interpolation interpolation_identity = { static void _node_change(Efl_VG *obj, Efl_Canvas_Vg_Node_Data *nd) { - if (!nd || nd->flags != EFL_GFX_CHANGE_FLAG_NONE) return; + if (!nd) return; + if (nd->flags != EFL_GFX_CHANGE_FLAG_NONE) + { + if ((nd->vd && nd->vd->obj) && + (!nd->vd->obj || !nd->vd->obj->changed)) + efl_canvas_vg_object_change(nd->vd); + + return; + } nd->flags = EFL_GFX_CHANGE_FLAG_ALL; Eo *p = obj; --
[EGIT] [core/efl] master 01/01: embryo_cc: ++safty code
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=bab3f870b8150e05cf2b778e67b1f6be326874a7 commit bab3f870b8150e05cf2b778e67b1f6be326874a7 Author: Shinwoo Kim Date: Wed Aug 5 14:52:50 2020 +0900 embryo_cc: ++safty code Summary: This patch is increasing safty code by handling following case. sc_compile > OH!! there is uninitialized loacal variable "outfname"!! > setopt > about > longjmp > setjmp returns 3 > goto cleanup > then uninitialized data is read from local variable "outfname". Reviewers: raster, Hermet, jsuya, herb Reviewed By: jsuya Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12074 --- src/bin/embryo/embryo_cc_sc1.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/bin/embryo/embryo_cc_sc1.c b/src/bin/embryo/embryo_cc_sc1.c index 7595be8299..8f25be75b5 100644 --- a/src/bin/embryo/embryo_cc_sc1.c +++ b/src/bin/embryo/embryo_cc_sc1.c @@ -266,7 +266,7 @@ sc_compile(int argc, char *argv[]) void *inpfmark; charlcl_ctrlchar; int lcl_packstr, lcl_needsemicolon, lcl_tabsize; - Eina_Tmpstr*outfname; + Eina_Tmpstr*outfname = NULL; /* set global variables to their initial value */ binf = NULL; @@ -398,8 +398,11 @@ sc_compile(int argc, char *argv[]) } /* if */ if (outf) sc_closeasm(outf); - unlink(outfname); - eina_tmpstr_del(outfname); + if (outfname) + { +unlink(outfname); +eina_tmpstr_del(outfname); + } if (binf) sc_closebin(binf, errnum != 0); --
[EGIT] [core/efl] master 01/01: ecore_wl2_subsurf: follow wayland spec for sync
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=0e91ec6c78b989dd09610902a5ef8a061a8ee240 commit 0e91ec6c78b989dd09610902a5ef8a061a8ee240 Author: Shinwoo Kim Date: Fri Aug 7 11:59:49 2020 +0900 ecore_wl2_subsurf: follow wayland spec for sync Summary: By default a sub-suface is synchronized mode. So when a sub-surface is created, its sync value should be TRUE. If the E works as specification, user cannot make it work as desynchronized mode by calling subsurface.set_sync(FALSE). [Reference] https://github.com/wayland-project/wayland/blob/master/protocol/wayland.xml is telling "A sub-surface is initially in the synchronized mode." signed-off-by: Shawn Lee Reviewers: Hermet, zmike, devilhorns, raster Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12098 --- src/lib/ecore_wl2/ecore_wl2_subsurf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/ecore_wl2/ecore_wl2_subsurf.c b/src/lib/ecore_wl2/ecore_wl2_subsurf.c index 980c2eed47..5409fd2b26 100644 --- a/src/lib/ecore_wl2/ecore_wl2_subsurf.c +++ b/src/lib/ecore_wl2/ecore_wl2_subsurf.c @@ -65,6 +65,9 @@ ecore_wl2_subsurface_new(Ecore_Wl2_Window *window) goto sub_surf_err; } + /* A sub-surface is initially in the synchronized mode. */ + subsurf->sync = EINA_TRUE; + window->subsurfs = eina_inlist_append(window->subsurfs, EINA_INLIST_GET(subsurf)); --
[EGIT] [core/efl] master 01/01: elm_scroller: use region of proxy soruce for loop
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b61f755e88b898e51554934682e7cd2526b868ab commit b61f755e88b898e51554934682e7cd2526b868ab Author: Shinwoo Kim Date: Fri Jun 19 16:07:06 2020 +0900 elm_scroller: use region of proxy soruce for loop Summary: If size of elm_sclloer content is too big, then the proxy of elm_scroller to show loop effect does not work. Because evas_gl_common_image_surface_new does not allow bigger size surface than max_texture_size. Reviewers: Hermet, jsuya, herb Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11996 --- src/lib/elementary/elm_scroller.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/elm_scroller.c b/src/lib/elementary/elm_scroller.c index 8d20030a91..e21b5cba43 100644 --- a/src/lib/elementary/elm_scroller.c +++ b/src/lib/elementary/elm_scroller.c @@ -328,6 +328,7 @@ _elm_scroller_efl_ui_widget_on_access_activate(Eo *obj, Elm_Scroller_Data *_pd E EOLIAN static void _elm_scroller_efl_canvas_group_group_calculate(Eo *obj, Elm_Scroller_Data *sd) { + Evas_Coord ovw, ovh; Evas_Coord vw = 0, vh = 0, minw = 0, minh = 0, maxw = 0, maxh = 0, w, h, vmw, vmh; Evas_Coord h_pagesize, v_pagesize; @@ -345,6 +346,10 @@ _elm_scroller_efl_canvas_group_group_calculate(Eo *obj, Elm_Scroller_Data *sd) elm_interface_scrollable_content_viewport_geometry_get (obj, NULL, NULL, , ); + + ovw = vw; + ovh = vh; + if (xw > 0.0) { if ((minw > 0) && (vw < minw)) @@ -372,7 +377,8 @@ _elm_scroller_efl_canvas_group_group_calculate(Eo *obj, Elm_Scroller_Data *sd) { if (!sd->proxy_content[i]) continue; elm_interface_scrollable_paging_get((Eo *)obj, NULL, NULL, _pagesize, _pagesize); -evas_object_image_fill_set(sd->proxy_content[i], 0, 0, vw, vh); +evas_object_image_fill_set(sd->proxy_content[i], 0, 0, ovw, ovh); +evas_object_image_load_region_set(sd->proxy_content[i], 0, 0, ovw, ovh); evas_object_size_hint_min_set(sd->proxy_content[i], h_pagesize, v_pagesize); } --
[EGIT] [core/efl] master 01/01: png: handle 9-patch ends with stretch
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=25dba9ebcf7b5a1329d6d716b0fb783883e4a6d6 commit 25dba9ebcf7b5a1329d6d716b0fb783883e4a6d6 Author: Shinwoo Kim Date: Mon Dec 7 16:52:54 2020 +0900 png: handle 9-patch ends with stretch Summary: The strech region has paired information; total and strechable. Refer to function _strech_region_load retrieving strech region info. But if 9-patch information line ends with strechable, png did not push the strechable information. And it leads to devide by zero. This patch is adding strechable info to the strech region, if 9-patch information ends with strechable. Test Plan: [Code] {F4219278} {F4219280} [Test] ECORE_EVAS_ENGINE=opengl_x11 ./evas-image-9patch ./end_with_strech.9.png Reviewers: Hermet, jsuya, herb, cedric Reviewed By: Hermet Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12204 --- src/modules/evas/image_loaders/png/evas_image_load_png.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/modules/evas/image_loaders/png/evas_image_load_png.c b/src/modules/evas/image_loaders/png/evas_image_load_png.c index ce55916b0e..9e5073cc5b 100644 --- a/src/modules/evas/image_loaders/png/evas_image_load_png.c +++ b/src/modules/evas/image_loaders/png/evas_image_load_png.c @@ -473,6 +473,13 @@ evas_image_load_file_head_with_data_png(void *loader_data, evas_loader_helper_stretch_region_push(>stretch.horizontal.region, , stretchable); } +// End with strechable, add length info +if (stretchable) + { + evas_loader_helper_stretch_region_push(>stretch.horizontal.region, +, stretchable); + stretchable = !stretchable; + } current = 0; @@ -513,6 +520,13 @@ evas_image_load_file_head_with_data_png(void *loader_data, evas_loader_helper_stretch_region_push(>stretch.vertical.region, , stretchable); } +// End with strechable, add length info +if (stretchable) + { + evas_loader_helper_stretch_region_push(>stretch.vertical.region, +, stretchable); + stretchable = !stretchable; + } // Content zone is optional, if not provided, we should use the one we guessed if (prop->content.x == 0 || prop->content.y == 0) --
[EGIT] [core/efl] master 01/01: evas gl: make 9 patch work
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=5f8e4dabeae5a04ceadba458a4a87111ef0c2d19 commit 5f8e4dabeae5a04ceadba458a4a87111ef0c2d19 Author: Shinwoo Kim Date: Fri Nov 20 11:22:54 2020 +0900 evas gl: make 9 patch work Summary: The 9 patch is using image_stretch_region_get, but GL did not override it. So the 9 patch did not work for GL engine at all. Test Plan: Evas_Object*img = evas_object_image_filled_add(evas); evas_object_image_file_set(img, "test.9.png", 0); evas_object_show(img); Reviewers: Hermet, jsuya, herb, cedric Reviewed By: Hermet Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12192 --- src/modules/evas/engines/gl_generic/evas_engine.c | 24 +++ 1 file changed, 24 insertions(+) diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c index b413436efd..46f927e28e 100644 --- a/src/modules/evas/engines/gl_generic/evas_engine.c +++ b/src/modules/evas/engines/gl_generic/evas_engine.c @@ -2199,6 +2199,29 @@ eng_image_can_region_get(void *engine EINA_UNUSED, void *image) return ((Evas_Image_Load_Func*) im->info.loader)->do_region; } +static Eina_Bool +eng_image_stretch_region_get(void *engine EINA_UNUSED, void *image, + uint8_t **horizontal, uint8_t **vertical) +{ + Evas_GL_Image *gim = image; + RGBA_Image *im; + + if (!gim || !gim->im) return EINA_FALSE; + + im = (RGBA_Image *)gim->im; + + if (!im->cache_entry.need_data) return EINA_FALSE; + + if (!im->image.data) evas_cache_image_load_data(>cache_entry); + + if (!im->cache_entry.stretch.horizontal.region || + !im->cache_entry.stretch.vertical.region) + return EINA_FALSE; + + *horizontal = im->cache_entry.stretch.horizontal.region; + *vertical = im->cache_entry.stretch.vertical.region; + return EINA_TRUE; +} static void eng_image_max_size_get(void *engine, int *maxw, int *maxh) @@ -3122,6 +3145,7 @@ module_open(Evas_Module *em) ORD(image_colorspace_get); ORD(image_file_colorspace_get); ORD(image_can_region_get); + ORD(image_stretch_region_get); ORD(image_native_init); ORD(image_native_shutdown); ORD(image_native_set); --
[EGIT] [core/efl] master 01/01: gl: remove invalid read and write
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=34b0d0e973274c1a3df2386a30ad2a31bfcfe0d7 commit 34b0d0e973274c1a3df2386a30ad2a31bfcfe0d7 Author: Shinwoo Kim Date: Thu Jan 14 13:47:06 2021 +0900 gl: remove invalid read and write Summary: There could be 2 evas_gl_image referencing 1 evas_gl_texture. evas_object_image_orient_set could make this case. In this case, when one evas_gl_image is removed(free), the evas_gl_texture is not removed because its reference count. After this point, if the other evas_gl_image is removed without drawing (see function evas_gl_common_image_draw, line "im->tex->im = im") then evas_gl_texture is reading invalid adress when it is removed. Reviewers: Hermet, jsuya, herb, devilhorns Reviewed By: devilhorns Subscribers: devilhorns, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12229 --- src/modules/evas/engines/gl_common/evas_gl_common.h | 2 +- src/modules/evas/engines/gl_common/evas_gl_image.c | 10 +- src/modules/evas/engines/gl_common/evas_gl_texture.c | 7 --- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/modules/evas/engines/gl_common/evas_gl_common.h b/src/modules/evas/engines/gl_common/evas_gl_common.h index c7b4d22150..2d9d825a75 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_common.h +++ b/src/modules/evas/engines/gl_common/evas_gl_common.h @@ -723,7 +723,7 @@ Evas_GL_Texture *evas_gl_common_texture_render_noscale_new(Evas_Engine_GL_Conte Evas_GL_Texture *evas_gl_common_texture_dynamic_new(Evas_Engine_GL_Context *gc, Evas_GL_Image *im); void evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im); void evas_gl_common_texture_upload(Evas_GL_Texture *tex, RGBA_Image *im, unsigned int bytes_count); -void evas_gl_common_texture_free(Evas_GL_Texture *tex, Eina_Bool force); +Eina_Bool evas_gl_common_texture_free(Evas_GL_Texture *tex, Eina_Bool force); Evas_GL_Texture *evas_gl_common_texture_alpha_new(Evas_Engine_GL_Context *gc, DATA8 *pixels, unsigned int w, unsigned int h, int fh); void evas_gl_common_texture_alpha_update(Evas_GL_Texture *tex, DATA8 *pixels, unsigned int w, unsigned int h, int fh); Evas_GL_Texture *evas_gl_common_texture_yuv_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h); diff --git a/src/modules/evas/engines/gl_common/evas_gl_image.c b/src/modules/evas/engines/gl_common/evas_gl_image.c index 2d9383305a..13ca077cac 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_image.c +++ b/src/modules/evas/engines/gl_common/evas_gl_image.c @@ -720,7 +720,15 @@ evas_gl_common_image_free(Evas_GL_Image *im) { if (_evas_gl_image_cache_add(im)) return; } - if (im->tex) evas_gl_common_texture_free(im->tex, EINA_TRUE); + if (im->tex) + { +if (!evas_gl_common_texture_free(im->tex, EINA_TRUE)) + { + /* if texture is not freed, we need to assign im to NULL +because after this point im will be freed */ + im->tex->im = NULL; + } + } if (im->im) evas_cache_image_drop(>im->cache_entry); diff --git a/src/modules/evas/engines/gl_common/evas_gl_texture.c b/src/modules/evas/engines/gl_common/evas_gl_texture.c index 47dd8305a8..049e4236cb 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_texture.c +++ b/src/modules/evas/engines/gl_common/evas_gl_texture.c @@ -1550,10 +1550,10 @@ evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im) im->cache_entry.flags.textured = 1; } -void +Eina_Bool evas_gl_common_texture_free(Evas_GL_Texture *tex, Eina_Bool force) { - if (!tex) return; + if (!tex) return EINA_FALSE; if (force) { evas_gl_preload_pop(tex); @@ -1562,7 +1562,7 @@ evas_gl_common_texture_free(Evas_GL_Texture *tex, Eina_Bool force) evas_gl_preload_target_unregister(tex, eina_list_data_get(tex->targets)); } tex->references--; - if (tex->references != 0) return; + if (tex->references != 0) return EINA_FALSE; if (tex->fglyph) { tex->gc->font_glyph_textures_size -= tex->w * tex->h * 4; @@ -1617,6 +1617,7 @@ evas_gl_common_texture_free(Evas_GL_Texture *tex, Eina_Bool force) } evas_gl_common_texture_light_free(tex); + return EINA_TRUE; } Evas_GL_Texture * --
[EGIT] [core/efl] master 01/01: eet, emile: safety++
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ab969c5915847ba2133608283249c92ebe89c9e8 commit ab969c5915847ba2133608283249c92ebe89c9e8 Author: Shinwoo Kim Date: Thu Feb 4 10:11:16 2021 +0900 eet, emile: safety++ Summary: (1) EVP_MD_CTX_new could return NULL (2) EVP_DigestUpdate returns 0 for failure. https://www.openssl.org/docs/man1.0.2/man3/EVP_DigestUpdate.html Reviewers: raster, Hermet, cedric, devilhorns Reviewed By: devilhorns Subscribers: SPAM-roll99, devilhorns, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12237 --- src/lib/eet/eet_cipher.c | 15 +++ src/lib/emile/emile_cipher_openssl.c | 8 +++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/lib/eet/eet_cipher.c b/src/lib/eet/eet_cipher.c index 51f8513dce..025750cc98 100644 --- a/src/lib/eet/eet_cipher.c +++ b/src/lib/eet/eet_cipher.c @@ -564,6 +564,11 @@ eet_identity_sign(FILE*fp, /* Do the signature. */ #if OPENSSL_VERSION_NUMBER >= 0x1010L && !defined(LIBRESSL_VERSION_NUMBER) md_ctx = EVP_MD_CTX_new(); + if (!md_ctx) + { +err = EET_ERROR_OUT_OF_MEMORY; +goto on_error; + } EVP_SignInit(md_ctx, EVP_sha1()); EVP_SignUpdate(md_ctx, data, st_buf.st_size); err = EVP_SignFinal(md_ctx, @@ -776,6 +781,16 @@ eet_identity_check(const void *data_base, /* Verify the signature */ #if OPENSSL_VERSION_NUMBER >= 0x1010L && !defined(LIBRESSL_VERSION_NUMBER) md_ctx = EVP_MD_CTX_new(); + if (!md_ctx) + { +err = EET_ERROR_OUT_OF_MEMORY; + +X509_free(x509); +EVP_PKEY_free(pkey); + +return NULL; + } + EVP_VerifyInit(md_ctx, EVP_sha1()); EVP_VerifyUpdate(md_ctx, data_base, data_length); err = EVP_VerifyFinal(md_ctx, sign, sign_len, pkey); diff --git a/src/lib/emile/emile_cipher_openssl.c b/src/lib/emile/emile_cipher_openssl.c index b09897ec9b..e5a1ed4135 100644 --- a/src/lib/emile/emile_cipher_openssl.c +++ b/src/lib/emile/emile_cipher_openssl.c @@ -75,10 +75,16 @@ emile_binbuf_sha1(const Eina_Binbuf * data, unsigned char digest[20]) Eina_Slice slice = eina_binbuf_slice_get(data); #if OPENSSL_VERSION_NUMBER >= 0x1010L && !defined(LIBRESSL_VERSION_NUMBER) EVP_MD_CTX *ctx = EVP_MD_CTX_new(); + if (!ctx) return EINA_FALSE; EVP_DigestInit_ex(ctx, md, NULL); - EVP_DigestUpdate(ctx, slice.mem, slice.len); + if (!EVP_DigestUpdate(ctx, slice.mem, slice.len)) + { +EVP_MD_CTX_free(ctx); +return EINA_FALSE; + } + EVP_DigestFinal_ex(ctx, digest, NULL); EVP_MD_CTX_free(ctx); --
[EGIT] [core/efl] master 01/01: atspi: move duplicated code in one place
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=bc48081c93ff00f35cc18111c7aa108ee2b6209b commit bc48081c93ff00f35cc18111c7aa108ee2b6209b Author: Shinwoo Kim Date: Thu Jun 3 12:44:24 2021 +0900 atspi: move duplicated code in one place Summary: we do not have to change several place for updating. Reviewers: Hermet, jsuya, herb Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12282 --- src/lib/elementary/efl_access_component.c | 24 src/lib/elementary/efl_ui_image.c | 7 +-- src/lib/elementary/efl_ui_widget.c| 9 + src/lib/elementary/efl_ui_win.c | 9 + src/lib/elementary/elm_priv.h | 1 + 5 files changed, 20 insertions(+), 30 deletions(-) diff --git a/src/lib/elementary/efl_access_component.c b/src/lib/elementary/efl_access_component.c index 9566db017d..e2874f16ba 100644 --- a/src/lib/elementary/efl_access_component.c +++ b/src/lib/elementary/efl_access_component.c @@ -64,6 +64,21 @@ _efl_access_component_accessible_at_point_get(Eo *obj, void *_pd EINA_UNUSED, Ei return ret; } +Eina_Rect +_efl_access_component_screen_coords_extents_get(const Eo *obj, Eina_Rect r) +{ + Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj)); + if (ee) + { +int ee_x = 0, ee_y = 0; +ecore_evas_geometry_get(ee, _x, _y, NULL, NULL); +r.x += ee_x; +r.y += ee_y; + } + + return r; +} + EOLIAN static Eina_Rect _efl_access_component_extents_get(const Eo *obj, void *_pd EINA_UNUSED, Eina_Bool screen_coords) { @@ -72,14 +87,7 @@ _efl_access_component_extents_get(const Eo *obj, void *_pd EINA_UNUSED, Eina_Boo r = efl_gfx_entity_geometry_get(obj); if (screen_coords) { -Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj)); -if (ee) - { - int ee_x = 0, ee_y = 0; - ecore_evas_geometry_get(ee, _x, _y, NULL, NULL); - r.x += ee_x; - r.y += ee_y; - } +r = _efl_access_component_screen_coords_extents_get(obj, r); } return r; } diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c index 4156728027..b584aa4a7d 100644 --- a/src/lib/elementary/efl_ui_image.c +++ b/src/lib/elementary/efl_ui_image.c @@ -2067,7 +2067,6 @@ _efl_ui_image_efl_gfx_arrangement_content_align_get(const Eo *obj EINA_UNUSED, E EOLIAN static Eina_Rect _efl_ui_image_efl_access_component_extents_get(const Eo *obj, Efl_Ui_Image_Data *sd EINA_UNUSED, Eina_Bool screen_coords) { - int ee_x, ee_y; Eina_Rect r; Evas_Object *image = elm_image_object_get(obj); @@ -2077,11 +2076,7 @@ _efl_ui_image_efl_access_component_extents_get(const Eo *obj, Efl_Ui_Image_Data evas_object_geometry_get(image, , , NULL, NULL); if (screen_coords) { -Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(image)); -if (!ee) return r; -ecore_evas_geometry_get(ee, _x, _y, NULL, NULL); -r.x += ee_x; -r.y += ee_y; +r = _efl_access_component_screen_coords_extents_get(obj, r); } elm_image_object_size_get(obj, , ); return r; diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c index 553de7c3aa..26c4887684 100644 --- a/src/lib/elementary/efl_ui_widget.c +++ b/src/lib/elementary/efl_ui_widget.c @@ -5107,20 +5107,13 @@ EOLIAN static Eina_Rect _elm_widget_item_efl_access_component_extents_get(const Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *sd EINA_UNUSED, Eina_Bool screen_coords) { Eina_Rect r = EINA_RECT(-1, -1, -1, -1); - int ee_x, ee_y; if (!sd->view) return r; r = efl_gfx_entity_geometry_get(sd->view); if (screen_coords) { -Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(sd->view)); -if (ee) - { - ecore_evas_geometry_get(ee, _x, _y, NULL, NULL); - r.x += ee_x; - r.y += ee_y; - } +r = _efl_access_component_screen_coords_extents_get(obj, r); } return r; } diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index c5deb408b8..843b06d01f 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -7485,19 +7485,12 @@ EOLIAN static Eina_Rect _efl_ui_win_efl_access_component_extents_get(const Eo *obj, Efl_Ui_Win_Data *_pd EINA_UNUSED, Eina_Bool screen_coords) { Eina_Rect r; - int ee_x, ee_y; r = efl_gfx_entity_geometry_get(obj); r.x = r.y = 0; if (screen_coords) { -Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj)); -if (ee) - { - ecore_evas_geometry_get(ee, _x, _y, NULL, NULL); - r.
[EGIT] [core/efl] master 01/01: atspi: add atspi bridge ready event
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=45aeaa67503f8d0abd509df8f9e5154f882c671e commit 45aeaa67503f8d0abd509df8f9e5154f882c671e Author: Shinwoo Kim Date: Fri Jun 4 20:20:00 2021 +0900 atspi: add atspi bridge ready event Summary: calling elm_init does not guarantee of readiness of atspi bridge even though elm_init is calling _elm_atspi_bridge_init. widget or user could want to know when the atspi bridge is ready. Reviewers: Hermet, jsuya, herb Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12283 --- src/lib/elementary/elm_atspi_bridge.c | 22 +- src/lib/elementary/elm_general.h | 28 src/lib/elementary/elm_main.c | 1 + 3 files changed, 50 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/elm_atspi_bridge.c b/src/lib/elementary/elm_atspi_bridge.c index 868a72ccf2..6d68384f04 100644 --- a/src/lib/elementary/elm_atspi_bridge.c +++ b/src/lib/elementary/elm_atspi_bridge.c @@ -118,6 +118,8 @@ struct collection_match_rule { static Eo *_instance; static int _init_count = 0; +EAPI int ELM_EVENT_ATSPI_BRIDGE_STATE_CHANGED = -1; + // Object Event handlers static void _state_changed_signal_send(void *data, const Efl_Event *event); static void _bounds_changed_signal_send(void *data, const Efl_Event *event); @@ -4305,6 +4307,7 @@ end: static void _registered_listeners_get(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending) { + Elm_Event_Atspi_Bridge_State_Changed *e; const char *event, *bus; ELM_ATSPI_BRIDGE_DATA_GET_OR_RETURN(data, pd); pd->pending_requests = eina_list_remove(pd->pending_requests, pending); @@ -4335,7 +4338,16 @@ _registered_listeners_get(void *data, const Eldbus_Message *msg, Eldbus_Pending } if (!pd->connected) - efl_event_callback_legacy_call(data, ELM_ATSPI_BRIDGE_EVENT_CONNECTED, NULL); + { +efl_event_callback_legacy_call(data, ELM_ATSPI_BRIDGE_EVENT_CONNECTED, NULL); +e = calloc(1, sizeof(Elm_Event_Atspi_Bridge_State_Changed)); +if (e) + { + e->state = ELM_ATSPI_BRIDGE_CONNECTED; + ecore_event_add(ELM_EVENT_ATSPI_BRIDGE_STATE_CHANGED, e, NULL, NULL); + } + } + pd->connected = EINA_TRUE; } @@ -4810,6 +4822,7 @@ _interfaces_unregister(Eo *bridge) static void _a11y_connection_shutdown(Eo *bridge) { + Elm_Event_Atspi_Bridge_State_Changed *e; ELM_ATSPI_BRIDGE_DATA_GET_OR_RETURN(bridge, pd); Eldbus_Pending *pending; @@ -4852,6 +4865,13 @@ _a11y_connection_shutdown(Eo *bridge) pd->event_hdlr = NULL; efl_event_callback_legacy_call(bridge, ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED, NULL); + e = calloc(1, sizeof(Elm_Event_Atspi_Bridge_State_Changed)); + if (e) + { +e->state = ELM_ATSPI_BRIDGE_DISCONNECTED; +ecore_event_add(ELM_EVENT_ATSPI_BRIDGE_STATE_CHANGED, e, NULL, NULL); + } + pd->connected = EINA_FALSE; } diff --git a/src/lib/elementary/elm_general.h b/src/lib/elementary/elm_general.h index b0708e11c3..21e6a5c482 100644 --- a/src/lib/elementary/elm_general.h +++ b/src/lib/elementary/elm_general.h @@ -491,6 +491,28 @@ typedef enum ELM_FOCUS_REGION_SHOW_ITEM /**< As an item. */ } Elm_Focus_Region_Show_Mode; +/** Possible values for the atspi bridge state. + * + * @since 1.26 + * + * @ingroup Elm_Atspi_Bridge + */ +typedef enum +{ + ELM_ATSPI_BRIDGE_CONNECTED = 0, /**< when atspi bridge is ready */ + ELM_ATSPI_BRIDGE_DISCONNECTED, /**< when atspi bridge is shutdown */ +} Elm_Atspi_Bridge_State; + +/** Data on event when atspi bridge state is changed + * + * @since 1.26 + * + * @ingroup Elm_Atspi_Bridge + */ +typedef struct _Elm_Event_Atspi_Bridge_State_Changed +{ + Elm_Atspi_Bridge_State state; +} Elm_Event_Atspi_Bridge_State_Changed; /**/ EAPI extern int ELM_ECORE_EVENT_ETHUMB_CONNECT; @@ -520,6 +542,12 @@ EAPI extern int ELM_EVENT_PROCESS_BACKGROUND; */ EAPI extern int ELM_EVENT_PROCESS_FOREGROUND; +/** + * Emitted when atspi bridge state is changed. + * @since 1.26 + */ +EAPI extern int ELM_EVENT_ATSPI_BRIDGE_STATE_CHANGED; + typedef Eina_Bool (*Elm_Event_Cb)(void *data, Evas_Object *obj, Evas_Object *src, Evas_Callback_Type type, void *event_info); /**< Function prototype definition for callbacks on input events happening on Elementary widgets. @a data will receive the user data pointer passed to elm_object_event_callback_add(). @a src will be a pointer to the widget on which the input event took place. @a type will get the type of this event and @a event_info, the struct with details on this event. */ EAPI extern double _elm_startup_time; diff --git a/src/lib/elemen
[EGIT] [core/efl] master 01/01: eeze: remove memory leak
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=66c57294946bf9e2412b5eb2732b8e8ee082ff65 commit 66c57294946bf9e2412b5eb2732b8e8ee082ff65 Author: Shinwoo Kim Date: Mon May 24 19:48:43 2021 +0900 eeze: remove memory leak Summary: udev_enumerate_new needs to call udev_enumerate_unref before leaving. Reviewers: raster, Hermet, herb, jsuya Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12280 --- src/lib/eeze/eeze_net.c | 8 +++- src/lib/eeze/eeze_udev_find.c | 6 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/lib/eeze/eeze_net.c b/src/lib/eeze/eeze_net.c index 11fcc26d46..997eb22c73 100644 --- a/src/lib/eeze/eeze_net.c +++ b/src/lib/eeze/eeze_net.c @@ -77,10 +77,15 @@ eeze_net_new(const char *name) syspath = eina_stringshare_add(name); break; } - if (!device) return NULL; + if (!device) + { +udev_enumerate_unref(en); +return NULL; + } net = calloc(1, sizeof(Eeze_Net)); if (!net) { +udev_enumerate_unref(en); udev_device_unref(device); return NULL; } @@ -91,6 +96,7 @@ eeze_net_new(const char *name) idx = udev_device_get_sysattr_value(net->device, "ifindex"); if (!idx) { +udev_enumerate_unref(en); udev_device_unref(net->device); eina_stringshare_del(net->syspath); eina_stringshare_del(net->name); diff --git a/src/lib/eeze/eeze_udev_find.c b/src/lib/eeze/eeze_udev_find.c index 3b1e5ef926..251d020354 100644 --- a/src/lib/eeze/eeze_udev_find.c +++ b/src/lib/eeze/eeze_udev_find.c @@ -95,7 +95,11 @@ eeze_udev_find_unlisted_similar(Eina_List *list) return NULL; device = _new_device(dev); -if (!device) continue; +if (!device) + { + udev_enumerate_unref(en); + continue; + } if ((vendor = udev_device_get_property_value(device, "ID_VENDOR_ID"))) udev_enumerate_add_match_property(en, "ID_VENDOR_ID", vendor); --
[EGIT] [core/efl] master 01/01: evas_object_smart: enhance logic checking clipper visibility
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=9da41a50cb3e149f15e61b44223bcb24a09d809c commit 9da41a50cb3e149f15e61b44223bcb24a09d809c Author: Shinwoo Kim Date: Wed Mar 3 16:44:28 2021 +0900 evas_object_smart: enhance logic checking clipper visibility Summary: If current clipper object is equal to previous clipper object, then the value of visible (or alpha) is same, because it is same object. But there is a case that current visible value is different with previous visible, when clipper object is same. I added this patch to cover above case to draw childern of map. See following flow. evas_render_mapped > if (_evas_render_has_map(obj) && !_evas_render_can_map(obj)) > if (!changed) changed = evas_object_smart_changed_get(obj); The evas_object_smart_changed_get returned FALSE, even though current visible value is different with previous one in the same clipper object. Reviewers: raster, Hermet, herb, jsuya Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12250 --- src/lib/evas/canvas/evas_object_smart.c | 27 +-- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c index 012a7f4374..a9e654bdcb 100644 --- a/src/lib/evas/canvas/evas_object_smart.c +++ b/src/lib/evas/canvas/evas_object_smart.c @@ -1377,12 +1377,27 @@ evas_object_smart_changed_get(Evas_Object_Protected_Data *obj) return EINA_FALSE; //b. Object clipper visibility - if ((obj->prev->clipper && obj->cur->clipper) && - ((!obj->prev->clipper->cur->visible && - !obj->cur->clipper->cur->visible) || -((obj->prev->clipper->cur->color.a == 0) && - (obj->cur->clipper->cur->color.a == 0 - return EINA_FALSE; + if (obj->prev->clipper && obj->cur->clipper) + { +if (obj->prev->clipper != obj->cur->clipper) + { + /* check between prev clipper and current clipper */ + if ((!obj->prev->clipper->cur->visible && + !obj->cur->clipper->cur->visible) || + ((obj->prev->clipper->cur->color.a == 0) && + (obj->cur->clipper->cur->color.a == 0))) + return EINA_FALSE; + } +else + { + /* check between prev value and current value of clipper */ + if ((!obj->cur->clipper->prev->visible && + !obj->cur->clipper->cur->visible) || + ((obj->cur->clipper->prev->color.a == 0) && + (obj->cur->clipper->cur->color.a == 0))) + return EINA_FALSE; + } + } if (!obj->clip.clipees) { --
[EGIT] [core/efl] master 01/01: eeze: fix a potention memory leak
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ccf77acc2202ee3f4e649c7bb24116302b512508 commit ccf77acc2202ee3f4e649c7bb24116302b512508 Author: Shinwoo Kim Date: Wed Feb 17 10:18:28 2021 +0900 eeze: fix a potention memory leak Summary: if udev device get parents fails, memory leaks. this patch fixes the problem. Reviewers: raster, Hermet, jsuya, herb, ali.alzyod, devilhorns Reviewed By: ali.alzyod, devilhorns Subscribers: ali.alzyod, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12249 --- src/lib/eeze/eeze_udev_syspath.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/eeze/eeze_udev_syspath.c b/src/lib/eeze/eeze_udev_syspath.c index 87b2c0fa78..4d2a5c237a 100644 --- a/src/lib/eeze/eeze_udev_syspath.c +++ b/src/lib/eeze/eeze_udev_syspath.c @@ -53,7 +53,10 @@ eeze_udev_syspath_get_parents(const char *syspath) return NULL; if (!(parent = udev_device_get_parent(device))) - return NULL; + { +udev_device_unref(device); +return NULL; + } for (; parent; child = parent, parent = udev_device_get_parent(child)) { --
[EGIT] [core/efl] master 01/01: gl: remove memory leak of orient_set
raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f8a98e5bf208a4b17155bda42b3f60295ab90b09 commit f8a98e5bf208a4b17155bda42b3f60295ab90b09 Author: Shinwoo Kim Date: Sat Feb 13 11:51:16 2021 + gl: remove memory leak of orient_set Summary: The tex->pt->references is descreased by evas_gl_common_texture_free -> pt_unref if tex->references is 0 And tex->pt->texture is removed by evas_gl_common_texture_free -> pt_unref -> glDeleteTextures if tex->pt->references is 0 The evas_gl_common_texture_free decreases tex->references only if tex->references is bigger than 0. There is no chance to decrease tex->pt->references at this point. So if orient_set increases both references of tex and tex->pt, then the tex->pt->reference is not decreased till tex->references is 0. So do not increase tex->pt->references in eng_orient_set. Reviewers: raster, cedric, Hermet Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12243 --- src/modules/evas/engines/gl_generic/evas_engine.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c index a1c48ae451..021e798169 100644 --- a/src/modules/evas/engines/gl_generic/evas_engine.c +++ b/src/modules/evas/engines/gl_generic/evas_engine.c @@ -1167,7 +1167,6 @@ eng_image_orient_set(void *engine, void *image, Evas_Image_Orient orient) { im_new->tex = im->tex; im_new->tex->references++; -im_new->tex->pt->references++; } evas_gl_common_image_free(im); --
[EGIT] [core/efl] master 01/01: evas gl: bind texture with external target for map
kimcinoo pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=e9a73c5b81e6cd90b17f5db5196c6690ff3326f0 commit e9a73c5b81e6cd90b17f5db5196c6690ff3326f0 Author: Shinwoo Kim Date: Wed Jul 28 13:39:37 2021 +0900 evas gl: bind texture with external target for map Summary: egl images created using tbm surface for native surface set use GL_TEXTURE_EXTERNA_OES as texture target, so we should bind to this target when rendering. Or there is a GL_INVALID_OPERATION error on glBindTexture in function _orig_shader_array_flush. Thia patch follows logic of following commit; 7db0e20 evas/gl: Bind texture with external target for tbm surface Reviewers: Hermet, raster, jsuya, herb Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12286 --- src/modules/evas/engines/gl_common/evas_gl_context.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c b/src/modules/evas/engines/gl_common/evas_gl_context.c index e76b27a012..2c07ea6d7e 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_context.c +++ b/src/modules/evas/engines/gl_common/evas_gl_context.c @@ -2954,6 +2954,13 @@ evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc, int nomul = 0, yinvert = 0; Eina_Bool flat = EINA_FALSE; Eina_Bool blend = EINA_FALSE; + int tex_target = GL_TEXTURE_2D; + + if (tex->im) + { +if (tex->im->native.target == GL_TEXTURE_EXTERNAL_OES) + tex_target = GL_TEXTURE_EXTERNAL_OES; + } if (!(gc->dc->render_op == EVAS_RENDER_COPY) && ((a < 255) || (tex->alpha) || (!!mtex))) blend = EINA_TRUE; @@ -3071,7 +3078,7 @@ evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc, gc->pipe[pn].region.type = SHD_MAP; gc->pipe[pn].shader.prog = prog; gc->pipe[pn].shader.cur_tex = tex->pt->texture; -gc->pipe[pn].shader.tex_target = GL_TEXTURE_2D; +gc->pipe[pn].shader.tex_target = tex_target; if (utexture) { --