Commit Graph

2731 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 7f25f19b47 evas: Simplify intercept code
I'm trying to fix a bug. This is not changing logic in any way,
just factorizes the use of va_args.
2016-11-03 17:22:15 +09:00
Jean-Philippe Andre a8ff76eb0d evas: Fix debug logs with REND_DBG (typo) 2016-11-03 17:22:14 +09:00
Jean-Philippe Andre 4d1c53d916 evas: Avoid calling render() on smart objects
Smart objects do not render themselves. This can avoid a
bit of extra unnecessary work.
2016-11-03 17:22:14 +09:00
Bruno Dilly f395fbd960 evas: Fix doxygen and normalize function signature
On recently added function evas_device_add_full()
2016-11-01 16:06:19 -02:00
Guilherme Iscaro 402abcaefc Evas Device: Avoid invalid ptr indirection.
Summary:
When Evas is deleted the function _evas_device_cleanup() goes thru all
devices and unref them. Since Evas_Devices are Efl_Input_Device, the user
may still hold a reference to the device (efl_ref()),
thus causing the device to do not be deleted *yet*.
This causes a problem, because when the user calls efl_unref()
and the device itself is deleted the Evas _del_cb
callback will be called and will try to access the Evas_Public_Data from
a deleted object.
In order to avoid this problem all devices will be kept in the devices
list and Evas will unregister the EFL_EVENT_DEL from those devices that
were not deleted.

Reviewers: jpeg, bdilly, barbieri, cedric

Reviewed By: bdilly, cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4369
2016-11-01 16:03:52 -02:00
Carsten Haitzler 860e0d34b0 obj caching - add a reuse in key event objects too to nuke leaks
new leak since sink was added.
2016-10-28 22:58:36 +09:00
Tom Hacohen f2e049c818 Input events cache: use the new mechanism to reuse eo objects. 2016-10-28 13:20:56 +01:00
Carsten Haitzler b533f15880 evas - fix smart clipped if a move happens to recurse within itself
so since this uses new pos - cur pos to move BY x pixels... there is
an issue that if the move of the obj ends up re-moving the current obj
TO the same pos. it moved BY the same delta again thus racing ahead.
not great. because x/y is not stored until the call stack returns to
after the smart move func and the pos set storce the new position in
the object struct. the easiest way atm until we have relative
positioning etc. is to store this in the smart obj and use the delta
at that time of the call then store it immediately so a recursion ends
up with a delta of 0 if its the same pos, so go back to where we were.

this fixes a nasty issue i spotted in fileselector that made filesel
icons race along when scrolling 2x as fast as everything else. oddly i
couldnt see this in any other widget that scrolled when i looked...
which is odd, but... either way a nasty issue... subtle... and now
fixed. never saw this before so this seems new.
2016-10-28 08:21:50 +09:00
Stefan Schmidt 21f935c39c docs: evas: document missing structs 2016-10-27 18:22:42 +02:00
Stefan Schmidt 6f25878665 docs: fix the last missing enum field docs all over the tree
With this comit we reach 100% eo doc coverage for enum fields. Keep it like
this. :)
2016-10-27 00:26:16 +02:00
Stefan Schmidt 1183e64fb3 docs: evas 3d: update and correct some docs for 3d object class 2016-10-27 00:03:01 +02:00
Stefan Schmidt 67282977a1 docs: evas_types: finishing up documenting all enum types in evas_types 2016-10-27 00:03:01 +02:00
Jean-Philippe Andre 40fec5f608 evas: Fix legacy events output vs. canvas coords
In case of a mapped object (eg. when applying a map to a window
in wayland compositor), the canvas and output coordinates are
not meant to be the same.

In EO land, applications should instead use the common interface
Efl.Input.Interface.pointer_xy.get (on the canvas).

@fix
2016-10-26 13:42:54 +09:00
Subhransu Mohanty 4f16e16b94 evas: vg/gradient - add missing legacy api for gradient object creation.
Reviewers: jpeg, Hermet, artem.popov, cedric

