Commit Graph

55 Commits

Author SHA1 Message Date
Jean-Philippe Andre d0333561be evas: Add some safety code to evas_clip
I'm trying to fix a crash that seems to happens in some very odd
circumstances under stress testing. I have absolutely no idea
what is going wrong... So let's just add some extra safety.
2016-11-03 17:22:15 +09:00
Jean-Philippe Andre 62abe2cbff evas: Move clip_unset to legacy, remove group_clip
Similarly to group_color_set, group_clip_[un]set should not
exist and should be a result of efl_super and inheritance.

This patch also removes clip_unset from the EO API and keeps
only clip_set(NULL). The reason is that it will avoid bad overrides
of clip_unset() vs. clip_unset(NULL). This also simplifies the code
a bit. Ideally we should be able to reintroduce clip_unset in EO
if we can have a "@final" tag (like java's final keyword), to
prevent overrides.
2016-10-12 11:25:56 +09:00
Jean-Philippe Andre 39949b022d evas: Add pseudo-internal API to intercept basic calls
This is a poor man's solution to get rid of group functions such
as clip_set, clip_unset, color_set, etc... See the following
commits.

This API needs to be EAPI for elementary but shouldn't be used
outside EFL. This is required purely for legacy compatibility.

Here's the call flow, inside show(obj):
1. if (intercept_show(obj)) return;
2. show(super(obj));
3. do other stuff
2016-10-12 11:25:55 +09:00
Jean-Philippe Andre 9b8da4eb02 group: Replace group_no_render by object no_render
Most of the smart functions "Efl.Canvas.Group.group_xxx" should
not exist and be overrides of the base object function instead.
Cleaning this up is necessary if we want an EO API for custom
smart objects. This patch is the first attempt at removing a
method (the simplest one).

As for no_render, I wonder if propagating to the children
really is necessary. evas_render should skip them already.
2016-10-12 11:25:55 +09:00
Tom Hacohen d5e321466e Efl object: Rename Eo_Event -> Efl_Event.
This is the last step of the Eo renaming efforts.
2016-08-30 13:34:10 +01:00
Jean-Philippe Andre ae3ac0cd25 edje: Allow no_render in description
Previously, it was limited to the part block. It was a mistake
and should have been put in the description instead, as this
allows it to change during state transition (like visible, or
proxy_src_visible).

@feature
2016-08-16 20:08:32 +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
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Carsten Haitzler e57084d5c5 evas event handling4- fix more corner cases where bounding is bad
so smart object bounding box wasnt updated properly in several other
cases. fix those other cases too by dirtying bounding box region.

this continues on from:

f6b3c31561
25d77bc1d2
9f0fd66ab8

this fixes T4017

@fix
2016-07-08 10:17:56 +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
Tom Hacohen 6202cc7485 Adjust the code according to the eo event stop changes.
This was changed in the previous commit.
2016-06-20 18:02:00 +01:00
Jean-Philippe Andre 52f9220b3f Evas: Rename smart object into Efl.Canvas.Group 2016-06-17 19:32:43 +09:00
Jean-Philippe Andre bb7edc2ed4 Evas: Fix clipees_get and return an iterator
The legacy function was broken: it was returning the
private data.
2016-06-17 11:37:39 +09:00
Cedric Bail 75a53ece10 eo: for consistency use object like all our API. 2016-05-18 08:18:04 -07:00
Daniel Kolesa 7782c0bcb9 eolian: add event_prefix and have classes follow that or eo_prefix by default
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
2016-05-17 17:50:43 +01:00
Cedric BAIL ddf92ba61b evas: let's reuse what we know when possible to avoid more useless eo_data_scope_get. 2016-05-06 17:01:10 -07:00
Jean-Philippe Andre 8fb8e6d257 Evas render: Fix no-render with smart objects
Setting the no-render flag on an elm widget had no effect,
as it was not properly propagated to its children. This should
fix that, but I'm not a fan of the solution.

Fixes T3371
2016-03-29 10:43:00 +09:00
Tom Hacohen f21ade6123 Automatic migration to Eo4.
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.
2016-03-03 09:58:08 +00:00
Tom Hacohen e71e6561ee Eo callbacks: Migrate all of the EFL to the new event cb signatures. 2016-02-29 11:33:27 +00:00
Jean-Philippe Andre 2c61aa0d54 evas: Fix typo in previous clip issue fix
See 100a7006b8.

This typo actually caused some really rare crashes to happen
(even rarer than the one I fixed originally). Crashes nonetheless.
2016-02-01 20:29:15 +09:00
Jean-Philippe Andre 100a7006b8 Evas clip: Fix rare crash in _render_pre_clipper_change
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
2016-01-28 12:19:53 +09:00
ChunEon Park ea442da9ed evas clip: add warning msg for wrong scenario. 2015-09-01 16:34:17 +09:00
Jean-Philippe Andre b5c9350805 Evas: Replace image_map_surface_free by common image_free
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).
2015-07-02 12:05:50 +09:00
Jean-Philippe Andre 111e51a6ff Evas: Add "no-render" flag for proxy sources & clippers
Those objects should never be rendered on the canvas, even if they
are visible. On the other hand, they need to be rendered in mask or
proxy surfaces.

