Commit Graph

2672 Commits

Author SHA1 Message Date
Guilherme Iscaro a18ba08125 Evas_Common: Fix typo.
@fix
2016-09-26 22:06:59 -03:00
Guilherme Iscaro cdc5ecec1e Efl_Input_Device: Implement efl_input_device_parent_set().
This commits moves the parent_set implementation where it should be.
2016-09-26 22:06:59 -03:00
Jean-Philippe Andre ef759b6395 evas: Prevent crashes in case of error
SEGV would happen if the cache was NULL, as the error pointer
was also NULL in some cases (root cause for cache == NULL not
quite known, happens in elm_suite with CK_FORK=no).

Note: simply adding evas_common_init() to evas_init() leads to
a whole new set of issues with CK_FORK=no elm_suite - not good.
2016-09-23 11:28:14 +09:00
Sungtaek Hong 57c4d83b2e evas: remove unnecessary check for clip coords.
Summary: (dst_clip_w <= 0 || dst_clip_h <= 0) is already checked.

Reviewers: jpeg, cedric, Hermet

Reviewed By: Hermet

Subscribers: conr2d

Differential Revision: https://phab.enlightenment.org/D4303
2016-09-21 17:41:47 +09:00
Stephen Houston 61b66338a9 Evas: Don't access members of a null struct. Fixes T4616 2016-09-20 16:05:09 -05:00
Derek Foreman e2875cefc4 eina_cpu, evas: Remove _eina_cpu_fast_core_get, don't set render thread affinity
We've decided it would be best to just let the scheduler do its job.
2016-09-20 11:38:57 -05:00
Daniel Hirt f68a925d81 Evas font: force freetype v35 ttf interpreter
Ref T4623

v40 bytecode interpreter is official as of freetype 2.7.
The results don't look so good at the moment. The text looks and glyph
positioning seem worse than they were with the previous v35 interpreter.

So, in the meantime we'll keep using v35, just so everything looks
normal again.

Although the v40 is relevant since around 2.6.3, I rather not do any
FREETYPE_MINOR checks in this patch, because distributions might ship
previous versions with the other (v38) interpreter enabled.
2016-09-20 11:29:38 +03:00
Derek Foreman 541b72dcb2 render_thread: Attempt to set affinity to a random fast core
We've been pinning the render thread for every EFL process to core 0.
This is a bit silly in the first place, but some big.LITTLE arm systems,
such as exynos 5422, have the LITTLE cores first.

On those systems we put all the render threads on a slow core.

This attempts to fix that by using a random core from the pool of fast
cores.

If we can't determine which cores are fast (ie: we're not on a
linux kernel with cpufreq enabled) then we'll continue doing what we've
always done - pin to core 0.
2016-09-19 09:40:43 -05:00
Stefan Schmidt 6bf537d43d Revert "render_thread: Attempt to set affinity to a random fast core"
This reverts commit a17ac66f0a.

This change broke every efl build locally, as well as on Jenkins, for me.

CLD     lib/ethumb_client/libethumb_client.la
/bin/sh: line 2: 10047 Segmentation fault      (core dumped) EFL_RUN_IN_TREE=1
../src/bin/edje/edje_cc -id . -fd . -id ./tests/emotion/data tests/emotion/data/theme.edc
tests/emotion/data/theme.edj
Makefile:52584: recipe for target 'tests/emotion/data/theme.edj' failed
make[4]: *** [tests/emotion/data/theme.edj] Error 139
make[4]: *** Waiting for unfinished jobs....
/bin/sh: line 2: 10088 Segmentation fault      (core dumped) EFL_RUN_IN_TREE=1
../src/bin/edje/edje_cc -id . -fd . -id ./modules/ethumb/emotion modules/ethumb/emotion/template.edc
modules/ethumb/emotion/template.edj
Makefile:52590: recipe for target 'modules/ethumb/emotion/template.edj' failed
make[4]: *** [modules/ethumb/emotion/template.edj] Error 139
/bin/sh: line 2: 10119 Segmentation fault      (core dumped) EFL_RUN_IN_TREE=1
../src/bin/edje/edje_cc -id . -fd . -id ../src/modules/elementary/prefs/
modules/elementary/prefs/elm_prefs_swallow.edc modules/elementary/prefs/elm_prefs_swallow.edj
Makefile:52614: recipe for target 'modules/elementary/prefs/elm_prefs_swallow.edj' failed
make[4]: *** [modules/elementary/prefs/elm_prefs_swallow.edj] Error 139
2016-09-19 10:45:56 +02:00
Ji-Youn Park fc0c0a6e0b evas_object_image: fix alpha_set bug.
if image object's first alpha value is false, evas_object_image_alpha_set function did not work.
opaque_valid is always 1 even though has_alpha value changed.
2016-09-19 17:02:40 +08:30
Derek Foreman a17ac66f0a render_thread: Attempt to set affinity to a random fast core
We've been pinning the render thread for every EFL process to core 0.
This is a bit silly in the first place, but some big.LITTLE arm systems,
such as exynos 5422, have the LITTLE cores first.

