Commit Graph

146 Commits

Author SHA1 Message Date
Cedric BAIL 7caa81ed9d edje: object have small difference and we use switch case fallthrough to reuse code. 2017-06-05 12:07:57 -07:00
Jean-Philippe Andre 76ef772d0a edje: Unify load error types for image and edje (EO)
Most of the values were the same, with edje having just a couple
more error codes.

Not entirely sure the prefix Efl.Image is correct for this type.
Maybe just Efl.Load.Error?
2017-05-29 10:49:17 +09:00
Jean-Philippe Andre c0db1f4225 edje: Add workaround for misuses of clip_set
An unfortunately very common misuse of clip is as follows:

- Layout A is created (edje object / elm_layout)
- Object B is swallowed inside A
- Clipper C is set to clip B

This is a invalid usage, as layout A takes control over the clip
property of B (just like it does for geometry, visibility, color...).

Since 75ec3a7338 edje_recalc resets the clip at every calc
loop, as it can change between states.

In the past, edje_recalc did not reset the clip so anyone could
(wrongly) swallow an object and then change its clip from C to modify
its color, mask it, blend it, etc... Even though this was not proper
use of the API, this is not very clearly documented, and since it
worked, it has been (ab)used a lot already.

The result now is that a clipper set from C will become visible
as an opaque white rectangle covering the entire UI. Booh.

This patch is a workaround that should have no impact on well
written applications. As a bonus this avoids an extra call to
clip_set() from edje.

@fix
2017-04-10 16:14:45 +09:00
Godly T.Alias 48627996d7 efl: fix memory leak in edje and evas.
Summary:
Signed-off-by: Godly T.Alias <godlytalias@yahoo.co.in>
Signed-off-by: Ayush Srivastava <ayush.sriv@samsung.com>

Test Plan: EFL apps

Reviewers: cedric, raster

Subscribers: rajeshps, ayush.sriv, jpeg, prince.dubey

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-02-15 16:29:07 -08:00
Jee-Yong Um 57c14f1c55 edje: fix cached edje modification issue
Summary:
_edje_part_***_set/get (for mouse_events, repeat_events, ignore_flags, mask_flags)
overwrite cached edje value. These behaviors affect all edje object added after
these changes, and result in not intended.

@fix

Reviewers: jpeg, cedric

Subscribers: akanad, woohyun

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-02-07 15:14:54 -08:00
Hosang Kim 15d46a419f edje_load: fix mirroring bug with GROUP, BOX, or TABLE part
Summary:
Mirrored stated should be applied to new edje_object
which is created for GROUP, BOX, or TABLE part.

@fix

Reviewers: woohyun, raster, cedric, jpeg, singh.amitesh

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-02-07 14:17:47 -08:00
Amitesh Singh 1a798c37dc edje: unset timer pointer after delete.
Signed-off-by: Amitesh Singh <amitesh.sh@samsung.com>
2017-02-04 13:30:49 +05:30
Cedric BAIL 8f1c071d6a eina: rename EINA_{FLT,DBL}_CMP to EINA_{FLT,DBL}_EQ. 2017-01-06 15:58:46 -08:00
Bruno Dilly 9308410479 edje: support filtering allowed seats per part
collections.group.parts.part.allowed_seats keeps a list
of seat names to be used for events filter.

So when evas devices of seat type are added, filters
may be applied for each part.

If no seat is listed, every seat may interact with such
part.
2016-12-21 23:03:33 -02:00
Cedric BAIL a5804c970d edje: fix float comparison warning in vector loading logic.
Hum, there is no use of our fixed point infrastructure for vector.
2016-12-20 16:39:30 -08:00
Bruno Dilly 287486e920 edje: add flag to choose between evas or edje seat naming
collections.group.use_custom_seat_names should be set to '1'
to use seat names on signals as provided by Evas.

By default just follow Edje naming approach
("seat1", "seat2", ...)
2016-12-19 14:58:35 -02:00
Bruno Dilly bb3fd015de edje: add names for seats following an incremental pattern
This way it'll be possible to write EDC with seat names that
will work no matter how seats are named by each ecore_evas
backend or users.
2016-12-19 14:58:35 -02:00
Bruno Dilly 5cfdf3ec3a edje: support seat on focus action and signals
Seat goes as an optional parameter for FOCUS_SET (if not
provided, act over default seat), and emit signals
with seat suffix:
 * focus,in,$SEAT
 * focus,out,$SEAT
 * focus,part,in,$SEAT
 * focus,part,out,$SEAT
2016-12-19 14:58:35 -02:00
Jee-Yong Um 0fd1445508 edje.object: implement Efl.Observer interface
Summary:
To remove duplicated lines to handle edje class (color, text, size),
observer interface is implemented to Edje.Object.

Reviewers: jpeg, cedric

Reviewed By: cedric

Subscribers: bu5hm4n, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-11-01 11:48:44 -07:00
Subhransu Mohanty cf779b44e0 evas/vg: renamed the legacy vg shape apis
Reviewers: Hermet, cedric, jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4284
2016-10-05 11:07:12 +09:00
Tom Hacohen 9c779dca90 Rename efl_self to efl_added
It has been discussed on the ML (thread: "[RFC] rename efl_self") and
IRC, and has been decided we should rename it to this in order to avoid
confusion with the already established meaning of self which is very
similar to what we were using it for, but didn't have complete overlap.