note: this patch includes some extra whitespaces changes :(

@feature
2015-06-15 16:59:41 +09:00
Youngbok Shin 84634ea51f evas/clip: If the clipper is image or has color, clipped area should be redrawn.
Summary:
If the clipper is image or has color, it affects to its clipees.
Even if we unset the clipper or change the clipper to another object,
it seems the clipper is not changed.

Test Plan:
Make two clipper objects and one clipee object.
And make clip the clipee according to following example

ex) Clipee object -> inner_clipper -> clipper

evas_object_clip_set(clipee, inner_clipper);
evas_object_clip_set(inner_clipper, clipper);

After checking the result and hide inner_clipper.

evas_object_clip_set(clipee, clipper);
evas_object_hide(inner_clipper);

See the result.

Reviewers: raster, cedric, Hermet, jpeg

Subscribers: woohyun, cedric

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

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>

Note: Technically we should not check the color of the fact that
      the clipper is a mask and not a simple rect. But because of
      real-life performance issues, damage_add was disabled so we're
      trying to keep the perf in most cases while being correct in
      cases where the clipper is visually important.
2015-03-17 11:13:29 +09:00
Carsten Haitzler 7c5f92d702 evas - render - have lock point to allow for async obj walk + update add
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.
2015-02-12 11:06:40 +09:00
Jean-Philippe Andre a688ba45c8 Evas masking: Fix some remaining issues with animations
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.
2015-02-04 15:03:37 +09:00
Jean-Philippe Andre 2a0201d571 Evas masking: Allow setting an image object as clipper
The render function is not yet implemented, but this
prepares the infra used to set an object other than
Rectangle as a clipper.

@feature
2015-01-07 15:06:02 +09:00
Tom Hacohen 0fc3279db9 Efl: Update code to use the new class names generated by eolian. 2014-06-03 11:28:01 +01:00
Carsten Haitzler 8767a80b0d fix overdraw issue in evas when clips change
the comments say it all. this stops adding massive full window updates
when clippers lose all children (and are visible) or gain a first
child while visible as all code hides these clip rects (or shows them)
in these cases and other usages just make no sense.
2014-04-16 16:14:16 +09:00
Subhransu Sekhar Mohanty 4d8fbd623c evas: add NULL check to avoid crash when clipper dosen't have a layer.
Summary:
There is a crash in naviframe demo and the stack points to the clip set function where it tries to acess evas object
from a NULL layer , by going through the log found out raster has already added the NULL check in clip_unset function
so just added the check in clip_set.

Reviewers: seoz, raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D625
2014-03-15 19:55:59 +09:00
Cedric BAIL bd2152a1cc evas: protect against potential NULL access.
Fix CID 1191919.
2014-03-13 10:40:14 +09:00
Daniel Zaoui f22bd9e6ee Eolian: Integration of Evas Object.
const have been added in object parameter of two legacy APIs to fit
Eolian generated files.
Since these functions retrieve information from object, it is logic that
the object would be const.
2014-03-12 10:57:28 +02:00
Carsten Haitzler 0c1d42bb68 fix map-across-mark patch from sergey in december 2013
stable release - cherry-pick me!

of course! eina_hash_direct_add() for the object pointer is using the
poitner to the stack value, not the value itself it points to... this
was bad and just by luck out value was on the stack that grows but
never shrinks and thus never crashes, BUT... it will just break in all
sorts of fun ways. basically it makes the hash useless as the keys in
it are effectively all the SAME value as they point to the same
storage.. but it changes whenever that stack mem gets changed.
2014-01-02 09:39:33 +09:00
Daniel Juyung Seo 76d8532b54 efl: Unified eina critical manro to CRI.
Being annoyed by different types of eina critical macros - CRI, CRIT,
 CRITICAL -, I concluded to unify them to one. Discussed on IRC and
 finally, CRI was chosen to meet the consistency with other macros -
 ERR, WRN, INF, DBG - in terms of the number of characters.
