Commit Graph

15559 Commits

Author SHA1 Message Date
Daniel Kolesa dd9155cf24 eolian: properly add < in struct/enum field docs
Fixes T4443.
2016-09-09 13:04:04 +02:00
Tom Hacohen cfcdacc5f7 Eo: Remove the EO_DEBUG env check. We have DBG for that. 2016-09-09 11:38:07 +01:00
Tom Hacohen 284b6a5a3e Update the EFL according to new Eo API changes.
I didn't expect it (my bad), but why the hell is this done manually
instead of using Eolian?! People, use Eolian.
2016-09-09 11:25:12 +01:00
Carsten Haitzler b07cc74107 evas drm engine - fix build if gl not enabled for drm engine build
this fixes the build after a derek b0rk :)
2016-09-09 19:21:53 +09:00
Tom Hacohen 7ebf9d879d Eo: Change the way functions are registered to classes
This change lets us remove a field from the structure that leads to
around 20KiB more of saving in private dirty pages in elementary.

This also looks a bit better and feels a bit cleaner.

Breaks API and ABI.
2016-09-09 11:14:35 +01:00
Daniel Kolesa 12dbab33f9 eolian: separate ops struct for normal and class funcs (to match new API) 2016-09-09 11:14:35 +01:00
Tom Hacohen 5ad71f1486 Eo: don't allow object override to introduce previously undefined functions. 2016-09-09 11:14:05 +01:00
Carsten Haitzler 8b159aab68 eo - move eoid lookup to ptr indir file and clean up some code
this improves the readability of some of the new domain related and
ptr indir code..
2016-09-09 18:53:20 +09:00
Carsten Haitzler fe81fff89b eo test suite - finish off the tests so we're testing all the features
testing all the core features of eo domains now. yes it could be a lot
more extensive but it tests the important day to day cases. this is
the case across most of our tests too - they dont really stress things
out a lot.
2016-09-09 18:53:20 +09:00
Carsten Haitzler ab0cb7a62d eo - we actually steal the 3rd highest bit for classes - fix
we now just lost another bit from generation count. down to 6 in 32bit
and 26 in 64 bit. this sucks but is necessary. now we are using the
bits just below ref and super bits the code was just maskign off the
next bit as a class marker. this was so so so so wrong. it was the ide
table space. we just never used numbers high enough to start using it.
since i added domain there now those bits can be used easily with
thread domain or other domain. argh! existing eo bug found and fixed.
annoying! :) i added another #define there just to be clear we use
that bit for classes.
2016-09-09 18:53:20 +09:00
Carsten Haitzler 54c39aa564 eo class add - dont always call getenv as this is epxensive. get once
so class creation is possibly a little slower thanks to always calling
getenv. get once then store rsult from there on out.
2016-09-09 18:53:20 +09:00
Jean Guyomarc'h a336e761d2 eo: avoid redefinition of type Efl_Promise
clang complained about type redefinition being a C11 feature, throwing a
warning for each compiling unit including Eo.h.
2016-09-09 08:44:46 +02:00
Cedric BAIL bd362b13d6 efl: add documentation and last cleanup of the API. 2016-09-08 15:16:43 -07:00
Cedric BAIL 0c067fb62f eio: implement efl_io_manager_xattr_ls 2016-09-08 15:16:43 -07:00
Cedric BAIL c6e145da2d eio: add an internal function for getting xattr in bulk. 2016-09-08 15:16:43 -07:00
Cedric BAIL 5579d2f5cd eio: make xattr list packed for better performance. 2016-09-08 15:16:43 -07:00
Cedric BAIL d7fbd6f13e eio: fix allocation in eio_dir to reuse common safer infra. 2016-09-08 15:16:43 -07:00
Cedric BAIL f1c8c82e5f ecore: fix parenting to be done right on promise and future. 2016-09-08 15:16:43 -07:00
Cedric BAIL cb17d46cf5 ecore: fix optional future promise to not complain of there destruction. 2016-09-08 15:16:42 -07:00
Cedric BAIL 8e8c50e7a1 eio: fix manager tests. 2016-09-08 15:16:42 -07:00
Cedric Bail 52c63190d5 eio: rework efl_io_manager to use efl_future. 2016-09-08 15:16:23 -07:00
Cedric Bail f17f389b66 eo: add Eina.Binbuf native type. 2016-09-08 14:58:06 -07:00
Cedric Bail 11fe9b8cd9 eio: add internal function able to build array instead of triggering a callback per files. 2016-09-08 14:58:06 -07:00
Cedric Bail d26a0a2f70 eio: track length of resulting operation to be reported by futures. 2016-09-08 14:58:06 -07:00
Cedric Bail d8310b7180 ecore: test efl_future_link. 2016-09-08 14:58:06 -07:00
Cedric BAIL aaac15126b ecore: add efl_future_iterator_race. 2016-09-08 14:58:06 -07:00
Cedric Bail 5edb42d371 ecore: add test for efl_future_race. 2016-09-08 14:58:06 -07:00
Cedric Bail 0789156c86 ecore: add efl_future_race. 2016-09-08 14:58:06 -07:00
Cedric BAIL 56df83e2c0 ecore: add efl_future_iterator_all. 2016-09-08 14:58:06 -07:00
Cedric Bail 61957ace36 ecore: add tests for efl_future_all. 2016-09-08 14:58:05 -07:00
Cedric Bail 84958dc6ca ecore: add efl_future_all. 2016-09-08 14:58:05 -07:00
Cedric BAIL 6f2cad6439 efl: add a possibility to link death of Eo object with a future. 2016-09-08 14:58:05 -07:00
Cedric Bail 674acaf63d ecore: add tests for Efl.Promise. 2016-09-08 14:58:05 -07:00
Cedric Bail cd6a8aa6b3 ecore: add support for optional futures. 2016-09-08 14:58:05 -07:00
Cedric BAIL b2fb5e375a ecore: add Efl.Promise. 2016-09-08 14:58:05 -07:00
Cedric BAIL 7ae43659f6 efl: remove unecessary legacy_prefix set to null. 2016-09-08 14:58:05 -07:00
Cedric BAIL 36bc9aa187 eolian: add a builtin to handle a free callback. 2016-09-08 14:58:05 -07:00
Cedric BAIL ed9dff8fbd eolian: add support for future.
Future is the read only side of a Promise. For now, I am not removing
Eina_Promise until everything is in place, but eventually the promise
type of eolian will be gone.
2016-09-08 14:58:05 -07:00
Cedric BAIL 9a2ada6d87 eo: add abstract efl.future. 2016-09-08 14:58:05 -07:00
Stefan Schmidt 6023143b78 examples: elementary: ignore generated codegen example files 2016-09-08 22:51:03 +02:00
Gustavo Sverzut Barbieri 4814f937e2 efl_net_socket_fd: make it more win32 friendly.
it seems that on windows read() and write() won't work with sockets,
so use recv() and send().

