Commit Graph

375 Commits

Author SHA1 Message Date
Vincent Torri 01b987df59 make mman.h private
Summary:
integrate mman.h to make Evil private to the EFL, as mman.h does not exist on Windows. After a discussion with raster, i include sys/mman.h only on non Windows platform.

One issue, though, is that src/modules/emotion/generic/Emotion_Generic_Plugin.h has inlined functions using mmap()

Test Plan: compilation on Windows

Reviewers: cedric, raster, zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9542
2019-08-19 09:55:13 -04:00
Mike Blumenkrantz e1fda2cbdb efl/hints: add restricted and combined max size hints
these function the same as the min size hint versions and enable
distinction between internally-set max size hints and user-set max size
hints

@feature

ref T8122

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9553
2019-08-14 12:08:13 -07:00
Carsten Haitzler d9dbd2fbea ecore evas x and e sync rendering - disable as it's unused
this has been optional and unused by e for a very long time ot try
sync front-buffered software rendering with the wm/compositor. we may
as well remove the bloat that is here that is unused... it's been
inactive for many years anyway.
2019-08-02 16:41:12 +01:00
Hermet Park 24a49c8938 ecore_evas: prevent double free evas.
When user manually free the ecore evas,
it could delete evas internally,
then evas_invalidate would be triggered,
invalidate callback would try free evas again,
this causes double free evas.

TEST SCENARIO:
   ee = ecore_evas_new(...);
   ...
   ecore_evas_free(ee);
      -> free evas
         -> invalidated cb
            -> free evas (**double free)

This is a regression bug by 5847886a3f
2019-07-26 16:54:31 +09:00
Hermet Park 2e37d2f30f ecore_evas buffer: fix a deadlock issue.
We encountered a deadlock case in ecore_evas_image_object in ecore_evas_buffer
that only happens if the ecore_evas_buffer has nothing changed to render,
though it's triggered to rendering.

See this normal scenario that is working fine as our intention.

being ecore_evas_render()
...
 -> ecore_evas_buffer_prepare()
     -> evas_object_image_data_get()
         -> increment lock by backend engine. (egl/tbm ...)
 -> render()
     -> render_post()
        -> _ecore_evas_buffer_update_image()
            -> evas_object_image_data_set()
               ->decrement lock by backend engine (egl/tbm ...)
...
end ecore_evas_render()

The problem is, if the ecore_evas_buffer canvas doesn't changed at all,
render post will be skipped, it could lose the chance to unlock the image data.
Now the host can't render anymore since it's image source lost the lock.

@fix
2019-07-22 17:14:10 +09:00
Cedric BAIL 5847886a3f ecore_evas: on internal Evas canvas uncontrolled death, properly clean up Ecore_Evas.
This allow evas test to work with an Ecore_Evas directly. It prevent leaking of memory
in the case of half destroying Ecore_Evas.

Reviewed-by: Hermet Park <hermetpark@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9104
2019-07-12 09:54:21 -07:00
Marcel Hollerbach f77bc6957c efl_input_pointer: rename tool to touch_id
tool was not very helpfull, and additionally, the docuemtnation of it
was completly wrong. After searching through the code where tool was
actaully set (efl_ui_win.c) it turned out that it is actaully the "id"
of the pointer when there are multiple touch events.

ref T7963

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9135
2019-06-20 17:14:54 +02:00
Mike Blumenkrantz 2cf3dc7a39 ecore-evas: check for internal evas presence before using it during free
Summary:
some engines do not have an evas

@fix
Depends on D8971

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8972
2019-05-29 12:29:04 -04:00
Vincent Torri 8db978aa4c include evil_private.h in last files, and disable symbolic links on Windows in a couple of files
Test Plan: compilation

Reviewers: zmike, raster, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8933
2019-05-22 07:59:05 -04:00
Vincent Torri a5267d3d9c remove Evil.h when not necessary, include evil_private.h when necessary
Test Plan: compilation

Reviewers: zmike, raster, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8925
2019-05-20 09:10:00 -04:00
Hermet Park 815535eebe ecore_evas: generalize option defines.
There some engine option defines could be generalized from the window system
since those options could be used through wayland, x11 both, and probably so on.
2019-04-25 17:08:37 +09:00
Hermet Park 53599a8d39 ecore wayland: expand internal interface to pass engine option list.
This is a prepartion patch to support msaa in wayland.
ui window needs to deliver engine options (stencil, depth, msaa bits)
to evas engine side, ecore_evas_wayland_egl should have the argument to pass.
2019-04-25 16:56:40 +09:00
Mike Blumenkrantz af7d1ef7ed interfaces: move animator,tick to efl.canvas.object and remove efl.animator
Summary:
this interface only contains a single event which is implemented only by the
canvas object

