Previously events used to use class name as a prefix and ignored eo_prefix
when specified. This is no longer the case. Events follow eo_prefix by default
now. In order to get around this for classes where this is undesirable, a new
field event_prefix was added which takes priority over eo_prefix. If neither
is specified, class name is used like previously.
@feature
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.
if an object iot reffed or not hide on del. it should have been this
way before eo. eoifications i think messed a few things up.
this does bring up an issue... in eo we have no way to explicitly do
stuff on eo_del regardless of references at the time. this needs to be
solved.
@fix
This replaces standard Evas_Object_Image when it is used "normally",
ie. it's an image from a file or from a pixel buffer. All other APIs
(proxy, snapshot, 3d, gl, ...) are disabled on this object.
Also, reduce number of failing calls when the object is not a legacy
object, but a legacy function is called. This is because a lot of
image APIs are called internally using the legacy APIs, often in
order to reset the state of the image object (eg. set file to NULL,
etc...)
It has been decided that we would not use any namespace for interface
and they will sit in efl main namespace.
This patch doesn't correct the naming of the event has we don't have a
prefix for event. We do still have EFL_ANIMATOR_EVENT_ANIMATOR_TICK,
instead of a nicer EFL_EVENT_ANIMATOR_TICK.
Mostly unused vars following the removal of eo_do_ret().
However, there are some cases where the migration script got some things
wrong, and I had to manually fix them.
I just ran my script (email to follow) to migrate all of the EFL
automatically. This commit is *only* the automatic conversion, so it can
be easily reverted and re-run.
The migration scripts breaks with some weird cases, here I manually
migrated some parts, and just removed the eo_do from others without
actually migrating (so I could deal with that later).
This give a constant improvement of 2% over a total benchmark run while scrolling
genlist. This benchmark included setup and destruction of the scene, so under
estimate the cost of the callback emit.
Use delete callback instead of direct call to clip_unset,
which lets us know that clip_unset() is called during the
clipper's deletion, as opposed to a simple call.
We can then make sure that the previous object state does
not point to invalid data anymore.
Here is a scenario that could have crashed:
- load and show an edje object, hide it
- change its theme or style
- show it again
@fix
Summary:
It adds evas_object_paragraph_direction_set, get APIs.
The APIs set or get paragraph direction to/from the given object.
It changes BiDi calculations and affect the direction and aligning of text.
It doesn't have any effect to text without Fribidi library.
The default paragraph direction is EVAS_BIDI_DIRECTION_INHERIT.
If dir is EVAS_BIDI_DIRECTION_INHERIT, paragraph direction is changed
according to smart parent object. If there is no smart parent object,
paragraph direction works as EVAS_BIDI_DIRECTION_NEUTRAL.
@feature
Test Plan:
Test cases included to the following files.
- evas_test_textblock.c
- evas_test_text.c
- evas_test_object_smart.c
Run "make check".
Reviewers: woohyun, raster, herdsman, tasn
Subscribers: c, raster, cedric
Differential Revision: https://phab.enlightenment.org/D1690
While cached surfaces is a topic we're discussing recently,
this code is dead right now, and we will have to redesign the
buffer caching better to handle proxies, maps, smart objects, etc...
Evas_Object_Filter_Data has a bool for 'async' at the end of the
struct. This field was missing from the initialization of
'default_state'
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This should theorically work, need some test. Design is easy to understand. Render
every part of a snapshot object by rendering the content below it, before rendering
the stack above it using that object content.
Those two functions were doing exactly the same thing[1], which
is free an image, so this commit only attempts to simplify the code
a little bit.
[1] Actually image_map_surface_free() might even not have worked
properly with cserve2 sw (calling unload instead of close).
Otherwise there would be conflicts in certain circumstances.
This also requires adding const on many existing functions,
and similar work is necessary in Elementary.
@fix
Deep down internally there was already a name, but no API could
really set it properly.
Here Edje will set the name of the filter based on the part name
or the data item name if relevant.
This creates the new interface
Efl.Gfx.Filter
And the implementation is a mixin (evas_filter_mixin.c):
Evas.Filter
All the filter rendering code has now been moved to this
new file. TODO: Merge image filtering.
Summary:
As we always call evas_object_inject in every Evas Object's ctcor,
it seems sensible to move this repeated bit of code to the super
(Evas.Object).
Test Plan: Expedite, Elementary_Test and pretty much everything
Reviewers: cedric, raster
Subscribers: JackDanielZ, cedric
Differential Revision: https://phab.enlightenment.org/D2665
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This is another cleanup in perparation for the Eo stable release.
This is no longer needed thanks to the proper error reporting with
eo_constructor()'s new return value.
The finalizer change cleans it up a bit so it catches more cases/issues.
This also means that the finalizer cleans up the object in all cases,
and not only some.
@feature.
From now on, constructors should return a value, usually the object
being worked on, or NULL (if the constructor failed). This can also
be used for implementing singletons, by just always returning the same
object from the constructor.
This is one of the final steps towards stabilizing Eo.
@feature
It seems like before the switch to Eo, all the object_*_add functions
had magic checks that only allowed non NULL Evas pointers to be passed.
Since we switched to Eo we apparently missed the early failure we used
to have, and we instead fail later. This patch should fix that.
Thanks to jaehwan for reporting.
@fix
this adds a lock for when walking all the objects to generate render
commands for an async render. this allows even the object tree walk
plus update area caluclation to be moved off into async if every oject
that can change canvas state actually does so correctly. this change
adds all those lock block calls to synchronise with an async object
tree walk.
Yeah, mixing maps and masks of masks in a genlist leads
to tons of amazing bugs :)
This commit removes x,y from the "mask" field in an object,
as they are duplicates of cur->geometry.{x,y} but were not
properly kept in sync.
This patch fixes a situation of:
- A genlist in a map
- Each item has an icon masked
- Scrolling the genlist
--> The masked items would not render properly before this
patch.
Remaining known problem:
- Mask a genlist (big mask)
- Each item has an icon masked (small mask)
- Apply a map to the genlist
- Scrolling the genlist
--> The big mask still works but totally screws up the
small icons with masks.
Note: These changes look scary just before the release
but I would have to backport them to 1.13.x as they
definitely are bug fixes. Also, they only concern
code paths used exclusively by masking.
The memory usage graph was going up and to the right!
I was told this is always a good thing!
... maybe not this time :)
Hopefully I didn't forget a case. An intense session of
genlist scrolling with masks all over the place and masks
of masks didn't show any glitch, crash or memory leak.
The main difference between 1.12 and 1.13 memory foot print is actually
related to this two pointer to mask. I am wondering if there is not an
issue here also has we do have a duplicated pointer. We have prev_mask
and mask in both cur and prev state of an Evas_Object, but only mask
and prev_mask from the cur state seems to be accessed.
If we can remove two pointers from those state, we should have a decent
win in expedite benchmark. Hopefully 300KB to win there (Close to half
the additional cost in memory).