Commit Graph

62661 Commits

Author SHA1 Message Date
Mike Blumenkrantz 4279f75f0b elm/scrollable: avoid unnecessary edje recalcs
in this case we just want to trigger pending edje calcs and not force new
ones. this avoids doing a full edje recalc constantly when scrolling

@fix

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9335
2019-07-17 10:54:48 -07:00
Mike Blumenkrantz e6393393cc efl/scroll manager: stop clearing animators on every wheel event
if scrolling is supposed to continue then just reuse the existing animator
callback and avoid emitting a scroll,start/stop event pair for every new
input event

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9340
2019-07-17 10:54:46 -07:00
Mike Blumenkrantz d5da991bc5 efl_ui/box: optimize position_set operations with boxes
if a box is moved and no other changes are made to the box or its children,
e.g., if the box is scrolled, then there is no need to loop over the box's
items repeatedly in order to accurately calculate all the item geometries
and positions.

instead, simply apply an offset from the last box calc position to each child
item and handle the position changes more transparently

this yields roughly a 12% perf improvement to the 'efl.ui.scroller simple' test
and brings rendering up to nearly 60fps

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9342
2019-07-17 10:54:44 -07:00
Mike Blumenkrantz ebcf5e0cd9 efl_ui/box: avoid exploding stack with lots of subobjects
using alloca like this without any limits is dangerous, so switch to
malloc here in such cases

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9341
2019-07-17 10:54:42 -07:00
Mike Blumenkrantz 4016de252c elm_test: add comparable "simple" scroller tests
this should be roughly identical and can be more directly compared in
terms of performance (which is not good in either case)

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9334
2019-07-17 10:17:50 -07:00
Marcel Hollerbach f97df4212a efl_ui_win: optimize shutdown
in case we are having a scroller with a lot of elements on it, we are
spending a lot of time in stuff like recalculating clips, even if they
will never be used again.

With this freeze here, we are saving 9s shutdown time in item_container.
Which brings the overall closing time from 10s down to 1s, which is a
win IMO.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9325
2019-07-17 10:17:48 -07:00
Marcel Hollerbach a6fa2f12d6 efl_ui_widget: relax the amount of event subscriptions
there is a very basic problem in eo events. We are having one central
array of event subscription, if for example a widget is now listening to
changes in its parent, then we are 100% asking for trouble.

As an example:
- A scroller with 100 buttons in it.
- Every button will have a subscription to the FOCUS_MANAGER_CHANGED
event

If you now scroll, the position is updated in the scroller, therefore
the position in scroller is updated. This has the result that the whole
list of 100 event subscriptions is walked, which is obviously bad,
however, this solution here is way easier than fixing eo (i am not even
sure there is a nice solution to it).

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9324
2019-07-17 10:17:46 -07:00
Marcel Hollerbach e76349cd41 efl_ui_widget: performance optimize deletion
when a logic parent does not have any widgets left, the parent needs to
be reevaluated. However, this only has to happen when there is a change
in state (eg. from 0 -> N or from N -> 0). Every other call can be
safed. This commit introduces this checking, and safes up performance.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9323
2019-07-17 10:17:44 -07:00
Daniel Kolesa f62d0dc36b eolian: allow binbufs to be owned 2019-07-17 18:15:01 +02:00
Daniel Kolesa fbdbf6b132 eolian: add builtin binbuf and event types
Binbuf is like strbuf and allows not using the Eina opaque wrapper
now, which will remove some ptr(). And event translates to
Efl.Event because otherwise there would be no way to get rid
of void_ptr.
2019-07-17 15:52:39 +02:00
junsu choi baf1fcdb91 vg_common_svg: Gradient stop color use premultiplied color.
Summary:
The parsed color is straight color.
evas use premultiplied color.