If there is any missing bits, please let me know.
2013-12-26 12:27:13 +09:00
Carsten Haitzler abb06c111b evas - silence coverty (false positive leak)
the hash can't leak where coverty thinks... because the hash find can
never work ... because the hash is empty.
2013-12-06 09:07:44 +09:00
Vostokov Sergey 6a5e72d37b evas - Clip mark performance improvement
stable release - cherry-pick me!

We propose a patch that reduces graph traversal work in
evas_object_child_map_across_mark(). It fixes a few particular
slowdowns around Tizen applications, including 0.6 seconds slowdown.

evas_object_child_map_across_mark() does not seem to need to
recursively call itself on the same object many times. Yet we have
noticed that in some scenarios it repeatedly traverses the same
subtrees of objects over and over again, whenever there is more than
one way of reaching these subtrees. In the production issue mentioned
above, certain elm_object_part_content_set() call results in millions
of recursive calls of evas_object_child_map_across_mark(), taking
~0.6sec total.

We propose to allocate a hash table during top-level call to store all
objects visited, and return from sub-calls instantly whenever we are
called over an object we already visited.
2013-12-05 21:08:35 +09:00
Cedric Bail 05e17cb6b6 Revert "evas - clip shutdown fix to avoid invalid mem accesses"
This reverts commit eb6af1f1ff.

This commit was making the code much more complex than required. Let's make
eina_cow_free set the value back to its default.
2013-11-04 12:23:25 +09:00
Carsten Haitzler eb6af1f1ff evas - clip shutdown fix to avoid invalid mem accesses
many valgrind complaints on e shutdown are there regarding accessing
cow sections, lists and object elements during shutdown. this plugs
theses little holes to avoid the invalid accesses and thus avoids
potential crashes.
2013-11-03 21:43:11 +09:00
Carsten Haitzler b5472db51d fix if obj->layer is null during shutdown 2013-09-25 13:05:41 +09:00
Cedric Bail 85f0749a83 evas: cleanup intercept code and improve performance there a little. 2013-08-29 10:53:48 +09:00
Sebastian Dransfeld 51023d2d4f evas: Keep sane name for public header
Evas_Common.h should be used for the public header, and rather rename
evas_common.h internal header to another name.

Sa:
Evas_Common_Header.h -> Evas_Common.h
evas_common.h -> evas_common_private.h

Shouldn't have both Evas_Common.h and evas_common.h because of case
insensitive filesystems.
2013-06-20 12:53:29 +02:00
Carsten Haitzler f8c9a8d167 revert the revert... damn you git!
Revert "Revert "Efl: replace eo_data_get for objects data referencing.""

This reverts commit b64a2994b3.
2013-05-02 16:47:16 +09:00
Carsten Haitzler b64a2994b3 Revert "Efl: replace eo_data_get for objects data referencing."
This reverts commit 654a3f5f94.
2013-05-02 14:17:19 +09:00
Daniel Zaoui 654a3f5f94 Efl: replace eo_data_get for objects data referencing. 2013-05-01 10:37:08 +03:00
Rafael Antognolli 59c37d1c7b evas/framespace: Add support for framespace offset rendering translation.
Instead of moving the objects by adding the framespace offset to them,
use this offset when rendering them. This way there's no change in the
object's geometry/position, it works correctly with map, and will be
automatically updated in case that the framespace values change (for
instance if one sets a window to borderless).

There are 2 main places where changes were needed:
 - output redraws, when they come from an object being changed, must be
   add the framespace offset to their damaged area;
 - checks to see if the object is inside a given rendering area, must
   also add this offset, since the object is actually being rendered on
   a different position;
2013-04-29 11:29:43 -03:00
ChunEon Park fbec2b33db evas - removed unused 2013-04-12 11:06:03 +09:00
Cedric Bail e0f2ddadde evas: use eo_data_get less. Use clipees_has if you want to know the number of child now. 2013-04-11 18:07:09 +09:00
Cedric Bail f1dfbc4e0e evas: remove one useless pointer (-30KB). 2013-04-07 14:00:10 +09:00
Cedric BAIL d79a2efa39 evas: use Eina_Cow a lot more and we are closer to the memory size of 1.7. 2013-03-13 14:35:25 +09:00