Commit Graph

86 Commits

Author SHA1 Message Date
Vincent Torri 839f22870b bin/efl and ecore: include evil_private.h when appropriate
Test Plan: compilation

Reviewers: raster, zmike, cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8908
2019-05-17 11:53:35 +01:00
Yeongjong Lee 9de082eb83 ecore: remove duplicated conditions
Summary: The macro already checks eina_main_loop_is() when DEBUG_THREADS is enabled.

Test Plan: make

Reviewers: segfaultxavi, ManMower, Hermet, bu5hm4n

Reviewed By: bu5hm4n

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7183
2018-10-26 19:25:09 +09:00
Derek Foreman 4dc1e8273d ecore: Add new way to register animators
Summary:
We have back-ends that can generate their own tick sources, but
ecore_animator_add()/ecore_animator_timeline_add() gives no indication
which backend the animator is running on.  This means that all animators
have to cause all currently in use backends to tick.

For example, if under wayland 4 application windows are open, all 4
windows will create ticks when any animator is present.

These new animator APIs that take an evas object allow us to figure out
out the backend and only cause the appropriate one to tick.

Depends on D7040

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7041
2018-09-18 09:42:38 -05:00
Derek Foreman 448c7ca2ce ecore_anim: Move struct Ecore_Animator to private header
Summary:
We're going to use this in ecore_evas shortly.

Depends on D7039

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7040
2018-09-18 09:42:34 -05:00
Mike Blumenkrantz 44bce025fa ecore: remove exit_signal_received conditional from windows build
Summary:
windows does not include ecore_signal.c, so this is not a defined symbol