On those systems we put all the render threads on a slow core.

This attempts to fix that by using a random core from the pool of fast
cores.

If we can't determine which cores are fast (ie: we're not on a
linux kernel with cpufreq enabled) then we'll continue doing what we've
always done.
2016-09-16 14:10:49 -05:00
Cedric BAIL f9401c16f0 evas: link output with evas canvas at finalize time. 2016-09-13 16:12:41 -07:00
Cedric BAIL 23495add5b evas: remove useless symbol. 2016-09-13 16:12:41 -07:00
Cedric BAIL a9ff1bf986 evas: efl_canvas_output should be able to provide pixels if requested. 2016-09-13 16:12:41 -07:00
Chris Michael 3ab6629a06 evas: Add missing return values for _efl_canvas_output_lock/unlock
functions

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-09-13 09:36:15 -04:00
Chris Michael 4a6d5e2a05 evas: Mark unused parameters as being EINA_UNUSED
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-09-13 09:32:48 -04:00
Daniel Hirt 6766ae57a7 Remove leftover evas_out usage from legacy
Build failed after b5456893ee due to
a missing header.
2016-09-13 10:38:02 +03:00
Cedric BAIL b5456893ee evas: start working on efl_canvas_output.
This should when done enable the possibility for multi screen in wayland
along with remote display, wireless display and screencasting.
2016-09-12 16:19:10 -07:00
Hermet Park e8fcc41e40 evas map: fix the rendering problem.
I got an issue report about map rendering.
After investigated, I found that was introduced by data overflow.

For fast computation, evas map uses integer data type rather than float,
that gives up some range of data size.

So, if vertex range is a little large but still reasonable,
polygon won'be properly displayed due to the integer overflow.

We can fix this by changing FPc data type to 64 bits (ie, long long)
But I didn't do yet though I can simply fix this costlessly.

By the way, my test case map points are below.

0: -1715, -5499
1: -83, -1011
2: 1957, 5721
3: 325, 1233

and gl result is perfect but sw is totally broken.

@fix
2016-09-12 16:50:00 +09:00
Chris Michael 0f8fb7ef88 evas: Fix jpeg snafu and properly send hold events to children
Commit 405680e836 changed how hold
events were being sent. Previous code was sending the hold events to
child objects, however after mentioned commit, they were being sent to
main objects. This patch fixes that.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-09-08 08:40:16 -04:00
Ji-Youn Park 7ce79be1a1 evas_render: fix clipping the whole area in each rendering.
evas_render should not be going and doing evas_object_clip_set () at all.
The framespace clip should be enforced at RENDER time.
2016-09-08 09:56:30 +08:30
Chris Michael c3d5ccf0f9 Revert "evas: Remove set but not used variable"
This reverts commit 24c5df29b3.