Note that this code is still untested on windows, at least the errors
must be fetched using WSAGetLastError() instead of errno directly, but
I don't have a Windows machine I can test.
2016-09-08 17:01:13 -03:00
Derek Foreman 088c9675ef ee_gl_drm: Stop calling fb_dirty
So yeah, fb_dirty is for marking dirty regions when rendering
directly into the front buffer attached for scanout on a manually
updated display.  Absolutely none of those things apply here, so
let's stop doing it.
2016-09-08 13:55:25 -05:00
Derek Foreman 255b990055 ecore_drm2: Remove get/set for next fb
We no longer needs these at all.
2016-09-08 13:55:25 -05:00
Derek Foreman cc29a25c47 ecore_drm2: simplify API to get latest FB
What we've always wanted when getting the "current" FB is to get
the most recently submit one - this may be current, next, or pending.

Replace ecore_drm2_output_current_fb_get() with a function that gets the
most recent one - ecore_drm2_output_latest_fb_get().  Now callers don't
have to check the next buffer themselves first, and we don't have to
add an API for pending.
2016-09-08 13:55:25 -05:00
Derek Foreman ace55231a3 ee_drm: simplify flipping
We no longer have to track draw and display buffers - the display buffer
is completely handled by ecore_evas_drm's busy tracking.
2016-09-08 13:55:24 -05:00
Derek Foreman 0f534dc3bd ecore_evas_drm: Use pageflips, not vblanks, to drive animation
This should sort some timing problems.
2016-09-08 13:55:24 -05:00
Derek Foreman b4cbf860b9 ecore_drm2: Add a page flip completion call
Add a function for ecore_evas_drm to call after a page flip happens so
ecore_drm2 can track busy status for fbs itself (including for the fb
that's currently being flipped to scanout)

Also, call the completion function from ecore_evas_drm
2016-09-08 13:55:24 -05:00
Derek Foreman 33043ff1eb ecore_drm2: distinguish real flip failure from flip deferral
If we try to flip too soon we get EBUSY and should queue up the buffer
for later presentation.  Only the other errors need to be dealt with
elsewhere.
2016-09-08 13:55:24 -05:00
Derek Foreman 3be2630a30 ecore_drm2: make flip to NULL buffer mean something
When triple buffering we'll have a buffer in ecore_drm2's "next" position.
Until now we've had to query it from the engine then try to re post it.

Also, when generating ticks we need to flip to the current buffer when no
changes have been made to get another callback.

Now a NULL fb to fb_flip will either flip to next, if available, or current
if there's nothing new to flip to.
2016-09-08 13:55:24 -05:00
Derek Foreman 95a00b8e49 ee_drm: Get page flips out of the render thread
Now that we have redraws_clear exposed through software generic, we can
use that to do the final buffer swap from the main thread instead of doing
it in outbuf_flush which runs from the render thread.

This becomes more important later when other call sites in the main thread
will perform buffer flips.
2016-09-08 13:55:24 -05:00
Derek Foreman 79409757c6 ee_drm: Improve next buffer selection algorithm
When triple buffering it's possible that we'll only need two buffers at
a time for long durations.  When we finally call upon a third buffer it
hasn't been used recently enough to do a partial redraw.

By picking the oldest available buffer when multiple buffers are free we
can increase the likelihood of doing partial redraws.
2016-09-08 13:55:24 -05:00
Derek Foreman 5eec34812e evas_engines: Add a redraws_clear callback
This gives us a callback from the main thread after outbuf_flush occurs -
this is useful to get timing right on the drm and wayland engines.
2016-09-08 13:55:24 -05:00
Derek Foreman ce7991b993 ecore_drm2: Implicitly set buffer busy status when flipping
This simplifies other code that shouldn't need to deal with this.
2016-09-08 13:55:23 -05:00
Derek Foreman 794798f559 ee_drm: Move all ticking into ecore_evas_drm and use new tick system
Combines all the gl_drm and drm ticking code into one set in
ecore_evas_drm and uses the new evas tick register/unregister callbacks
to set it up.
2016-09-08 13:55:23 -05:00
Derek Foreman 3d39c1e9b8 ecore_drm2: Add a function to set the pageflip callback data once
Instead of passing the user data for the page flip callback every time,
set it just once.

This will make it easier to push tick logic into ecore_evas_drm, as there
will be a transitional period where page flips are driven in two places
that don't have access to the same pointers.
2016-09-08 13:55:23 -05:00
Derek Foreman cfd172c64b ee_drm: use the ecore_drm2_fb busy bit
Use the new busy getter/setter on the fb instead of keeping state in the
outbuf
2016-09-08 13:55:23 -05:00
Derek Foreman d8c9f8ef17 ecore_drm2: Add busy status to ecore_drm2_fb
We've been tracking this in the outbuf code, but that logic is going to
be moved into ecore_evas_drm to use the new ticking paradigm.
2016-09-08 13:55:23 -05:00
Derek Foreman 316ca09b0d ecore_evas_drm: Refactor common code
ecore_evas_gl_drm_new_internal and ecore_Evas_drm_new_internal are huge
functions differing in very few lines.  Combined them.
2016-09-08 13:55:23 -05:00
Derek Foreman 31de16d408 ecore_evas_drm: check for libglapi presence first
Minor refactor
2016-09-08 13:55:23 -05:00
Derek Foreman 398771bf8a evas_engines: Add fn_evas_changed callback
To allow using the pageflip completion event to drive timing in the DRM
engine we need to know as soon as possible that a render has been after
a render has been considered if it will cause a page flip or not.

The fn_evas_changed callback sends this information.
2016-09-08 13:55:23 -05:00
Derek Foreman 1591e095d5 ee_drm: Fix max buffer age
The highest possible buffer age should actually be 4, not the number of
available buffers.
2016-09-08 13:55:23 -05:00
Tom Hacohen bd3801247e Eo: Make function overrides implicit.
Before this commit, function overrides were explicit. That is, you'd
have to explicitly state you were overriding a function instead of
creating a new one. This made the code a tad more complex, and was also
a bit more annoying to use. This commit removes this extra piece of
information.

This means we now store much less information per function, that will
let us further optimise out structures in the future.
2016-09-08 13:59:04 +01:00
Chris Michael 0f8fb7ef88 evas: Fix jpeg snafu and properly send hold events to children
Commit 405680e836 changed how hold
events were being sent. Previous code was sending the hold events to
child objects, however after mentioned commit, they were being sent to
main objects. This patch fixes that.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-09-08 08:40:16 -04:00
Daniel Kolesa 1041edc6dc docs: actually close all ref files properly in order to not exceed maximum 2016-09-08 13:34:19 +02:00
Tom Hacohen 6b60560773 Eo class creation: Simplify code using recursive locks.
Now that we have recursive locks, the class creation code can be much simpler.
All the code there was essentially our own implementation of recursive locks,
or rather a special case of those.

This is no longer needed.
2016-09-08 11:14:32 +01:00
Carsten Haitzler 150cc62a0d eo domain tests - make a start on them with some basic ones
this adds tests for some of the basic domain tests. doing the
inter-thread ones is going to be much more.... fun.
2016-09-08 18:39:38 +09:00
Carsten Haitzler be29f3f4ec efl ui image - fix janky blocking async image preload thread handling
fix the elm image threaded image preload to be far simpler and
actually threadsafe without blocking the mainloop at all even on
object deletion. this also ensures ar least the first 512M of any
async precached file are loaded in so the preload doesnt stall on
headers that are outside maybe the first 4k of the file. i saw this
happening all over the place in the test i created.

@optimize
2016-09-08 17:30:59 +09:00
Carsten Haitzler f37a0398c3 epp - document that fallthrough is intended 2016-09-08 17:30:59 +09:00
Jean Guyomarc'h c8d82dfc61 ecore_cocoa: fix build warning 2016-09-08 07:51:30 +02:00
Jee-Yong Um 293e251f55 edje_cc: remove after programs lookup when removing program
Summary:
When removing program, program lookups for its after programs
should be removed.

@fix

Reviewers: cedric, jpeg, Hermet

Reviewed By: Hermet

Subscribers: taxi2se

Differential Revision: https://phab.enlightenment.org/D4286
2016-09-08 11:00:40 +09:00
Ji-Youn Park 7ce79be1a1 evas_render: fix clipping the whole area in each rendering.
evas_render should not be going and doing evas_object_clip_set () at all.
The framespace clip should be enforced at RENDER time.
2016-09-08 09:56:30 +08:30
Al Poole a19f730137 eio: fix kevent monitor to not SIGBUS. 2016-09-07 16:41:59 -07:00
Cedric BAIL e6a810efa7 elementary: fix call to efl_data_scope_get from another thread.
This should fix the breakage on elm_suite.
2016-09-07 11:42:29 -07:00
Carsten Haitzler 3ce5d1ebc7 eo_compatible - improve usability of err/warnings by duplication impl 2016-09-08 00:09:32 +09:00
Carsten Haitzler fc6759ef4d eodomain related docs - update as per some of gustavo's comments 2016-09-08 00:09:32 +09:00
Carsten Haitzler 9d2786896b eo - fix indenting in a file that was nuts and non-standard 2016-09-08 00:09:31 +09:00
Carsten Haitzler f695762d06 eo - add single global mutex for all shared eo objects to they are th-safe
this adds a signle mutex (recursive) mutex for all eo objects that is
auto-called by _efl_object_call_resolve() and _efl_object_call_end()
that wrap all eo method calls and since its recursive it can be
blindly called for sub-calls. this will lock all shared objects during
any call to any shared object so only the thread calling now has
access until it releases. not fine-grained but good enough and the
best we can do "simplistically".
2016-09-08 00:09:31 +09:00
Carsten Haitzler 1d26e61478 eina - add recursive mutex lock - apparently these are portable
new feature - recursive lock. same as normal lock just with recursive
attr set

@feature
2016-09-08 00:09:31 +09:00
Chris Michael c3d5ccf0f9 Revert "evas: Remove set but not used variable"
This reverts commit 24c5df29b3.

This should not have been pushed. Removed the variable from the wrong
spot :(
2016-09-07 08:35:30 -04:00
Chris Michael 24c5df29b3 evas: Remove set but not used variable
Gcc warns eo_child is set but not used here, so remove it.

NB: This should have been removed in previous evas_events commit. Oopise

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-09-07 08:31:39 -04:00
Chris Michael 578099f915 evas: Remove set but unused variables
Gcc reports that these variables are set but not used, so remove them

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-09-07 08:28:08 -04:00
Chris Michael 6b63d9d6ec evas: Remove set but unused variables
Gcc warns that these variables are 'set but not used'. After reading
the surrounding code, it turns out they are not actually used, so
remove them.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-09-07 08:22:11 -04:00
Andrii Kroitor 16a3509906 edje_cc: fix group inherit
Summary: item spread property was not copied.

Reviewers: NikaWhite, Hermet, raster, cedric

Subscribers: jpeg, reutskiy.v.v

Differential Revision: https://phab.enlightenment.org/D4285
2016-09-07 15:16:47 +03:00
Carsten Haitzler 4478654be1 eo resolv call cache - make TLS with __thread, linker+compiler do it
this will now fix the call cache to be a tls data member and thus
threadsafe. this is the sanest way.
2016-09-07 20:58:39 +09:00
Carsten Haitzler 09f19c3c73 eo - make eo id table TLS private data for thread safety and speed
This moved all the eoid tables, eoid lookup caches, generation count
information ad eo_isa cache into a TLS segment of memory that is
thread private. There is also a shared domain for EO objects that all
threads can access, but it has an added cost of a lock. This means
objects accessed outside the thread they were created in cannot be
accessed by another thread unless they are adopted in temporarily, or
create4d with the shared domain active at the time of creation. child
objects will use their parent object domain if created with a parent
object passed in. If you were accessing EO (EFL) objects across threads
before then this will actually now cause your code to fail as it was
invalid before to do this as no actual objects were threadsafe in EFL,
so this will force things to "fail early".
ecore_thread_main_loop_begin() and end() still work as this uses the
eo domain adoption features to temporarily adopt a domain during this
section and then return it when done.

This returns speed back to eo brining the overhead in my tests of
lookup for the elm genlist autobounce test in elementary from about
5-7% down to 2.5-2.6%. A steep drop.

This does not mean everything is perfect. Still to do are:

1. Tests in the test suite
2. Some API's to help for sending objects from thread to thread
3. Make the eo call cache TLS data to make it also safe
4. Look at other locks in eo and probably move them to TLS data
5. Make eo resolve and call wrappers that call the real method func do
   recursive mutex wrapping of the given object IF it is a shared object
   to provide threadsafety transparently for shared objects (but adding
   some overhead as a result)
6. Test test est, and that is why this commit is going in now for wider
   testing
7. Decide how to make this work with sending IPC (between threads)
8. Deciding what makes an object sendable (a sendable property in base?)
9. Deciding what makes an object shareable (a sharable property in base?)
2016-09-07 18:17:10 +09:00
Jaehwan Kim 59bdf3461c edje: add missed break in the switch construction. 2016-09-07 14:01:51 +09:00
Amitesh Singh a17909b007 eeze: remove trailing whitespaces 2016-09-07 09:48:39 +05:30
Youngbok Shin f50674db58 elementary label: use text width when label calculates duration for slide
Summary:
When developers customize theme for making different type of sliding label,
it would be better to send a duration based on whole text.
[The whole text width - label object's w] is only useful for short, bounce
type sliding.

Test Plan: N/A

Reviewers: raster, tasn, herdsman, cedric

Reviewed By: cedric

Subscribers: minkyu, akanad, z-wony, Blackmole, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-09-06 15:00:55 -07:00
Andrii Kroitor 605694ed2a eina: fix error reporting in cond_timedwait
Summary: EINA_FALSE was set into wrong variable.

Reviewers: jpeg, raster, Hermet, cedric

Reviewed By: cedric

Subscribers: NikaWhite

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-09-06 14:59:47 -07:00
Amitesh Singh a2e3b8ad13 eeze: add support of GPIO sysfs detection and watch.
This adds support for detection and watch of GPIO pins in /sys/class/gpio/*
This detects both gpiochip<N> & gpio<N>.

@feature
2016-09-06 20:42:26 +05:30
Carsten Haitzler e14a11d9fa eo base - fix free of all callbacks to set callbacks to NULL
we set count to 0 but not ptr to NULL. this we must do after free so
when other destructors run dont go relying on this ptr to be valid!
2016-09-06 22:12:23 +09:00
Tom Hacohen 75c981a9d9 Eo benchmarks: Fix according to recent Eo changes.
Thanks to Stefan for the report.
2016-09-06 13:58:13 +01:00
Stefan Schmidt 689ba2ff6d eo: update documentation after EFL_CLASS_DESCRIPTION_OPS removal
Remove the references to this removed macro.
2016-09-06 14:54:42 +02:00
Jean-Philippe Andre 183ba660d6 Efl.File: Remove method eject
Unused anywhere.
2016-09-06 17:48:13 +09:00
Jean-Philippe Andre b2d92f2626 evas: Implement support for external buffers
This brings support for the eo api for external buffers (like
the old data_set / data_get). The new API now works with slices
and planes.

The internal code still relies on the old cs.data array for
YUV color conversion. This makes the code a little bit too
complex to my taste.

Tested with expedite for RGBA and YUV 422 601 planar, both
SW and GL engines (x11).
2016-09-06 16:55:00 +09:00
Jean-Philippe Andre 2f737e8f3b evas: Change internal function image_data_direct 2016-09-06 16:54:54 +09:00
Jean-Philippe Andre 69132b5c1d evas: Implement plane support for managed buffers 2016-09-06 16:54:54 +09:00
Jean-Philippe Andre 8ee431572d evas: Switch EO APIs to Eina_Slice for gfx buffers (map)
This adds a plane and eina slice argument to the map/unmap
functions, instead of void_ptr + length.
2016-09-06 16:54:53 +09:00
Jean-Philippe Andre 1773ba5d82 evas: Internally switch to Eina_Slice for buffers
This will be used for the gfx buffer map/unmap eo apis.
2016-09-06 16:54:53 +09:00
Jean-Philippe Andre d7b8d97fd5 evas events: Add "raw" x,y values for future extensions
For pen tablets, this exposes the values as given by the driver
(quite useless without knowledge of the device itself).

For mice, this exposes x,y as set by the display manager, without
any extra processing in terms of smoothing or prediction. IOW
this returns the same as x,y until a smoothing algorithm is
implemented (todo).
2016-09-06 16:54:53 +09:00