aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHosang Kim <hosang12.kim@samsung.com>2018-07-05 15:15:55 -0400
committerMike Blumenkrantz <zmike@samsung.com>2018-07-05 15:15:55 -0400
commit1b2408d5f7aee1032a3fdda8bf0a2c5578eb6b2a (patch)
treec0220e847c75c70e4e2c6208221a3fc1520983a0
parentevas/main: call correct destroy function in evas_free (diff)
downloadefl-1b2408d5f7aee1032a3fdda8bf0a2c5578eb6b2a.tar.gz
ecore_evas: skip rendering evas and making animator tick
Summary: Some ecore_evas such as ecore_evas_extn_plug doesn't have evas. ecore_evas_extn_plug seems to be Ecore_Evas, but actually it is Evas_Object_Image. ecore_evas_extn_plug makes new ecore evas, but it only exists to communicate with ecore_evas_extn_socket. newly ecore evas only open and close file(ecore_evas_extn_socket). so it doesn't have evas. ``` EAPI Evas_Object * ecore_evas_extn_plug_new_internal(Ecore_Evas *ee_target) { ... ee = calloc(1, sizeof(Ecore_Evas)); ... o = evas_object_image_filled_add(ee_target->evas); ... return o; } ``` Reviewers: zmike, Hermet, woohyun, raster, devilhorns Reviewed By: zmike Subscribers: cedric, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6504
-rw-r--r--src/lib/ecore_evas/ecore_evas.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 88dd59ee7c..904dfda0c7 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -149,6 +149,8 @@ ecore_evas_render(Ecore_Evas *ee)
{
Eina_Bool rend = EINA_FALSE;
+ if (!ee->evas) return EINA_FALSE;
+
if (ee->in_async_render)
{
DBG("ee=%p is rendering, skip.", ee);
@@ -3048,7 +3050,8 @@ ecore_evas_animator_tick(Ecore_Evas *ee, Eina_Rectangle *viewport, double loop_t
// FIXME: We do not support partial animator in the subcanvas
EINA_LIST_FOREACH(ee->sub_ecore_evas, l, subee)
{
- ecore_evas_animator_tick(subee, NULL, loop_time);
+ if (subee->evas)
+ ecore_evas_animator_tick(subee, NULL, loop_time);
}
// We are a source of sync for general animator.
@@ -3274,10 +3277,12 @@ _ecore_evas_register(Ecore_Evas *ee)
EAPI void
_ecore_evas_subregister(Ecore_Evas *ee_target, Ecore_Evas *ee)
{
- _ecore_evas_register_animators(ee);
-
ee_target->sub_ecore_evas = eina_list_append(ee_target->sub_ecore_evas, ee);
+ if (!ee->evas) return;
+
+ _ecore_evas_register_animators(ee);
+
if (!ee->engine.func->fn_render)
evas_event_callback_priority_add(ee->evas, EVAS_CALLBACK_RENDER_POST, EVAS_CALLBACK_PRIORITY_AFTER,
_evas_evas_buffer_rendered, ee);