Test Plan:
Sample SVG
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
  <defs>
    <linearGradient id="linearGradient1" x1="0" y1="0" x2="0.2" y2="0.2" spreadMethod="reflect">
      <stop style="stop-color:#ff0000;stop-opacity:1;" offset="0"/>
      <stop style="stop-color:#0000ff;stop-opacity:1;" offset="1"/>
    </linearGradient>
    <radialGradient id="radialGradient222" r="0.2" cx="0.3" cy="0.3" spreadMethod="reflect">
      <stop style="stop-color:#ffFF00;stop-opacity:0.1;" offset="0"/>
      <stop style="stop-color:#00FFff;stop-opacity:1;"   offset="1"/>
    </radialGradient>
    <radialGradient id="radialGradient333" r="0.2" cx="0.3" cy="0.3" spreadMethod="reflect">
      <stop style="stop-color:#00FF00;stop-opacity:0.1;" offset="0"/>
      <stop style="stop-color:#FF00ff;stop-opacity:1;"   offset="1"/>
    </radialGradient>
   </defs>
  <rect x="0" y="0" width="100" height="100" fill="url(#linearGradient1)"/>
  <rect x="50" y="50" width="50" height="50" fill="url(#radialGradient222)"/>
  <rect x="0" y="0" width="50" height="50" fill="url(#radialGradient333)"/>
</svg>

Reviewers: Hermet, kimcinoo, smohanty

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9338
2019-07-17 17:15:23 +09:00
Mike Blumenkrantz b25c9f6137 tests/elm: add test for elm_bubble "clicked" smart callback
Summary:
also verify general layout loading

Depends on D9330

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9331
2019-07-16 13:38:33 -04:00
Mike Blumenkrantz ab0c71803b tests/elm: break out event callback function
Summary:
now we have a function we can reuse which verifies that it is called exactly
one time

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9330
2019-07-16 13:38:28 -04:00
Marcel Hollerbach 4b1a1e85b2 efl_ui_slider: fix focus interaction
Summary:
when we move the slider up or down, we might be at the minimum or
maximu, if this is the case. Then we must not eat the key event,
otherwise focus is stuck on this widget.
Depends on D9328

Reviewers: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9329
2019-07-16 16:37:29 +02:00
Marcel Hollerbach 059e82d4c1 efl_ui_text: fix focus breaking
Summary:
text should not be focusable by default. Only focusable if it is
editable. This fixes mysterical focus disappearing in tests using
efl.ui.text.
Depends on D9327

Reviewers: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9328
2019-07-16 16:37:29 +02:00
Marcel Hollerbach 1bae8ec521 efl_ui_slider: change the semantical meaning of step property
Summary:
before the step property was used as a relative value. The value that
was added in the end was (max-min)*step. Which is quite confusing given
the fact that the other APIs in in efl_ui_range_display are also taking
values absolut. Other implementations also do so.

fix T4834

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T4834

Differential Revision: https://phab.enlightenment.org/D9327
2019-07-16 16:37:29 +02:00
Mike Blumenkrantz 1d90b113e0 tests/actionslider: add more actionslider unit tests
verify actionslider callbacks and various basic functionalities

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9322
2019-07-16 14:48:50 +02:00
Mike Blumenkrantz 62059763c6 tests/elm: improve click_part() further to guess part locations
non-swallow parts exist "somewhere" on a given layout, and it may be
the case that they are not actually positioned and just take up the whole
layout space.

for these parts, if they have a direction in their name, we can try to vaguely
guess where the part might be in order to (ideally) click it

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9321
2019-07-16 14:48:49 +02:00
Mike Blumenkrantz 564ba9b96c tests/elm: improve click_part() to handle non-swallow parts
swallow parts have content, other parts do not

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9320
2019-07-16 14:48:48 +02:00
Mike Blumenkrantz afb2daa996 elm_actionslider: fix internal state when programmatically changing value
this value is supposed to always match the current widget state and signal
emission breaks if the states are not consistent

@fix

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9319
2019-07-16 14:48:47 +02:00
Mike Blumenkrantz 06ed9b39af elm_actionslider: fix signal emission for left selection
this is supposed to be a comparison, not a filter