lib/ecore/.libs/lib_ecore_libecore_la-ecore_anim.o: In function `timer_tick_notify':D:\Documents\MSYS2\home\vtorri\gitroot\efl3\src/lib/ecore/ecore_anim.c:372: undefined reference to `exit_signal_received'lib/ecore/.libs/lib_ecore_libecore_la-ecore_anim.o: In function `ecore_animator_custom_tick':D:\Documents\MSYS2\home\vtorri\gitroot\efl3\src/lib/
ecore/ecore_anim.c:940: undefined reference to `exit_signal_received'

ref 6405a5a68c

Reviewers: vtorri, devilhorns

Reviewed By: vtorri

Subscribers: cedric, #committers

Tags: #efl_build

Differential Revision: https://phab.enlightenment.org/D6648
2018-07-20 15:21:28 -04:00
Mike Blumenkrantz 6405a5a68c ecore: immediately block animator ticking upon receiving an exit signal
Summary:
when an exit (SIGINT, SIGQUIT, SIGTERM) signal is received, the ui should
immediately stop updating in order to present the user with an instant
response

this uses a simple volatile int to block any ticks which begin after the
signal is received; if a signal is received during a tick then it will complete
normally

fix T7000
Depends on D6589

Reviewers: ManMower

Reviewed By: ManMower

Subscribers: cedric, #committers

Tags: #efl_main_loop

Maniphest Tasks: T7000

Differential Revision: https://phab.enlightenment.org/D6590
2018-07-13 15:40:55 -04:00
Mike Blumenkrantz dab2a9ca68 ecore/animator: break out _ecore_animator_flush() from tick function
Summary: no functional changes

Reviewers: ManMower

Reviewed By: ManMower

Subscribers: cedric, #committers

Tags: #efl_main_loop

Differential Revision: https://phab.enlightenment.org/D6589
2018-07-13 15:40:50 -04:00
Derek Foreman 51d1360a18 ecore_anim: Simplify timeline terminal condition
Summary:
We should only ever have a pos of 1.0 once, the current terminal
condition gives the impression that it might be possible to have
more than one 1.0 firing.

This would break a lot of code.

No functional change intended.
Depends on D6464

Reviewers: devilhorns, zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6465
2018-06-28 13:12:04 -05:00
Hermet Park ec7bcc79e7 ecore: resolve the possible use of invalid handle.
Signed-Off-By: JongMin Lee<jm105.lee@samsung.com>
2018-04-05 15:15:34 +09:00
Carsten Haitzler 21b4321d4c ecore anim - use pointers to real things for epoll objects
while really "fake" they are real pointers and thus shouldnt get
complaints from tools about invalid ptrs... doesnt fix any bug though.
2018-02-26 15:26:27 +09:00
Myoungwoon Roy, Kim 6629df5e67 ecore_anim: Check for null ptr deref
Summary:
This patch fixes a tentative crash owing to null ptr dereference
ecore_animator_freeze() has a same patch already.

Test Plan: execute test suite

Reviewers: cedric, raster, jpeg, stefan, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D5752
2018-01-22 17:07:58 +09:00
Pawel Aksiutowicz 767eefbf21 ecore: removed warning from ecore_anim
Reviewers: stanluk, lukasz.stanislawski, jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5535
2017-12-04 19:35:06 +09:00
Derek Foreman 599cdc93fa ecore_anim: set the tick thread's fds CLOEXEC
If we don't set them CLOEXEC then they end up in the fd space of every
client Enlightenment launches, allowing any client to write to them
and mess with animator timings or freeze the compositor.
2017-07-12 13:04:58 -05:00
Cedric BAIL 712f7e878b ecore: use new API eina_file_close_on_exec. 2017-04-18 16:55:31 -07:00
Umesh Tanwar b938e2b5d8 ecore_animator: improve comparision check for stopping animator.
Summary:
Time cmparision does not ensure the corrctness of posotion.
It is beacuse of double number calculation. Double number calculation
are not convertable.for example:
   1/39 = 0.02564102564;
   but 0.02564102564 * 39 = 0.99999999996 != 1;

The addition check for pos ensure the pos to be reached at its correct
position.

@fix

Signed-off-by: Umesh Tanwar <umesh.tanwar@samsung.com>

Reviewers: cedric, singh.amitesh, jpeg, raster

Reviewed By: raster

Subscribers: atulfokk, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4709

Signed-off-by: Amitesh Singh <amitesh.sh@samsung.com>
2017-03-14 14:38:44 +05:30
Umesh Tanwar 3b4cbc56bb ecore_animator: use EINA_DBL_EQ for comparing double values
Summary:
EINA_FLT_EQ was used to compare double values. replace it with EINA_DBL_EQ

@fix
Signed-off-by: Umesh Tanwar <umesh.tanwar@samsung.com>

Reviewers: raster, cedric, singh.amitesh

Reviewed By: singh.amitesh

Subscribers: atulfokk

Differential Revision: https://phab.enlightenment.org/D4712

Signed-off-by: Amitesh Singh <amitesh.sh@samsung.com>
2017-03-10 11:57:08 +05:30
Chris Michael ad1e5ead40 ecore-anim: Remove unused variable
Gcc reports 'i' as unused here and checking the code confirms that, so
remove unused variable.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-03-09 08:51:18 -05:00
Cedric BAIL 4e1567b41e ecore: switch back to use ecore_thread_wait.
We need to make sure that we wait properly on the animator thread
otherwise we end up with the animator finish callback being called
later on during the shutdown process which means trouble.
2017-03-07 11:08:52 -08:00
Bryce Harrington ad109b0bc4 ecore: Fix typo in error message
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D4689
2017-03-02 11:52:22 +09:00
Chris Michael b09dcc1e0e ecore: Don't use logging domains with spaces
Small patch to change the name of the ecore_animator logging domain.
Names with spaces in them make it impossible to export
EINA_LOG_LEVELS_GLOB inside a bashrc

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-03-01 10:50:52 -05:00
Cedric BAIL d8edf70c32 ecore: improve debugging of animator. 2017-02-28 11:04:34 -08:00
Mike Blumenkrantz 83f38d2b2c ecore: do not access 'timer_thread' global from animator thread
@fix
2017-02-24 14:13:11 -05:00
Cedric BAIL 8f1c071d6a eina: rename EINA_{FLT,DBL}_CMP to EINA_{FLT,DBL}_EQ. 2017-01-06 15:58:46 -08:00
Cedric BAIL 77a7d6d9e5 ecore: remove float comparison warning from Ecore_Animator code. 2016-12-19 16:33:46 -08:00
Carsten Haitzler 81242af6f9 ecore animator - timer based ticker - add epoll support if available
the ecore time based animator that ticked away used select for
timeouts to listen to either a timeout OR the control fd that would
tell it to tick or not tick. my profiles show this as consuming 1.03%
of my profile sample time - just  the select call in the time based
animator. this adds the option of epoll + timerfd + having kernel
repeat the timer fd interval (since epoll timeouts at best can do 1ms
resolution). my profiling shows this to use 0.62% of profile time vs
1.03% for select, so it's a tiny win. this only compiles if epoll and
timerfd support have already been detected at compile time. it also
runtime falls back to select if epoll and timerfd setup fail.

@optimize
2016-11-27 17:21:51 +09:00
Carsten Haitzler 973eaedf51 improve responsivness of timer sleeping threads for vsync with prctl
prctl allows us on some platforms to request a thread be woken up more
agressively e.g. due to a timeout bu setting timerslack. since we use
a dedicated thread just for vsync events, this is a very good idea to
ask the kernel to be as exact as possible for this thread as it only
wakes up once per frame (or should only) and accuracy is important. so
use this.

also improve prctl checks to be more explicit in configure.ac and use
these ifdefs in ecore exe too where prctl is used as well.

@feature
2016-10-28 22:58:36 +09:00
Carsten Haitzler da04400c5d ecore-animator allow for animator to skip queued animator ticks
set ECORE_ANIMATOR_SKIP to skip queued animtor ticks if multiple are
in the pipeline. optional and not on by default. i would think its not
a good idea to skip these animator ticks and skipping/deferring is a
job higher up.

@feature
2016-10-28 13:58:56 +09:00
Lauro Moura 6aa4486209 ecore: Add _SAFE when iterating the animators.
In some cases (like JS libuv events) an animator callback can trigger the
deletion of an animator, changing the list being iterated.
2016-10-25 12:23:34 -02:00
Carsten Haitzler 681d47a6c1 ecore anim - actually fix by checking fd not thread handle
this should remove a 0.5 sec or so pause at shutdown of efl apps.

@fix
2016-10-21 09:39:00 +09:00
Carsten Haitzler 522c3d7b75 eocre animator - the anim thread is polled on shutdown use volatile
we sit in a loop wating for animator thread to die on shutdown
(sleeping for 1000us), so make it a volatile so every check actually
checks and doesnt cache.

@fix
2016-10-21 07:40:34 +09:00
Cedric BAIL fd5d31696d ecore: early destruction of animator allow for tick end to always be triggered.
T4043
2016-07-13 15:32:15 -07:00
Carsten Haitzler f6d8ae3123 ecore animator - remove dead code
fix CID 1356618
2016-07-09 12:09:41 +09:00
Jean-Philippe Andre e68e8d0088 ecore: Fix _ecore_animator_shutdown (double free)
evas 3d examples would always exit on a double free, since
EINA_INLIST_FREE was misused. Not surprising considering
it's different from EINA_LIST_FREE but has a similar name.
2016-06-21 10:14:13 +09:00
Cedric BAIL 5cc16b1c29 ecore: remove Ecore_Animator Eo object.
This is only a legacy API.
2016-06-03 17:00:12 -07:00
Derek Foreman 6c2a3a2034 ecore_anim: Fix bad assumption about signedness of chars
Whether "char" is signed or unsigned is architecture dependent, so if we
know we need a -1 in a char type we must declared it to be signed.
2016-06-03 16:28:24 -05:00
Tom Hacohen 8706d03b43 Change the EFL according to the renaming of the eo_add() current object. 2016-03-15 15:25:54 +00:00
Tom Hacohen f24210caac Revert "Automatic migration to the new eo_add syntax."
This reverts commit 4f949a2757.
2016-03-11 12:29:03 +00:00
Tom Hacohen 4f949a2757 Automatic migration to the new eo_add syntax. 2016-03-09 16:09:14 +00:00
Tom Hacohen f21ade6123 Automatic migration to Eo4.
I just ran my script (email to follow) to migrate all of the EFL
automatically. This commit is *only* the automatic conversion, so it can
be easily reverted and re-run.
2016-03-03 09:58:08 +00:00
Cedric BAIL 8cc6c7561a ecore: remove useless ecore_lock/unlock. 2016-02-02 10:45:42 -08:00
Carsten Haitzler 5b2baf173e efl - set thread names for internally created threads for debugging
@feature
2015-09-10 15:17:08 +09:00
Carsten Haitzler e9c5f37ab4 efl debug infra - add more event types for ability to check extended inf 2015-08-17 19:37:06 +09:00
Carsten Haitzler 956182c7c5 efl debug - add the ability to begin/end states not just call ranges 2015-08-17 11:10:26 +09:00
Carsten Haitzler 155a102a45 ecore anim - oops. coverity silence checked wrong value for read/write
fix
2015-07-09 08:22:40 +09:00
Carsten Haitzler ef65806ce4 new animator coverity complaints - silence them
check return of read/write to make coverity happy (even though they
should never fail as it's a pipe within a process).
2015-07-08 18:51:11 +09:00
Vincent Torri 0985ec1cac Ecore Anim: fix compilation on Windows
sys/select.h is not available on Windows
2015-07-07 13:22:32 +01:00
Carsten Haitzler 786ab74d6d ecore animator - use windows ifdefs/macros so it works there 2015-07-07 15:41:44 +09:00
Carsten Haitzler 24f9e6a458 animator - use select not uslleep so we can wake up during a sleep
if you change animator frametime while we are sleeping for a frame...
we can't wake up and adjust. this allows that with a pipe and select.
2015-07-07 12:32:04 +09:00
Carsten Haitzler 851e1b5cba ecore - animator - new thread timer animator - fiux shutdown
expedite actualyl shuts ecore down - fix eina magic complaints with
safe shutdown.
2015-07-06 18:01:01 +09:00
Carsten Haitzler f33161c9ea ecore animators - improve accuracy by having a thread do animator timing
this will cause animators to be more accurate now with timing coming
from a dedicated thread whose only reason in life is to trigger timed
wakeups. the wakeup time is even adjusted with fmod to the exact
frametime slot that is expected
2015-07-02 18:24:18 +09:00