Commit Graph

62216 Commits

Author SHA1 Message Date
junsu choi 7100139d58 edje_cc: Fix always true condition.
Summary:
   The condition at 742 line is always true. So I fix it.
   If action is not ACTION_STOP or ACTION_TYPE_SCRIPT, go to continue.

Test Plan: N/A

Reviewers: bu5hm4n, Hermet, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, kimcinoo, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9667
2019-09-04 13:32:17 -04:00
Yeongjong Lee fb2ce1ec75 efl_ui_widget: correct the comparison parameter in scroll_freeze_push
I guess it is copy/paste error.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9669
2019-09-04 13:29:58 -04:00
Yeongjong Lee 86c920608a efl_ui_widget: fix dereference null return value issues
Dereference null return value issues is reported by Coverity.

If `sd` is NULL, it will return zero values.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9668
2019-09-04 13:29:50 -04:00
Marcel Hollerbach 419d5e20a4 efl_ui_widget: optimize size / position setting
calling geometry set here is again calling the API in canvas object that
splits this call to size_set and position_set which means we spent quite
a bit of time in eo, just to call the same APIs we could call directly.
With this commit here, the calls are directly going to the right
objects, with the right API.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9619
2019-09-04 13:27:52 -04:00
Marcel Hollerbach cdd3b4f652 efl_ui_focus_manager_calc: use a mempool instead of calloc / free
if we are heaving a streak of showing / hiding a lot of widgets we free
and calloc the same nodes all the time. This now lowers the amount of
callocs / frees that we are doing

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9618
2019-09-04 13:27:45 -04:00
Marcel Hollerbach 57152fb780 efl_ui_focus_manager_calc: safe if this is root in a flag
otherwise we would need to get the private data of the focus manager
which is quite a heavy operation. This is slowing down enormously the
visibility setting of widgets.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9617
2019-09-04 13:27:42 -04:00
Marcel Hollerbach f179ae4149 efl_ui_focus_manager_calc: optimize item deletion
if there is high frequency adding and deleting of items, the deletion
here can be quite heavy, this makes freeing a little bit faster.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9616
2019-09-04 13:27:37 -04:00
Mike Blumenkrantz c0d0350dc8 elm/hoversel: avoid calling api functions on null hoversel objects
the hoversel must be created before it can be shown, and its internal
hover object may be destroyed when it is hidden

@fix

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9631
2019-09-04 13:26:36 -04:00
Hermet Park 148db5f9d1 edje: fix compatibility issue.
Obviously previous edje object file set would try reload file
even though the file is already loaded.

This brings different result if the file data has been modified or changed.
2019-09-04 13:25:46 -04:00
Daniel Kolesa ce712590c1 eolian: fix function pointer leak as reported by asan
Ref T8140.
2019-09-04 13:25:10 -04:00
Mike Blumenkrantz a8b61551dc efl: mark a couple internal eo files as @beta
Summary: these are not distributed apis so they should always remain beta

Reviewers: q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9559
2019-09-04 13:20:15 -04:00
Shinwoo Kim 6e62802d60 evas_map: draw what map did not draw before.
Summary:
When a map property is changed, map draws it.
Before drawing, evas_object_map_update updates map->spans which is data for
actual drawing. But if changed_map is false, then evas_object_map_update does
not update map->spans.

Usually mapped object has following step.

(1) change map data (evas_map_point_coord_set)
(2) render_pre
(3) evas_object_map_update updates map->spans if changed_map is true.
(4) render
(5) render_post -> evas_object_cur_prev -> "map->prev = map->cur"

But if mapped object hides at step(1), then step(3),(4) does not happen. But
step(4) map->prev keeps changed map data. After this point, If same map data
comes, then map does not draw it. Because the new data is same with map->prev.

The issue occurs with following step.
(A) point_coord_set with point A.
(B) (2)(3)(4)(5) works.
(C) point_coord_set with point B. And hide.
(D) (2)(5) wokrs.
(E) point_coord_set with point A. still hide, so none of (2)(3)(4)(5) work.
(F) point_coord_set with point B. And show.
(G) (2)(3)(4)(5) works. BUT step(3) does not update map->spans because
changed_map is false. So you can see image of point A.

The changed_map is changed to false after updating map->spans at step(3).
So usually changed_map is false before deciding changed_map of next render.
In case of not rendering (but render_pre/post) after map data is changed, the
changed_map keeps true. So this patch was suppose to make changed_map
false if changed_map is already ture before _evas_map_calc_map_geometry
decides changed_map which occurs step(1). true changed_map indicates that
you need to draw even though new map data is same with previous map data.

Test Plan: {F3739770}

Reviewers: Hermet, jsuya

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9476
2019-09-04 13:19:59 -04:00
subhransu mohanty 2c6445ee41 edje/textblock: Don't add text_class style tag to the final style string
Evas_TextBlock_Style has no idea about the text_class tag its a garbage value to it.
So keep the text_class tag in the edje level and update the text style property in the
final style string when necessary.