This should not have been pushed. Removed the variable from the wrong
spot :(
2016-09-07 08:35:30 -04:00
Chris Michael 24c5df29b3 evas: Remove set but not used variable
Gcc warns eo_child is set but not used here, so remove it.

NB: This should have been removed in previous evas_events commit. Oopise

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-09-07 08:31:39 -04:00
Chris Michael 6b63d9d6ec evas: Remove set but unused variables
Gcc warns that these variables are 'set but not used'. After reading
the surrounding code, it turns out they are not actually used, so
remove them.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-09-07 08:22:11 -04:00
Jean-Philippe Andre b2d92f2626 evas: Implement support for external buffers
This brings support for the eo api for external buffers (like
the old data_set / data_get). The new API now works with slices
and planes.

The internal code still relies on the old cs.data array for
YUV color conversion. This makes the code a little bit too
complex to my taste.

Tested with expedite for RGBA and YUV 422 601 planar, both
SW and GL engines (x11).
2016-09-06 16:55:00 +09:00
Jean-Philippe Andre 2f737e8f3b evas: Change internal function image_data_direct 2016-09-06 16:54:54 +09:00
Jean-Philippe Andre 69132b5c1d evas: Implement plane support for managed buffers 2016-09-06 16:54:54 +09:00
Jean-Philippe Andre 8ee431572d evas: Switch EO APIs to Eina_Slice for gfx buffers (map)
This adds a plane and eina slice argument to the map/unmap
functions, instead of void_ptr + length.
2016-09-06 16:54:53 +09:00
Jean-Philippe Andre 1773ba5d82 evas: Internally switch to Eina_Slice for buffers
This will be used for the gfx buffer map/unmap eo apis.
2016-09-06 16:54:53 +09:00
Jean-Philippe Andre d7b8d97fd5 evas events: Add "raw" x,y values for future extensions
For pen tablets, this exposes the values as given by the driver
(quite useless without knowledge of the device itself).

For mice, this exposes x,y as set by the display manager, without
any extra processing in terms of smoothing or prediction. IOW
this returns the same as x,y until a smoothing algorithm is
implemented (todo).
2016-09-06 16:54:53 +09:00
Hermet Park 7f22addf1c evas canvas: add missing brackets. 2016-09-06 16:52:56 +09:00
Hermet Park 51acb259a2 evas canvas: fix a wrong condition check in smart changed.
There were 2 wrong conditions.

1. visible check.
Smart changed can be skipped only if previous/current visibility are false.

2. clipper.
Actually, it needed to check previous/current clippers but previously,
it checked only previous clippers.

@fix
2016-09-06 16:45:23 +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
Jean-Philippe Andre b3993b684e win: Add EO API to query state of multi touch points
This combines evas canvas functions to list and query
touch points into a single iterator:
 - evas_touch_point_list_count
 - evas_touch_point_list_nth_xy_get
 - evas_touch_point_list_nth_id_get
 - evas_touch_point_list_nth_state_get

This also fixes a number of issues related to feeding fake
input events.

Note: I wanted to add delta x,y information as well but it's
in fact not really possible outside the event callback itself,
as the previous x,y position will not be updated unless there's
an event.

@feature
2016-09-01 14:57:11 +09:00
Jean-Philippe Andre e61b7139ff win: Move pointer "xy" and "inside" to input interface
Those two properties aren't related to a "drawing" canvas
but to the current state of input.

Note: both Efl.Input.Pointer (pointer input event data) and
Efl.Input.Interface (common interface for input handling objects)
expose a pointer position API. Not sure what to do about that.
2016-09-01 11:57:43 +09:00
Jean-Philippe Andre b675571bd8 evas events: Fix axis input values
This adds support for distance, pressure, tilt and twist.
Not entirely sure if normalized & raw (x,y) should be exposed
in the eo interface. Also not sure what to do with tilt_x/y
(as used by libinput) or touch/tool width "major/minor" vs.
radius x/y.

Add debug logs in the example, including the distance.
I can't test most of these values due to a lack of compatible
hardware, but the most basic features seem to work :)
2016-09-01 11:57:43 +09:00
Jean-Philippe Andre caf237abdf evas: Fix unlikely crash with image cache
This happened to me when running elm_suite manually, during
elm_shutdown. At this point, cache shouldn't be null, but better
be safe anyway.
2016-09-01 11:57:43 +09:00
Daniel Hirt 2d44738fae Canvas text: fix ellipsis RTL handling
First, fixing ellipsis text positions: ellipsis items should be assigned the
text positions of the omitted text (while maintaining the formatting of the
last visual item). In the case where an entire item was rejected, it
will be assigned that item's text position. If an item was split, it will be
assigned the text position of the split portion.
The BiDi reorder code relies on properly-assigned text positions.

Second, fixing ellipsis handling: the width calc was only considering the
ellipsis item's width. However, if the ellipsis is placed as e.g. the first
visual item (such as in RTL cases), its advance value should've be considered,
instead.

