Commit Graph

14033 Commits

Author SHA1 Message Date
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
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
Daniel Kolesa 9da5cf20aa eolian: remove old ownership system 2017-09-15 17:52:55 +02:00
Daniel Kolesa 1afd3c215f eolian: correctness fixes in tests and eo files 2017-09-15 17:48:28 +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
Carsten Haitzler f179d32157 efl net - adapt to openssl 1.1.0 changes with tls method support
support the tls methods if on openssl 1.1.0 so we don't get
"unsupported cipher" as it does support it just with a new api.

@fix
2017-09-15 16:12:59 +09:00
SangHyeon Jade Lee d3440a9867 genlist: process item block positioning before relative item deleted
process item for positioning proper relative block before it's
relative item is deleted.

Signed-off-by: SangHyeon Jade Lee <dltkdgus1764@gmail.com>
2017-09-15 12:11:55 +09:00
Carsten Haitzler dc137aba43 ecore exe - fix fix malloc fail handling
for both ecore_exe_win32.c and ecore_exe_posix.c when the rare case
(basically almost never) that malloc fails for the exe read/err
buffers also set the data size to 0 so it doesn't lie with a NULL ptr
for data.

@fix
2017-09-15 07:44:58 +09:00
Carsten Haitzler 0f08ee686e evas box - fix longstanding bug where min size is miscalculated
this has affected edje for... like... ever. min size of boxes just
doesnt work. because evas box just doesnt do it right. this has led to
nasty things where edje box is just not usable if you use weight of 0.
btw weight 0 means "stay at min size no matter what even if we expand
the box to be bigger" in edje... which is totally broken and i can't
fix that without potentially breaking even more stuff... but let's
see. i've been using this for several days now and ... i can't find
breakage... so this should fix up SOME issues in edje.

@fix
2017-09-15 07:35:34 +09:00
Cedric BAIL a10a1fa641 ecore: update buffer size before allocation, not after. 2017-09-14 11:46:28 -07:00
Felipe Magno de Almeida 44c0199f42 eolian-cxx: Fix instantiate constructor with lambda after disambiguation patch 2017-09-14 15:06:33 -03:00
Cedric BAIL 112777fc7a eina: add iterator macro for Eina_Value that contain an array. 2017-09-14 11:00:34 -07:00
Cedric Bail cba58203a3 eio: move efl.io.manager.xattr.get to use the new Eina_Future. 2017-09-14 10:11:29 -07:00
Cedric BAIL 024c6a9fc3 efl: silent warnings shown on solaris due to missing header files. 2017-09-14 09:59:02 -07:00
Cedric BAIL 6a4bc78eaf eio: don't flush value after giving ownership. 2017-09-14 09:36:33 -07:00
Daniel Kolesa 518ca72d06 eolian: default free funcs for builtin types 2017-09-14 15:53:30 +02:00
InHong Han 9f068c55db ecore_imf: Add ecore_imf_context_input_panel_position_set API
Summary: Sets the x,y coordinates of the input panel

Test Plan: Tested in Tizen device

Reviewers: woohyun, id213sin, jihoon, cedric

Subscribers: jpeg, jihoon, cedric

Differential Revision: https://phab.enlightenment.org/D5193
2017-09-14 10:49:03 +09:00
Cedric Bail 8fbfab83e9 eina: add an ability to quickly convert from an Eina_Value to an Eina_Binbuf. 2017-09-13 17:26:04 -07:00
Cedric Bail b9ef9af74a eio: migrate efl.io.manager.open to use Eina_Future. 2017-09-13 15:53:00 -07:00
Cedric Bail ba34b998eb ecore: allow efl_loop_future_scheduler_get on all Efl.Loop.User. 2017-09-13 15:53:00 -07:00
Daniel Kolesa a9aed90fde eolian: more relaxed rules on what is actually ownable
For example, aliases to ownable types are now also ownable,
which wasn't possible in the previous version, where you could
only own actual expanded ownable types.
2017-09-14 00:34:06 +02:00
Daniel Kolesa 59347d4c4b eolian: include terminatable checks in ownable check 2017-09-14 00:28:32 +02:00
Daniel Kolesa 8ff2bf35fe eolian: inherit freefunc between types/typedecls 2017-09-14 00:12:46 +02:00