Kudos to Marcel Hollerbach for initiating the discussion and
fighting for it until he convinced a significant mass. :)

This commit breaks API, and depending on compiler potentially ABI.

@feature
2016-09-05 16:59:56 +01:00
Carsten Haitzler 6139c7a3c6 edje - reduce anothr 400k or so of memory usage (esp hello world)
so edje was allocating 32 pointers per collection. this is per
collection inside an edje file even if we just use one collection from
that edje file. it consumes 32 pointers. on 64bit thats 256 bytes...
just for pointers to mempools so we can "optimize" freeing and
allocation of parts. this was simply rediculous. i moved it to a
sub-struct allocated on demand (so now only for collections we
actually use) and this nuked 400k of "base memory usage youcant get
rid of).

note that our current default theme has something like 1100 or so
images, 1500 or so collections in it. as theme gorws, memory footprint
goes up if we dont allocation only on demand (when needed/used) and we
aren't careful about the size of our data structs and their content.

@optimize
2016-08-21 11:14:28 +09:00
Jee-Yong Um 4fc6d3cf90 edje: resolve user defined string with type
Summary: Resolve Edje_User_Defined string with type (normal/escaped/unescaped)

Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4219
2016-08-16 16:14:21 +09:00
Tom Hacohen e65aae994e Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for
Eo_Event that will follow soon.

Obviously breaks both API and ABI.
2016-08-15 15:07:42 +01:00
Carsten Haitzler 1d6a58cfc9 edje - save memory on edje parts as a lot of over-allocation was done
so ... Edje_Calc_Params was huge ... like about 200 bytes. every part
in every live edje object got one of these in addtion to real part
struct info etc. ... so really every part was probably consuming
300-500 bytes or so... crazy. so i made a lot of the data now optional
so only the minimum required is allocated now which cuts down about 110
or even 120 bytes per part, depending. 100 bytes was needed for 3d
node parts even though almsot no parts are 3d node parts... the image
and text data was 30-40 bytes so we consumed 100 even if we only used
30-40... so this cuts that done and puts in polace calc param cleanup
funcs everywhere they are needed to clean up this extra allocated data.

i also reduced this even more by maping pointers to req_drag, map and
physics and clip_to fields in another extension struct cutting
down another 28/52 bytes on most parts (in  return for an added
4/8 bytes - on 32/64bit accordingly).

in elementary_test this saves about ~300kb of ram for just having the
etst run and displaying (peak memory measuremment). so massif says
10.6M -> 10.3M.

@optimize
2016-08-15 09:21:08 +09:00
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Carsten Haitzler e5cfb76ef1 edje object shutdown - be far more paranoid about ptrs and order
so we didnt set everything to null after being freed and object sae
freed after some data. do the data frees after objects are deleted so
callbacks cant access null data anyway. this makes this edje shutdown
far more robust and safe. massive improvement in stability i hope.
2016-08-04 18:28:49 +09:00
Carsten Haitzler c59995916e edje - fix access to freed data struct during object shutdown
this fixes T4181
2016-08-04 18:19:42 +09:00
Subhransu Mohanty d458101a41 edje: updated the start index of vector resource from 1 to 0
Reviewers: cedric, jpeg

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-08-03 17:34:57 -07:00
Carsten Haitzler 1d0b500fa8 edje - reduce memory footrpint by dlopening ephysics on demand
this saves about another 80Kb or so in dirty pages by only loading
ephysics when needed. This removed ephysics and bullet library dirty
pages from the process space. this is another patch to address T4227.

@fix
2016-08-01 19:11:39 +09:00
Subhransu Mohanty 7af272d93c edje: Fix handling of polygon and polyline node.
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4203
2016-08-01 13:23:44 +09:00
Stefan Schmidt 3f4b2a2c90 edje: remove now unused variables
Commit e3ed888aa9 removed the code where these
variables have been used before.
2016-07-26 12:41:19 +02:00
Subhransu Mohanty e3ed888aa9 edje: fixed issue with applying transformation and stroke width
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4192
2016-07-26 14:33:15 +09:00
perepelits.m 77afcb596d edje: fix definition of viewport in edje-3d
We now use eo_do() and EFL_CANVAS_SCENE3D_CLASS macro to create viewport

Reviewers: raster, Hermet, cedric

Subscribers: jpeg, artem.popov

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-07-18 10:42:59 -07:00
Chris Michael ce9379398f edje: Fix issue of null pointer dereference
Coverity reports that 'text' here is a null pointer dereference so
check for valid 'text' variable before trying to use it.

Fixes Coverity CID1267490

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-11 11:20:23 -04:00
Carsten Haitzler 899d2d957a edje - language emit - handle null language and convert to none
cleans up an emit string being edje,language,(null) if no language is
set. use none instead of (null).
2016-07-11 13:46:21 +09:00
perepelits.m 52df6171e9 edje_player: create scene in the edje_player if there are some 3D-components
Summary: check if the size of scene is bigger than 0x0 and build 3D scene in the edje_player in this case and use "opengl_x11"