Thanks Youngbok Shin for the test case and information.

@fix
2016-08-31 16:23:32 +03:00
Jean-Philippe Andre f88a4b8308 evas events: Fix repeated calls to mouse callbacks
After my many input events changes, a same object callback
could be called multiple times in a row because both mouse
and multi events were sent. As such, the multi event had no
direct effect (no callback called) but it reset the object's
last event type. This allowed the mouse event callbacks to be
called again.

Note that I haven't tested multi touch yet :(

Very good catch by @bu5hm4n!

Fixes T4462
Fixes T4467
2016-08-31 11:41:58 +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 2edf50cb10 evas events: Properly signal to clients which values are set
Since pointer events are all the same thing, users may not know
what values are valid for what kind of event. Eventually we
want to expose more information, but we also need a way to inform
the caller about the validity of the values we get.
2016-08-30 15:13:40 +09:00
Jean-Philippe Andre 68be4f49ed evas events: Fix mistake in multi_move
I guess (can't test) that multi touch was broken, as the
position of the event was set to the position of the pointer
on the canvas. Which means all fingers would be in the same
spot, no matter what the real input. Copy & paste error.
2016-08-30 15:13:40 +09:00
Jean Guyomarc'h 9a82b17eff evas: don't redefine PAGE_SIZE if already defined
On OSX, we include mach.h (via the inlined locks API), which
already defines PAGE_SIZE.
2016-08-29 20:03:52 +02:00
Vitor Sousa 8356b16a49 Efl Object: remove legacy callback calls from event_callback_call
Efl.Object.event_callback_call no longer calls legacy smart callbacks;
calling only event callbacks registered with the given event description
pointer.

Create the method Efl.Object.event_callback_legacy_call to inherit the old
behavior from Efl.Object.event_callback_call, calling both Efl.Object events
and legacy smart callbacks.

Update all other files accordingly in order to still supply legacy
callbacks while they are necessary.
2016-08-26 15:45:07 -03:00
Jean-Philippe Andre 9123e5add2 evas events: Add efl_isa safety checks in legacy EAPI
This removes useless magic checks (only check whether the
arg is not null) that were not even present in every function.
The cost should be similar or lower than an eo function call.
2016-08-26 11:28:34 +09:00
Jean-Philippe Andre d504284dd2 efl: Rename Efl.Event.XX to Efl.Input.XX
This removes:
 Efl.Event interface

And renames:
 Efl.Event.Input -> Efl.Input.Event
 Efl.Event -> Efl.Input.Event (merged)
 Efl.Event.Pointer -> Efl.Input.Pointer
 Efl.Event.Key -> Efl.Input.Key
 Efl.Event.Hold -> Efl.Input.Hold

This also moves some interfaces from efl/ to evas/ where they
belong better.

This allows renaming Eo_Event to Efl_Event.
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre 60526528a6 evas: Add normalized and window coordinates to axis events
This is for Wacom graphics tablets (with a pen).

The raw data sent by ecore to evas (and then to apps) is pretty
useless as it's not normalized, and apps have no way of knowing the
dimensions of the tablet, without themselves opening the device
(we don't know nor expose the path to the device).

This is for Xi2 only for now, as Wayland support hasn't been done
yet.

The intent is to deprecate LABEL_X and LABEL_Y. I'm not sure yet
if the normalized value is useful or not (it would seem we may not
be able to provide this info in Wayland).

The new WINDOW_X, WINDOW_Y labels will be used in the new event
type (Efl.Event.Pointer). Normalized values are not exposed yet,
let's decide if we want them or not first (based on what can be
done in Wayland space).

@feature
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre 443aa91d53 evas: Simplify internal evas_object_event_callback_call
This removes the distinction between legacy and new eo style
event info, since all those types have now been ported to eo.
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre 925878e931 evas events: Switch axis events to the new eo type
This converts Evas_Axis or Ecore_Axis info arrays into basic
pointer data. Also marks those fields as set. All events need
to properly implement the value_has property (mark all bits
whenever a value is known).
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre 8938d8d557 evas events: Rename properties and introduce generic value
This paves the way to a merge of pointer and axis events into
the class Efl.Event.Pointer.
2016-08-26 10:18:01 +09:00