Reviewed By: artem.popov, cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-10-25 14:37:11 -07:00
Stefan Schmidt 1ed2b0fbde docs: document all missing enums
With this commit we reach 100% enum doc coverage. The fields in the enums are
still at 91%, but there is progress on that front as well.
2016-10-25 16:08:25 +02:00
Chris Michael 9c9c8809a7 evas: Fix framespace object clipping detection
This patch fixes an issue where border icons were missing when running
EFL Wayland client applications. This also fixes the issue where
softcursor mouse pointers would not draw over bottom window border.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-24 13:08:00 -04:00
Marcel Hollerbach 0180da708d evas_callbacks: restore error message behaviour from MAGIC_CHECK
before changing MAGIC_CHECK to eo_isa passing NULL to a function would
result in nothing, now it gives a error message. This restores the old
behaviour.
2016-10-22 19:26:47 +02:00
Chris Michael 0f6c33eff1 evas: Fix issue of wayland clients not drawing border icons
Due to commit 7ce79be1a1, EFL Wayland
Client applications stopped rendering their window icons. This was due
to the code which tried to detect if an object is in framespace.
Previous version would just check the obj->is_frame flag ... which is
insufficient to determine if an object is in Framespace. This commit
fixes that issue by checking an objects geometry also.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-21 15:32:47 -04:00
Subhransu Mohanty 9b7ac51943 evas/map: do nothing when same map is set again
Reviewers: cedric, Hermet, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4344
2016-10-17 10:49:10 +09:00
Subhransu Mohanty 8b7f060946 evas/module: add a new module in vg_saver for eet
Reviewers: cedric, jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4350
2016-10-14 15:52:51 +09:00
Jean-Philippe Andre 2fc23aa561 evas: Fix evas_object_smart_clipped_clipper_get
This was broken for smart objects that are not "clipped smart
objects". This fixes the example evas_smart_object.

NOTE: This EAPI was removed in efl-1.18!
/!\ This was an uncaught API break between 1.17 and 1.18 /!\

@fix
2016-10-14 14:00:02 +09:00
Jean-Philippe Andre 9b9c044865 evas: Improve render debug logs
Compiled out by default
2016-10-14 13:59:41 +09:00
Chris Michael fa5e4c252f evas: Fix directly dereferencing pointer which may be NULL
Coverity reports this as a dereference before null check which implies
that 'cur' May be null here, so let's not use it before we check it.

Fixes CID1363765

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-13 12:50:12 -04:00
Chris Michael 7633696cb6 evas: Fix directly dereferencing pointer which may be NULL
Coverity reports this as a dereference before null check which implies
that 'pd' May be null here, so let's not use it before we check it.

Fixes CID1364114

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-13 12:47:38 -04:00
Chris Michael 61643e6a06 evas: Fix missing varargs cleanup
This patch fixes Coverity CID1364123 which reports that (in some
cases) va_end was not being called for var args. As they were
previously initialized with va_start, then va_end should be getting
called.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-13 12:43:44 -04:00
Felipe Magno de Almeida e0390009bc Fix use of undeclared type in C++ tests compilation
Moved Evas_Object_Intercept_Cb_Type; typedef declaration after enum
_Evas_Object_Intercept_Cb_Type definition
2016-10-13 17:56:11 +09:00
Subhransu Mohanty 45b103eb0a evas/module: add a new module in vg_loader for eet
Reviewers: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4347
2016-10-13 17:09:39 +09:00
Jean-Philippe Andre c5ffad3731 evas: Use proper type in smart objects API (eo) 2016-10-13 10:25:20 +09:00
Subhransu Mohanty 0d9b168146 evas/module: Added a new module vg_loader for svg
Reviewers: cedric, jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4346
2016-10-12 18:39:10 +09:00
Jean-Philippe Andre 9bf0df8f32 evas: Mark group_add/del as internal
Lacking a proper internal tag, I'm using both protected (it is
in fact a protected access function) and beta (to mark as unstable,
not real API).

New smart objects based on EO only should rely on constructor,
finalize and destructor exclusively. In theory, this should be fine.

Unfortunately it may be impossible to inherit from the Efl.Ui.Win
class as it uses a really bad hack and calls super.constructor
inside the finalize method.
2016-10-12 11:47:50 +09:00
Jean-Philippe Andre 8a9f0bd603 evas/elm: Remove function group_resize
This is an override of efl_gfx_size_set. Same as before, the
order of operations matter so it is possible that a corner
case will break. In particular, legacy code was:
 - intercept
 - smart resize (do stuff), super, super, super
 - evas object resize

The new code is more like:
 - intercept
 - super, super, super, evas object resize
 - do stuff

But unfortunately this broke elm_widget (read: all widgets) as
the internal resize was done before the object resize. So,
inside the resize event cb, the resize_obj size would not match
the smart object size. >_<
2016-10-12 11:25:56 +09:00
Jean-Philippe Andre 11b7cf6b72 evas/elm: Remove function group_move
This is an override of efl_gfx_position_set.
As for the other patches, I hope I didn't break anything.