Reviewers: Hermet, jpeg, cedric

Subscribers: NikaWhite, Oleksander, artem.popov, cedric, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-07-08 10:49:49 -07:00
Subhransu Mohanty 9be9da17bf edje/svg: added _edje_svg_node_free() function
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4143
2016-07-07 16:29:21 +09:00
Subhransu Mohanty 522b82b026 edje: fix parsing and and visualizing gradients.
Reviewers: jpeg, cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-07-06 12:55:44 -07:00
Carsten Haitzler e2d7c11665 edje - reduce memory footprint by rearranging structs and types
this should cut some memory used by edje by using smaller types like
shorts instead of ints where we just dont need a full int range and
short will do, and re-ordering in memory data soit packs better when
accoutning for alignment
2016-07-04 15:01:52 +09:00
Subhransu Mohanty 48d3abf84b edje: fix the order of applying transformation when creating vg tree.
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4087
2016-06-24 15:15:54 +09:00
Subhransu Mohanty de7809a868 edje/svg: add few error message reagrding parsing and storing of svg file.
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-23 10:12:23 -07:00
Subhransu Mohanty 3ab15990d3 svg: added support for parsing and showing of polyline data.
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4064
2016-06-21 14:42:44 +09:00
Jean-Philippe Andre 7bf8da2baa evas: Rename Evas.Object to Efl.Canvas.Object
One step closer to make the EO inheritance tree look like
it's all Efl.
2016-06-21 14:35:19 +09:00
Subhransu Mohanty b6e86c39e5 edje_load: fixed adding ellipse shape data.
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4053
2016-06-20 10:13:26 +09:00
Subhransu Mohanty 901e8a0cfc edje: creation of gradient node from data parsing of color property and refactoring of fill and stroke attribute.
Reviewers: jpeg, cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-16 16:50:08 -07:00
Subhransu Mohanty 39452ff848 edje_load : return if we can't decode the vector data.
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4050
2016-06-16 15:26:08 +09:00
Jean Guyomarc'h e49ef569b4 edje: remove extraneous parenthesis 2016-06-15 22:55:45 +02:00
perepelits.m 32f5bc113e edje: creation of scene in edje-3d
Summary: Creation of scene and root node in edje-3d with all 3D-parts of edje object. Add some new methods to edje_util.c

Reviewers: raster, Hermet, jpeg, cedric

Reviewed By: cedric

Subscribers: artem.popov

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-10 13:57:01 -07:00
Subhransu Mohanty e38cf1f85f edje: cached the vg tree generation and fixed the interpolation betwwen two vg tree.
Reviewers: cedric, jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4028
2016-06-09 13:49:56 +09:00
Subhransu Mohanty 62c0a4ef08 edje: add new svg part to edc
Reviewers: Hermet, cedric

Reviewed By: cedric

Subscribers: jpeg, cedric, Hermet

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-08 11:35:33 -07:00
Tom Hacohen a6a2338962 Revert "Eo: Remove eo_del() and make eo_unref() the replacement."
This reverts commit 546ff7bbba.

It seems that eo_del() is useful and removing it was creating bugs.
The issue is that the way we defined parents in eo, both the parent and
the programmer share a reference to the object. When we eo_unref() that
reference as the programmer, eo has no way to know it's this specific
reference we are freeing, and not a general one, so in some
circumstances, for example:
eo_ref(child);
eo_unref(child); // trying to delete here
eo_unref(container); // container is deleted here
eo_unref(child); // child already has 0 refs before this point.

We would have an issue with references and objects being freed too soon
and in general, issue with the references.

Having eo_del() solves that, because this one explicitly unparents if
there is a parent, meaning the reference ownership is explicitly taken
by the programmer.

eo_del() is essentially a convenience function around "check if has
parent, and if so unparent, otherwise, unref". Which should be used when
you want to delete an object although it has a parent, and is equivalent
to eo_unref() when it doesn't have one.
2016-06-01 13:33:21 +01:00
Jean-Philippe ANDRE d0f141077e Efl: Add Efl.Part and switch to it
This should now fix the part API usage once and for all.
EFL should have no part name in any of its APIs beyond
the Efl.Part interface.

Part proxy objects (may be real objects) have a lifetime
of only one function call, in a fashion similar to eo_super.

@feature
2016-05-24 18:50:58 +09:00
Cedric Bail 45bc4f30eb efl: change name of animator,tick event in C. 2016-05-18 02:20:13 -07:00
Tom Hacohen 546ff7bbba Eo: Remove eo_del() and make eo_unref() the replacement.
We used to have eo_del() as the mirrored action to eo_add(). No longer,
now you just always eo_unref() to delete an object. This change makes it
so the reference of the parent is shared with the reference the
programmer has. So eo_parent_set(obj, NULL) can free an object, and so
does eo_unref() (even if there is a parent).

This means Eo no longer complains if you have a parent during deletion.
2016-05-17 16:23:23 +01:00