Because text_class id tends to be unique by removing from the final style string
enable it to be shared (string shared string).

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9544
2019-09-04 13:19:33 -04:00
Carsten Haitzler 2f9b0e4235 edje - fix conversion of edje var from int to float to use tmp var
fix CID 1402624
2019-09-04 13:18:33 -04:00
Carsten Haitzler 7ed715389a edje - fix conversion of edje var from float to int to use tmp var
this should disambiguate the conversion intended.

fix CID 1402675
2019-09-04 13:18:22 -04:00
Carsten Haitzler d72ba78736 efl model - fix use after free
fix CID 1402712
2019-09-04 13:18:17 -04:00
Mike Blumenkrantz 110f388bb4 elm_test: fix crashing in efl.ui.popup when closing windows
avoid double free on pointer in callback

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9540
2019-09-04 13:17:51 -04:00
Cedric BAIL 99d3aa8bda edje: fix warning for returning wrong type.
Reviewers: zmike

Reviewed By: zmike

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9530
2019-09-04 13:17:15 -04:00
subhransu mohanty 1ff8932537 edje: optimize color_class_recursive_find_helper() function
Summary:
If the  color_class is not overridden by the object level the
hash will be empty but still we do the expensive call to _edje_hash_find_helper()
find the color_class in an empty hash. by checking if the hash is empty
and returning early we save lot of unnecessary hash computaion and lookup.

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9532
2019-09-04 13:16:56 -04:00
subhransu mohanty 95a0ac7449 eina/hash: optimize eina_hash_find() when hash is empty.
Summary:
Check if hash is empty before computing the hash key and look inside the
hash to find data.

Note: could have called the eina_hash_population() api but didn't
      because of extra function call.

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9531
2019-09-04 13:16:53 -04:00
Hermet Park 0dd29cc696 ector: ++safety.
null handling just in corner case.
2019-09-04 13:16:24 -04:00
Hermet Park 52085df01d evas vg: ++safety.
Realloc internal composite buffer if its size is invalid.
2019-09-04 13:16:21 -04:00
Carsten Haitzler 55e349b31f eina log - we exceet 24 domains alrready out of the box, so increase
this avoids more reallocs since we already use more than 24 domains...
go up to 64.
2019-09-04 13:16:09 -04:00
Ali Alzyod d601ebea2c evas_text: backward compatibility for setting text size
Summary: This is for backward compatibility for TIZEN Test cases for legacy

Reviewers: woohyun

Reviewed By: woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9519
2019-09-04 13:15:40 -04:00
Carsten Haitzler 127c9514cd emile - use newer lz4 api instead of deprecated one 2019-09-04 13:15:34 -04:00
Carsten Haitzler e8c6db750b lz4 - update to 1.9.1 for static lib in src tree
this updates our static zlib to 1.9.1 releases april 23, 2019.

fixes T7983
2019-09-04 13:15:27 -04:00
Mike Blumenkrantz e2cc025f74 efl_ui/popup_backwall: implement efl.file file and key get methods
these need to be proxied to the internal image object to return
correct values

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9508
2019-09-04 13:13:21 -04:00
Carsten Haitzler c7e644b072 gif loader - dup eina file as we keep our own copy of it in the loader
we didnt dup the eina file handle since  we kee our own handle. we
need ot do that. asan found this.
2019-09-04 13:12:42 -04:00
Carsten Haitzler 5dcb842da8 edje cc - fix coverity warning for uninit local var
fix CID 1382208
2019-09-04 13:12:29 -04:00
Carsten Haitzler dbb0e83051 ethumb - fix error free of static string as stringshare
in one case we try stringshare_del a static string, not stringshared,
so fix by always making it a stringshare

fix CID 1402614
2019-09-04 13:12:25 -04:00
Carsten Haitzler b832f70eb5 epp - fix tchnical leak for coverity
its technically a leak.. but epp will give up a nd error out anyway
here so... didn't matter.

fix CID 1402655
2019-09-04 13:12:23 -04:00
Carsten Haitzler 08b8cfc07d ecore drm legacy - fix dbus leaks of reply handle
fix CID 1402664
2019-09-04 13:12:20 -04:00
Carsten Haitzler cecec1fd67 ethumb - make coverity happy by including null char
doesnt cost us much to memcpy the nul byte too to keep coverity happy.

fix CID 1402690
2019-09-04 13:11:59 -04:00
Carsten Haitzler 0811ae317e ecore evas drm - fix multi-dlopening of lib into symbol space
only load libglapi once... not multiple times by storing static ptr to
lib handle.

fix CID 1402692
2019-09-04 13:11:57 -04:00
Carsten Haitzler e38cdb7d40 ecore drm - legacy - fix coverity leak complaint
is real - in error case. fix it to make coverity happy.
fix CID 1402696
2019-09-04 13:11:45 -04:00
Carsten Haitzler b3d90b8944 ephysics - fix stringshare double del
fix CID 1402707
2019-09-04 13:11:39 -04:00
Hermet Park 0f37b8f8a9 efl_canvas_rectangle: rendering optmization.
There was a weird profiling result that rectangles drawing is much much slower than images.
Checked reason, the computation rect clip area is the overload point.