A problem likely to happen is that the super call was inserted
too early or too late in the call flow. For instance:

  _myclass_position_set(obj, x, y) {
    position_set(super(obj), x, y);
    position_get(obj, &prevx, &prevy);
    do_something_with_delta_xy();
  }

The above code flow is obvisouly wrong, but may have crept in this
patch (such a bug sneaked in inside smart object, breaking
everything at first).
2016-10-12 11:25:56 +09:00
Jean-Philippe Andre a0b8408021 evas: Move move_children_relative to legacy only
While this kind of API seems to make sense with smart objects
(relative coordinates), it is currently not used apart from
the smart object class itself.

So, for now, I'm moving this to legacy to clean up Efl.Canvas.Group
and we can later add the equivalent in a clean "group" API.
2016-10-12 11:25:56 +09:00
Jean-Philippe Andre 97c9fa64a4 evas/elm: Remove group_show and group_hide
These should be just overrides of Efl.Gfx.visible.set. Many
widgets were handling smart show() and hide() manually, which
means this patch is quite large.

Hopefully this doesn't break anything, obviously. But here are
some widgets known to be problematic, as the old code flow was
really strange (sometimes not calling the efl_super function):
 - window
 - notify
2016-10-12 11:25:56 +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 c60cc50f5a evas: Remove inexisting private function declarations 2016-10-12 11:25:56 +09:00
Jean-Philippe Andre 52969ccd9b evas: Remove method group_color_set
Widgets should simply override efl_gfx_color_set and call
super all the way up to evas object.

Legacy compatibility with call interceptors and early call
abortion (eg. delete_me or obj->layer == NULL) are implemented
with an internal call. See the previous commit introducing the
API.
2016-10-12 11:25:55 +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 dfc3f9deab evas: Simplify code with intercept macros 2016-10-12 11:25:55 +09:00
Jean-Philippe Andre af38880451 evas: Move intercept function types to legacy header 2016-10-12 11:25:55 +09:00
Jean-Philippe Andre 9e235faf90 evas_data: Fix safety checks in evas_object_data
This relies on efl_isa rather than the broken magic check
(by broken I mean it only checks for NULL).
2016-10-12 11:25:55 +09:00
Jean-Philippe Andre f06c8b08f3 evas: Move group color_set after checking for change
I can't see why the group (smart object) color_set function
was called even if the color hadn't change. Let's test and
see if this breaks anything :)
2016-10-12 11:25:55 +09:00
Jean-Philippe Andre fe14ab64f3 evas: Small simplification of object color_set 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
jiin.moon 846c14a392 evas: Fix no update issue if visiblity of smart object has change
Summary: If child has change about visibility, can't check it correctly.

Reviewers: jypark, cedric, jpeg, Hermet

Reviewed By: Hermet

Differential Revision: https://phab.enlightenment.org/D4345
2016-10-11 21:09:01 +09:00
jiin.moon c1a080f5e4 evas: Fix not update issue with TBM surface
Summary:
If the pixels of image object has updates
via native_suface_set api with TBM surface,
does not update on screen(no rendering)

Reviewers: jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D4340
2016-10-11 08:58:52 +08:30
Jean-Philippe Andre 0f7dfdedfd evas: Fix async filters following changes in EO
EO is now extremely restrictive wrt. threads so that efl_data_scope_get()
can't work outside the main loop. This patch fixes the usage to create
sw buffers as shared objects (accessible from both the main loop and evas
async thread) and use plain old pointers where possible.

The buffers now have no parent because efl_add(CLASS, obj_from_mainloop)
does not work with shared objects. This is bad, as the buffers conceptually
belong to the main loop, and only need to be accessible from the draw thread
for a few calls. The main loop determines their lifecycle.

Fixes T4628
2016-10-06 12:24:59 +09:00
Jean-Philippe Andre a9eb2303fb evas: Provide loop from Evas.Canvas
And indirectly also Efl.Canvas.Object.

I believe those two classes should even inherit from Efl.Loop.User.
Right now this patch relies on the new dependence of Evas over Ecore,
and is maybe a bit ugly as is.

Ping @cedric

See T4686
2016-10-06 09:43:19 +09:00
Daniel Hirt ed750f091a Ui text: port link anchors from entry
This is without the viewport optimization in the meantime.
2016-10-05 17:12:22 +03:00