ref a65cb62853

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9318
2019-07-16 14:48:46 +02:00
Mike Blumenkrantz 66ba42e74d efl_ui_widget_part: implement some expected methods
checking part type and part geometry is pretty common, so these base
implementations can fill in gaps in existing functionality

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9317
2019-07-16 14:48:45 +02:00
Xavi Artigas 1b2a5570c3 docs: Enhance Efl.Ui.Clickable_Util documentation 2019-07-16 12:20:31 +02:00
Vincent Torri 34f88a5786 Evil: remove getpwuid() from Evil.
Summary: getpwuid() is used only in eina_test_vpath() and is called when getpwent() is available, which is not the case on Windows

Test Plan: compilation

Reviewers: raster, cedric, zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9326
2019-07-16 10:43:11 +01:00
Vitor Sousa ab26579cab Revert "Revert "efl: prevent usage of some Eina.* stub types in stable APIs""
EFL# support for slice and rw_slice was added in a previous commit.
So now it is safe to undo the reversion of this commit.

This reverts commit 25ef604467.
2019-07-15 15:45:13 -03:00
Christopher Michael af0a37da03 tests/ecore_wl2: Check for valid xdg_runtime_dir
Seems these tests need XDG_RUNTIME_DIR to be set, and it does not get
set in Travis builds, so add a small check here so that Travis builds
don't fail ... thanks Marcel ;)

ref T8016
2019-07-15 14:21:36 -04:00
Christopher Michael f30ef634ad tests/ecore_wl2: Add start of Ecore_Wl2 Window tests
ref T8016
2019-07-15 12:56:30 -04:00
Christopher Michael 3be7c844fd tests/ecore_wl2: Add test for ecore_wl2_display_inputs_get
ref T8016
2019-07-15 12:32:50 -04:00
Christopher Michael 7a85ad660b tests/ecore_wl2: Add test for ecore_wl2_display_registry_get function
ref T8016
2019-07-15 11:01:49 -04:00
Christopher Michael a081920c7d tests/ecore_wl2: Add test for ecore_wl2_display_screen_size_get function
ref T8016
2019-07-15 11:01:43 -04:00
Christopher Michael 539775b1cd tests/ecore_wl2: Add test for ecore_wl2_display_globals_get function
ref T8016
2019-07-15 11:01:39 -04:00
Christopher Michael 9ef1ab7876 tests/ecore_wl2: Add printf for compositor detection
ref T8016
2019-07-15 11:01:34 -04:00
Christopher Michael 7618a6caf0 tests/ecore_wl2: Add ecore_wl2_display_dmabuf_get test
ref T8016
2019-07-15 11:01:30 -04:00
Christopher Michael 3a3a2f667a tests/ecore_wl2: Add ecore_wl2_display_shm_get test
ref T8016
2019-07-15 11:01:25 -04:00
Christopher Michael 723412404f tests/ecore_wl2: Add test cases for wl2 client-side functions
This patch separates the ecore_wl2 tests to support both server-side
and client-side functionality. In order to test client-side functions,
these tests MUST be run under an existing Wayland Compositor
(Enlightenment, Weston, etc).

ref T8016
2019-07-15 11:01:20 -04:00
Christopher Michael b9f89fabb6 tests: Add tests for ecore_wl2_display_get and
ecore_wl2_display_name_get

ref T8016
2019-07-15 10:08:32 -04:00
Christopher Michael 73acf72cc4 tests: Add file for Ecore_Wl2 display tests
Add file which can be used to add tests for ecore_wl2 display functions

ref T8016
2019-07-15 09:54:18 -04:00
Christopher Michael 3b28a0a0f5 meson: Modify Ecore_Wl2 sub project to add tests
ref T8016
2019-07-15 09:54:08 -04:00
Christopher Michael e33609937e tests: Add start of Ecore_Wl2 test suite
Small patch set to add the start of a Ecore_Wl2 test suite