I don't think it's necesary but we can simplely improve the performance here
by replacing native function.

I tested this by drawing 400 number of rectangles,
and this patch improved up abt 10 fps(sw), 20fps(gl).

@TEST CODE

   MAX_SIZE = 400;

   for(int i=0; i< MAX_SIZE; i++)
   {
      Evas_Object *rect = evas_object_rectangle_add(layout);

      int x = rand() % WINDOW_WIDTH;
      int y = rand() % WINDOW_HEIGHT;

      evas_object_resize(rect, ELM_SCALE_SIZE(200), ELM_SCALE_SIZE(200));
      evas_object_move(rect, x, y);
      evas_object_color_set(rect, (rand() % 256), (rand() % 256), (rand() % 256), 255);
      evas_object_show(rect);

      Elm_Transit *transit = elm_transit_add();
      elm_transit_object_add(transit, rect);

      int dX = rand() % WINDOW_WIDTH;
      int dY = rand() % WINDOW_HEIGHT;

      elm_transit_effect_translation_add(transit, 0, 0, dX - x, dY - y);
      elm_transit_repeat_times_set(transit, -1);
      elm_transit_duration_set(transit, 1.0);

      elm_transit_go(transit);
   }
2019-09-04 13:10:58 -04:00
Hermet Park 1f9a033434 evas rectangle: code refactoring.
Just removed white spaces, fixed indentation.

No logical changes.
2019-09-04 13:10:56 -04:00
Mike Blumenkrantz 521b618432 efl_ui/flow.box: fix item calc with mixed weights
if a box contains an entire row of items with weight(0), and the next
row contains items with weights set, the item count must be correctly
incremented so that the box uses the right items in its calculations

@fix

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9480
2019-09-04 13:10:04 -04:00
Vincent Torri 95421dc2da examples: cast to uintptr_t instead of long
on Windows, long is a 32 bits type

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9470
2019-09-04 13:09:59 -04:00
Mike Blumenkrantz e1ba500263 efl_ui/win: use efl_ui_image internally for non-legacy widgets
switch to using a fully non-legacy widget when this is not being created
with elm_win_add

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9466
2019-09-04 13:08:40 -04:00
Mike Blumenkrantz 0a9c96333e elm/colorselector: directly use smart callback api here
this is not a mixed legacy+unified widget, so we don't need to use
efl api here

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9464
2019-09-04 13:08:25 -04:00
Woochanlee 069a45a379 ecore_wl2: Changed log macro ERR->EINA_LOG_ERR.
Summary:
When the ecore_wl2_shutdown() calling without ecore_wl2_init().

It makes crash.

Reviewers: eagleeye, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9452
2019-09-04 13:07:58 -04:00
Marcel Hollerbach 454b366fab efl_pan: improve docs
Summary: documentation now reflects what is happening in the functions

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8863
2019-09-04 13:07:22 -04:00
Lauro Moura 587bf58dec ecore: Fix download test.
Summary:
After ecore_main_loop_quit() changes, calling it from outside the main
loop does not make the next iteration of the main loop quit, causing the
original version of the test to deadlock.

Also update the function documentation about it.

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, felipealmeida, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9448
2019-09-04 13:07:22 -04:00
Mike Blumenkrantz a345880efa elm/config: fix config usage with EFL_RUN_IN_TREE set
when running in tree, elm_config should not attempt to access files
outside the tree, nor should it attempt to overwrite any existing config
files

@fix

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9433
2019-09-04 13:04:43 -04:00
Mike Blumenkrantz 08045d2594 elm/config: monitor MODIFIED events on config files
eio/inotify now receives these events when the config file is modified,
even though the file is copied onto that location. this fixes config
updating at runtime

@fix

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9432
2019-09-04 13:04:40 -04:00
Marcel Hollerbach 0d4cebad19 efl_ui_pan: emit position changed when content is resized
even if the position is not really changed here, the min / max relation
has changed. If we do not emit this event here, every user (that
calculates a relative position) would have to monitor the pan position
and the size of the content. This simplifies the given usecase, and
fixes the scroller position when new items are added to the collection.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9411
2019-09-04 13:04:36 -04:00
Mike Blumenkrantz 407d57cbc1 efl_ui/popup: unset callbacks on win object when parent is removed
these callbacks must be removed if there is no parent, otherwise they
may trigger once the widget is deleted and trigger invalid object access

@fix

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9429
2019-09-04 13:04:25 -04:00
Mike Blumenkrantz 3d58d4e94c efl_ui/popup: implement efl.file.unload for popup backwall part
this fixes unsetting images for popup backwall

@fix

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9415
2019-09-04 13:04:08 -04:00