ref T7561

Reviewers: cedric, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7561

Differential Revision: https://phab.enlightenment.org/D7905
2019-02-21 22:04:30 +01:00
Marcel Hollerbach 3b2a5a429b efl_input: remove the API of efl_input_instance_get
there is basically no reason for this API. You can only use the API when
you know the class, when you know the class you can also just know the
function to call to get this API.
The reason this API needs to go is that we don't want to use
polymorphism on class-functions.

ref T7675

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7900
2019-02-13 16:59:57 +01:00
Wonki Kim 80b364f392 ecore_evas: fix a potentional deref after null problem
Summary:
this patch modify a logic to return after,
failing to call eore_evas_buffer_allocfunc_new function.

Reviewers: Hermet, bu5hm4n, cedric, devilhorns

Reviewed By: devilhorns

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7918
2019-02-13 10:42:24 -05:00
Chris Michael 3fcdada0fd ecore-evas-buffer: Fix formatting
NB: No functional changes
2019-01-31 08:11:54 -05:00
Derek Foreman 625955a597 ecore_evas: Don't walk mice list twice
We know the item is in there, so we can remove it directly.

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7609
2019-01-15 13:47:16 -06:00
Derek Foreman 1139cde9a6 ecore_evas: Validate shadow geometry
Negative values in shadow geometry make no sense at all, however it's
happening all the time in wayland.  Let's throw an ERR so it doesn't go
unnoticed.

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
Reviewed-by: Chris Michael <cp.michael@samsung.com>
Differential Revision: https://phab.enlightenment.org/D7434
2018-12-14 10:29:56 -06:00
Carsten Haitzler 2dc4bed587 ecore evas - buffer - init ecore event evas as many times as shutdown
so ecore_event_evas_shutdown() was getting called much more than
ecore_event_evas_init() - missing an init in the ee + img obj creator
in ecore evas. this adds it in and ensures in allocation failures we
dont over-init or shutdown too.

@fix
2018-12-03 15:50:02 +00:00
Carsten Haitzler 12827e8873 ecore_evas - fix aninmator based frame render ticking to full framerate
so i was seeing ecore evas only rendering every 2nd frame... this is
because it was adding and deleting animatiors every time it rendered
instead of keeping one around as lon as updates where there to render
and then remove it afterwards. this caused nasty timing problems and
thus problems assessing framerate of rendered content etc. etc. ...
not good. this fixes that. this only happened if you only used pure
legacy ecore animators. if you used the efl animator tick events it
worked right.

@fix
2018-12-03 11:04:27 +00:00
Marcel Hollerbach 30db122db4 ecore_evas_buffer: register it in ecore_evas_input
this is done in order to make ecore_event_evas_key_down work with this.
The function can be used to simulate interactions with a efl_ui_win. If
this is not added, then the user of ecore_event_evas_key_down needs to
differentiate between buffer engines and the rest of the engines.

Differential Revision: https://phab.enlightenment.org/D7361
2018-11-28 22:20:34 +01:00
Carsten Haitzler 7090e49335 ecore evas - warn - buffer engine - set last tick get field to null
missing field not set- set to null so we know its not set.
2018-11-09 11:44:00 +00: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
Marcel Hollerbach 46d464e5bf here comes meson
a new shiny buildtool that currently completes in the total of ~ 4 min..
1 min. conf time
2:30 min. build time
Where autotools takes:
1:50 min. conf time
3:40 min. build time.

meson was taken because it went quite good for enlightenment, and is a traction gaining system that is also used by other mayor projects. Additionally, the DSL that is defined my meson makes the configuration of the builds a lot easier to read.

Further informations can be gathered from the README.meson

Right now, bindings & windows support are missing.

It is highly recommented to use meson 0.48 due to optimizations in meson
that reduced the time the meson call would need.

Co-authored-by: Mike Blumenkrantz <zmike@samsung.com>

Differential Revision: https://phab.enlightenment.org/D7012
Depends on D7011
2018-10-02 17:22:50 +02: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 501114e679 ecore_evas: Refactor out ticking start/stop as functions
Summary:
These are the refcounted ticky guts of the signal add/del catchers, we'll
need to use these to start/stop from other call chains in the near
future.

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7039
2018-09-18 09:42:30 -05:00
Myoungwoon Roy, Kim e06a9b6acf docs: Fix typos and some wrong expressions in API reference doc.
Summary: I had fixed some typos and some wrong expressions in API reference doc