ref T8016
2019-07-15 09:53:59 -04:00
Mike Blumenkrantz 43993fd7fc examples: fix function signature for edje color class example
Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9303
2019-07-15 09:51:01 -04:00
junsu choi 2e4c928d81 evas_vg_load_svg: Support multiple gradient without <defs> part
Summary:
Multiple gradients can be declared.
There is a problem of keeping only one gradient information
when it is declared outside defs or when defs is not declared.
It supports the use of multiple gradients even if no defs are declared.

Test Plan:
(with D9312 patch)
cd src/example/edje
edje_cc -beta svg.edc && gcc -o svg-test svg-test.c `pkg-config --libs --cflags evas ecore ecore-evas edje`
./svg-test

Reviewers: Hermet, kimcinoo, smohanty

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9315
2019-07-15 21:23:38 +09:00
junsu choi 84fcc5d073 evas_vg_load_svg: Prevent duplicate operations on radial gradient variables
Summary:
This solves the problem of radial gradient being displayed
abnormally when the radial gradient variables are 0 to 1.

Test Plan:
Sample SVG
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
  <defs
     id="defs11">
    <linearGradient id="linearGradient1" x1="0" y1="0" x2="0.2" y2="0.2" spreadMethod="reflect">
      <stop style="stop-color:#ff0000;stop-opacity:1;" offset="0"/>
      <stop style="stop-color:#0000ff;stop-opacity:1;" offset="1"/>
    </linearGradient>
    <radialGradient id="radialGradient222" r="0.2" cx="0.3" cy="0.3" spreadMethod="reflect">
      <stop style="stop-color:#ffFF00;stop-opacity:1;" offset="0"/>
      <stop style="stop-color:#00FFff;stop-opacity:1;" offset="1"/>
    </radialGradient>
  </defs>
  <rect x="0" y="0" width="100" height="100" fill="url(#linearGradient1)"/>
  <rect x="50" y="50" width="50" height="50" fill="url(#radialGradient222)"/>
</svg>

Reviewers: Hermet, kimcinoo, smohanty

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9312
2019-07-15 21:22:49 +09:00
Carsten Haitzler 01d6683e32 build - update/improve meson option strings to be short and descriptive
this should make it easier to know what an option does and not be
redundant in the description.
2019-07-15 11:46:26 +01:00
Carsten Haitzler 1ed15f5b42 config - make harfbuzz default on these days
probably a good move given how common it is now.
2019-07-15 11:15:33 +01:00
Carsten Haitzler cf005ac54a build - let's make xinput 2.2 default these days...
about time since it's common enough by now.
2019-07-15 11:09:31 +01:00
Carsten Haitzler 480bb10243 add INSTALL file back as permanent instructions on meson building 2019-07-15 10:17:07 +01:00
Boris Faure 213301df35 efl.h: avoid redefinition of typedef 'Efl_Gfx_Path_Command'
Reviewers: zmike, bu5hm4n, cedric, raster

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9311
2019-07-15 14:13:29 +09:00
Jihoon Kim f5ee2e3bb8 ecore_imf: remove code to use deprecated API in wayland immodule
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
2019-07-15 11:37:53 +09:00
Vitor Sousa c3c81263fd csharp: fix some unit tests that rely on garbage collection
Summary:
Fix unit tests `TestEoInherit.inherited_collected` and
`TestFunctionPointers.set_callback_inherited_called_from_c`.

Iterate through garbage collection and EFL main loop more times to ensure that
allocated objects are really collected.

Also expand the test utility method `CollectAndIterate` to receive the number of
times to call the whole cleaning iteration process (not only the garbage
collection).

Test Plan: `meson test`

Reviewers: lauromoura

Reviewed By: lauromoura

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9271
2019-07-12 17:15:37 -03:00
Cedric BAIL b799ba1a10 evas: add a test for loading Android 9patch file.
Example data come from https://github.com/vindolin/ninepatch/tree/master/ninepatch/data
under MIT license.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Hermet Park <hermetpark@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9105
2019-07-12 09:54:24 -07:00