Commit Graph

55482 Commits

Author SHA1 Message Date
Daniel Hirt 61db4947f4 Edje load: reset seats counter on file_del
The seats list got emptied, but the counter progression was kept,
causing needless different seat names for the same device across
different edje objects.
2017-09-18 19:47:52 +03:00
Marcel Hollerbach 97d150daad elm_widget: eval the manager after the logicals are evalulated
for the obj is the only child of parent this would have lead to manager
  beeing NULL.
2017-09-18 15:49:43 +02:00
Marcel Hollerbach dcedaf8e09 elm_widget: also update if visible set is intersected
the error case is when a element is shown, but its parent was not.
In that case intersect returns immidiatly, without evalulating the focus
state again.
2017-09-18 15:49:43 +02:00
Jean-Philippe Andre 1fb306fd3e edje: Fix make check :(
No idea how I missed that one... (except that make check is now broken
for C++, again)
2017-09-18 17:40:38 +09:00
Jean-Philippe Andre f53fe993a6 edje: Merge calc_size_min_restricted & calc_size_min
calc_size_min was just a helper passing 0,0 to the restricted form.
Let's not duplicate APIs in EO and use an optional argument instead.
Bindings should be nicer and C could use a macro if it's too cumbersome
to pass in 0,0.
2017-09-18 17:37:23 +09:00
Jean-Philippe Andre 641a58f735 edje: Use Eina.Size2D for min calc 2017-09-18 17:26:53 +09:00
Jean-Philippe Andre 942cbbed73 edje: Use Eina.Size2D for group min & max size 2017-09-18 17:26:53 +09:00
Jean-Philippe Andre d8eea084fb efl: Use Eina.Size2D for size hint aspect 2017-09-18 16:50:58 +09:00
Jean-Philippe Andre 6b5d155918 efl: Use Eina.Size2D for size hints base & step 2017-09-18 16:38:47 +09:00
Jean-Philippe Andre a72f3ec64e efl: Use Eina.Size2D for size hint combined min
For this patch I decided to add a pseudo legacy wrapper as the function
is called in a very large number of places. Fixing all those calls to
use the size2d form is a lot of work and a greater risk of b0rking
something.
2017-09-18 16:33:33 +09:00
Jean-Philippe Andre 7d2b4b6916 efl: Use Eina.Size2D for size hint restricted min
This is the "internal" or "intrinsic" minimum size, to be set by EFL and
not by applications.
2017-09-18 14:57:52 +09:00
Jean-Philippe Andre 3bff7363b5 efl: Use Eina.Size2D for size hint min 2017-09-18 14:42:52 +09:00
Jean-Philippe Andre d24dcb3c24 efl: Use Eina.Size2D for size hint max 2017-09-18 14:20:03 +09:00
Jean-Philippe Andre 994d32f2a8 gfx: Add comment about visibility 2017-09-18 13:55:59 +09:00
Jean-Philippe Andre 4c634ed78e efl: Use Eina.Size2D for Efl.Gfx.size
Big patch as a lot of things call or reimplement size_set. Hopefully I
got it right... fingers crossed.
2017-09-18 13:34:50 +09:00
Jean-Philippe Andre 8fb194d969 efl: Use Eina.Position2D for Efl.Gfx.position
Note: This is a little bit more cumbersome in some places but in most
it's more convenient than (x,y).
2017-09-18 13:22:54 +09:00
Jean-Philippe Andre f3eff6eb3e efl: Introduce Eina.Rect and switch EO APIs to it
It's a complex struct but defined in EO as a simple struct. ABI-wise
it's equivalent to Eina_Rectangle. Some macros that use Eina_Rectangle
also work on Eina_Rect out of the box, most of the code dealing with
x,y,w,h will require no modifications either.

But Eina_Rect provides direct access to a size or position 2d component,
as well as the usual x,y,w,h. The field "rect" is provided as a
convenience for code dealing with both Eina_Rectangle and Eina_Rect. We
may or may not require it.

Note: Size2D could use unsigned values but I have spotted a few places
in the code that actually use -1 to indicate invalid size (as opposed to
0x0).

@feature
2017-09-18 13:22:52 +09:00
Jean-Philippe Andre cb3b4cc8d7 elm image: Fix async open to avoid multiple mmap
Reported by @jiin.moon:

In case of async_open for an elm_image, we try and open a file in a
thread, then map it and populate a bit, as this may take some time
(blocking I/O). This creates a mmap with eina_file_map_new. But later
evas image loaders will (usually) try and map the entire file with
eina_file_map_all() which creates another mmap. Since the size is
different (32Kb first then all) the returned map might be different
(it's up to the kernel to decide at this point).

So, in order to avoid having multiple maps on the same file, and try to
reduce the peak memory usage, we should prefer using the same map all
the time, i.e. the global one returned by eina_file_map_all().

This patch relies on the previous patch in eina_file which fixes
eina_file_map_populate() for the global map.

@fix
2017-09-18 11:58:53 +09:00
Jean-Philippe Andre 05c051405e eina file: Ensure populate is safe to call
This makes sure that the call to madvise is safe. On Linux it's not too
much of an issue as checks are made inside madvise, and the worst that
can happen is an error is returned (EINVAL). Not great.

But if MAP_POPULATE is not present, as is the case on *BSD, then the
internal function _eina_file_map_populate() is used for the populate
rule. In that case actual data is read and we should make sure not to
trigger a segfault or bus error.

Also, this makes sure that in case of HugeTLB we actually populate all
pages, rather than one page out of 8 (we were jumping by 16Mb instead of
2Mb).

Note: Can we get the size of a HugeTLB at runtime? We're assuming 2Mb
which might very well not be the case!
See: https://wiki.debian.org/Hugepages

Tested by disabling MAP_POPULATE and observing crashes :)

@fix
2017-09-18 11:58:53 +09:00
Jean-Philippe Andre b2ea60691e eina file: Fix map_populate on the global map
If eina_file_map_all() is called, the map isn't added to the internal
hash "rmap" and so _eina_file_map_rule_apply() would never be called.

@fix

asa
2017-09-18 11:58:53 +09:00
Jean-Philippe Andre 81f3099f32 flip: Fix invalid use of EOAPI in legacy header
This compiled fine with GCC but not with TCC.

@fix
2017-09-18 11:58:53 +09:00
Amitesh Singh 3e65945d5b intv slider: use scope_get instead
its better to use efl_data_scope_get() in eolian
functions except in finalize().
2017-09-18 10:40:49 +09:00
Cedric Bail 39fdfc3cac ector: move gradient color computation to a pool of thread.
This has been a long standing plan for improving performance in rendering
vector object. If your test involve updating gradient, you will get another
speedup of around 15%. Combined with previous shape, we get a 65% improvement
with doing the CPU intensive computation in there own thread before the
rendering kickoff. This was motly theorical until now, but well, it works
great !
2017-09-17 11:49:48 -07:00
Cedric Bail e380ddb742 ector: move RLE shape/stroke computation to a pool of thread.
This has been a long standing plan for improving performance in rendering
vector object. Depending on the test, you will get an improvement between
10 to 35% when rendering vector based object.

We are still maintaining the Cairo backend as the default one at the moment
due to a lack of result comparison tests between the two engine. Hopefully
we should get that covered and we can all enjoy a backend that is 4 times
faster by default.
2017-09-17 11:49:48 -07:00
Cedric Bail 560e5c8e0f ector: avoid calling function pointer when it is unecessary. 2017-09-17 11:49:48 -07:00
Cedric Bail dd297854d1 ector: add ability to run task in another thread during preparation stage. 2017-09-17 11:49:48 -07:00
Carsten Haitzler aec79f9d0d efl net http - fix protocol error handling to not crash and handle it
if http server doesnt send even a valid http response and just closes
your conenction... dont segv with null pd->cm

@fix
2017-09-17 18:18:12 +09:00
Felipe Magno de Almeida 192c7e35f6 eo-cxx: Fix assignment operator for eo::concrete 2017-09-17 06:17:01 -03:00
Daniel Zaoui 151d7a6517 Tests/datetime: set the weekday to avoid Exactness error
The weekday, if not set, is the weekday of the day the test is run (i.e
today).
It means Exactness shots will be different most of the time.
2017-09-17 09:31:24 +03:00
Jean Guyomarc'h 96ab58fb8e eina: prevent memory corruption in chained mempool
The chained mempool uses eina trash to dispose and retrieve memory
blobs. Problem is that eina trash requires the memory blobs to be at
least of the size of a pointer. If the size of an element in the mempool
is less than the size of a pointer, which _is_ possible as no minimal
size is enforced, eina_trash will silently corrupt the memory pool.

To prevent memory corruption while still allowing small elements, the
size of an element defaults to the size of a pointer if it was smaller.
This comes at the cost of consuming slightly more memory in these cases,
but at least the memory pool can be safely be used.

@fix
2017-09-16 14:28:39 +02:00
Jean Guyomarc'h 76144128ce eo: fix doxygen typo 2017-09-16 14:28:39 +02:00
Jean Guyomarc'h ca731fbfb6 eina: handle errors when creating a mempool
If the backend initialization failed, the mempool would still be
successfully created. The mempool is now destroyed on failure.
2017-09-16 14:28:39 +02:00
Felipe Magno de Almeida b5c4aeab94 eo-cxx: Fix possible non-initialization in copy-constructor and move-constructor 2017-09-15 15:16:58 -03:00
Felipe Magno de Almeida 6ded80a9b5 eo-cxx: Fix conversion from char* to std::string 2017-09-15 14:56:23 -03:00
Davide Andreoli 6714763dab Edje external tests: fix some texts
The bugs mentioned are now fixed
2017-09-15 19:38:24 +02:00
Daniel Kolesa 9da5cf20aa eolian: remove old ownership system 2017-09-15 17:52:55 +02:00
Daniel Kolesa 60d6aeeb2d elua: update for new eolian ownership system 2017-09-15 17:52:38 +02:00
Daniel Kolesa 1afd3c215f eolian: correctness fixes in tests and eo files 2017-09-15 17:48:28 +02:00
Daniel Kolesa c559380f7f eolian cxx/js: fix test eo file ownership 2017-09-15 17:10:41 +02:00
Daniel Kolesa 78a5ac09f8 elementary: convert to new ownership 2017-09-15 17:05:30 +02:00
Daniel Kolesa 9622511df0 efl interfaces: convert to new ownership 2017-09-15 16:57:44 +02:00
Daniel Kolesa 8f6ba61011 ecore: convert existing eo files to new ownership 2017-09-15 16:51:37 +02:00
Daniel Kolesa a8b8b7efde eo files: first batch of @owned conversions 2017-09-15 16:44:26 +02:00
Daniel Kolesa 21213802e4 eolian: switch validation to new ownership system 2017-09-15 16:37:26 +02:00
Daniel Kolesa 157e125114 eolian cxx: use new ownership check API 2017-09-15 16:35:24 +02:00
Daniel Kolesa 4b27fe6571 eolian: add API to check for @owned 2017-09-15 16:33:57 +02:00
Daniel Kolesa 010650663b eolian: store ownership info in types
Even though ownership info belongs to params/returns/etc at syntax
level, we can still store it in the type and turn several API funcs
into one this way.
2017-09-15 16:30:52 +02:00
Daniel Kolesa 792855a1fa eolian: parsing of new @owned syntax for complex types 2017-09-15 16:24:46 +02:00
Daniel Kolesa 4c4c641c4b eolian: disallow parsing of warn_unused/owned for funcptrs 2017-09-15 15:54:48 +02:00
Daniel Kolesa 11ad2b94ff eolian: initial parsing for @owned
This is the new ownership system for Eolian, working on params,
returns, struct fields or events directly rather than specifying
ownership at type level. As the new system will evolve it will
gain missing features and necessary checks.
2017-09-15 15:51:25 +02:00