Test Plan: N/A

Reviewers: raster, zmike, Hermet, segfaultxavi

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6943
2018-08-30 14:01:21 +09:00
Mike Blumenkrantz ba3fe6c1cb ecore-evas/buffer: implement ignore_events method
Summary:
this is a simple implementation of ignore_events functionality which
sets pass_events if it's an image or prevents the emission of events
in other cases

the result should be that no user events are received. this deliberately
does not block the triggering of resize callbacks as in the original ticket
since this guarantees broken functionality and is just not a good idea

fix T4700

Reviewers: devilhorns, Hermet

Reviewed By: Hermet

Subscribers: Hermet, cedric, #reviewers, #committers

Tags: #efl_display_system

Maniphest Tasks: T4700

Differential Revision: https://phab.enlightenment.org/D6876
2018-08-22 18:35:11 +09:00
Mike Blumenkrantz f2adbe1452 ecore-evas: make manual_render_set a no-op when setting the current value
Summary:
this should not take any action if the existing value of manual_render is
set to the passed value

Reviewers: devilhorns, kimcinoo, ManMower

Reviewed By: devilhorns, kimcinoo, ManMower

Subscribers: ManMower, cedric, #reviewers, #committers

Tags: #efl_display_system

Differential Revision: https://phab.enlightenment.org/D6786
2018-08-09 15:51:41 -04:00
Derek Foreman e382bac1a0 wayland: Fix elementary setting window parents at creation time
Summary:
We need to pass the entire pointer, not just 32-bits of it.

Fixes a crash with enlightenment sandbox gadgets where
ecore_wl2_window_alpha_get() is called with an invalid pointer while
trying to display a pop-up.

Reviewers: zmike, devilhorns

Reviewed By: zmike, devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6775
2018-08-08 09:37:30 -04:00
Derek Foreman 35622614d0 ecore_evas: Make sure a manual render does a manual render
Summary:
If we call ecore_evas_manual_render() during an async render, it does
nothing.

This is harmful if we've added render post callbacks during that async
render and expect them to fire.

Force a sync and another render if we're in an async render.

ref T7156
Depends on D6714

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Maniphest Tasks: T7156

Differential Revision: https://phab.enlightenment.org/D6715
2018-07-31 17:03:16 -04:00
Derek Foreman b7444e0b87 ecore_evas: Sync evas on manual_render_set
Summary:
Make sure any ongoing async rendering is finished before manual_render_set
returns.
Depends on D6711

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6714
2018-07-31 17:03:16 -04:00
Hosang Kim 1b2408d5f7 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
2018-07-05 15:15:55 -04:00
Hosang Kim df652673fe evas: move clearing cows to right place.
Summary:
Evas is child of main loop now, so evas is deleted when main loop is quitted.
In case of not calling evas_free() explicitly by app side, a crash occurs.
So move clearing cows to below ecore_shutdown().

Test Plan:
//Compile with:
//gcc evas_test.c -o evas_test `pkg-config --cflags --libs ecore evas`

#include <Evas.h>
#include <Ecore.h>

Eina_Bool
_timer_cb (void *data)
{
    ecore_main_loop_quit();
    return 0;
}
int
main(int argc, char *argv[])
{

   evas_init();
   Evas *evas = evas_new();
   Evas_Object *obj = evas_object_box_add(evas);
   Evas_Object *rect = evas_object_rectangle_add(evas);
   evas_object_color_set(rect, 255, 255, 255, 255);
   evas_object_resize(rect, 300, 400);
   evas_object_show(rect);

   evas_object_box_append(obj, rect);

   evas_object_show(obj);
   ecore_timer_add(2.0, _timer_cb, NULL);
   ecore_main_loop_begin();

   evas_shutdown();
   return 0;
}

Reviewers: devilhorns, cedric, jpeg, id213sin, woohyun, zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6346
2018-06-27 07:50:31 -04:00
YeongJong Lee a522bf5d76 ecore_evas: prevent duplicated ecore_evas registration
Summary:
After a44697c37a, we can register same ecore_evas
to ecore_evases using ecore_evas_input_event_register.
(ecore_evas_input_event_register -> ecore_evas_done -> _ecore_evas_register)
This can make infinite loop in EINA_INLIST_FOREACH(ecore_evases, ee) because
next inlist of ecore_evases is ecore_evases after double call of
_ecore_evas_register.

This patch prevent it.

Test Plan:
Ecore_Evas *ee = ecore_evas_new(NULL, 0, 0, 800, 600, NULL);
ecore_evas_input_event_register(ee);
(part of document of ecore_fb_input_device_window_set)

Check that there is no infinite loop

Reviewers: zmike, devilhorns

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6390
2018-06-25 15:14:31 -04:00
Cedric BAIL fe14abd929 evas: refactor efl_input_event and remove some of the lifecycle hack.
Differential Revision: https://phab.enlightenment.org/D6101
2018-05-24 16:02:18 -07:00
Cedric BAIL ccb5642eb9 Revert "efl_add_ref - fis to use efl_add properly with a parent."
This reverts commit 2fb5cc3ad0.

Most of this change where wrong as they didn't affect the destruction
of the object. efl_add_ref allow for manual handling of the lifecycle
of the object and make sure it is still alive during destructor. efl_add
will not allow you to access an object after invalidate also efl.parent.get
will always return NULL once the object is invalidated.

Differential Revision: https://phab.enlightenment.org/D6062
2018-05-24 16:02:17 -07:00
Mike Blumenkrantz b7530726c8 ecore-evas-buffer: defer resize callback until pre-render
Summary:
this mimics other engines, all of which have the same mechanics due
to display server interactions. it also avoids unnecessary recalcs before
pre-render if the canvas size was changing repeatedly

fix T6924
ref D6019

Reviewers: cedric, JackDanielZ

Reviewed By: JackDanielZ

Subscribers: #committers, JackDanielZ

Tags: #efl

Maniphest Tasks: T6924

Differential Revision: https://phab.enlightenment.org/D6145
2018-05-23 17:35:18 -04:00
Carsten Haitzler 5b08611a9e ecore animator, x, vsync ecore evas restore x vsync to work again
so i found the work with wayland and having animator sources broke
that same source from ecore_x that was there from long ago, so i've
put in an exception if there are x based engines from restting to a
timer animator because ecore_x would have switched toa custom ticker
already, and this just resets it. also just set the source after
setting the tick callbacks and ensure tick cb's are null before going
to timer source as well. this cleans up this little but of animaatior
vsync modification to properly vsync in both x and wayland too now.

@fix
2018-04-30 15:32:10 +09:00
Xavi Artigas 65ee277a66 Efl.Canvas.Scene (from Efl.Canvas)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:23 -07:00
Cedric BAIL 39c87e6c99 ecore_evas: forgotten refactoring of the buffer engine.
Thanks @jackdanielz for the report.
2018-04-23 13:02:46 -07:00
Derek Foreman 2dbaef9b7c ecore_evas: Make draw_block block drawing
This was only used in the X custom render function, now it's meaningful
everywhere.  (Nothing that uses this code path currently sets it)

ref T6834
2018-04-12 15:59:39 -05:00
Derek Foreman 380a58a9d9 ee_x: Rename draw_ok to draw_block and invert logic
I want to use this in other engines, but no other engine initializes this
properly, so draw_ok would be EINA_FALSE everywhere.  This way draw_block
is EINA_FALSE after calloc in all engines that don't know about it.

ref T6834
2018-04-12 15:59:39 -05:00
Chris Michael c18fac91ff ecore-evas: Remove unused variable 2018-04-11 10:05:33 -04:00
Cedric Bail 23800a06a0 ecore_evas: remove dead code. 2018-04-10 15:01:43 -07:00
Woochan Lee f9fa8bfcb0 ecore_evas: check return value.
Summary: After migration this code in Tizen. The coverity said it needs to check return value(CID 39562).

Reviewers: raster, myoungwoon, woohyun, cedric

Subscribers: cedric

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

Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
2018-04-09 10:36:43 -07:00
Cedric Bail 1ca196fbcd ecore_evas: add a hook interceptor for evas_new, will be useful for a portable Exactness. 2018-04-02 15:12:31 -07:00
Cedric Bail a44697c37a ecore_evas: refactor logic for creating Ecore_Evas. 2018-04-02 15:12:31 -07:00
Carsten Haitzler 2fb5cc3ad0 efl_add_ref - fis to use efl_add properly with a parent.
fixes bc18b7e7ad and
168849e8a0
2018-03-29 13:30:55 +09:00
Hosang Kim 86ae239bae ecore_evas: don't set in_async_render flag if not in use async render.
Reviewers: jypark, raster, cedric

Subscribers: cedric

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

Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
2018-03-26 15:58:54 -07:00