Commit Graph

19408 Commits

Author SHA1 Message Date
Mike Blumenkrantz c375bbcfa7 efl/hint: add doc note about max size hint
ref T8122

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9551
2019-08-14 12:08:09 -07:00
Mike Blumenkrantz 144d086fd7 efl_ui/popup: remove 'expandable' property from popup subclasses
this is more or less just the max size hint, so just set the max size
hint

ref T7902

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9550
2019-08-14 12:08:06 -07:00
Mike Blumenkrantz 0c72d430c3 efl_ui/popup: remove popup_size property
this was more or less just a wrapper around efl_gfx_entity_size_set
and resulted in unpredictable behavior depending on when it was called

instead, simply set the min size hint on the popup object

ref T7902

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9549
2019-08-14 12:08:04 -07:00
Mike Blumenkrantz d99186c039 efl_ui/win: implement unimplemented methods
Summary:
pass through methods from inherited classes to the correct internal
object
Depends on D9562

Reviewers: q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9572
2019-08-14 19:26:14 +02:00
Mike Blumenkrantz 07e810c5cc efl_ui/layout: implement unimplemented methods
Summary:
add redirects to internal layout objects for these methods
Depends on D9561

Reviewers: q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9562
2019-08-14 19:25:53 +02:00
Mike Blumenkrantz c48903f7df efl_ui: mark localization methods with @empty for containers
Summary:
these classes cannot be localized
Depends on D9560

Reviewers: q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9561
2019-08-14 19:25:27 +02:00
Mike Blumenkrantz 304f4ce9bb efl: remove Efl.Ui.I18n from canvas object inheritance
Summary:
canvas objects do not need localization because they are not directly user-facing

this should only be inherited by objects which need to be localized
Depends on D9559

Reviewers: q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9560
2019-08-14 19:25:09 +02:00
Mike Blumenkrantz 0ca5cd82a9 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-08-14 19:24:19 +02:00
Yeongjong Lee 51a644d966 efl_ui: remove duplicated hint_min_set code
Summary:
evas_object_size_hint_min_set call efl_gfx_hint_size_restricted_min_set
internally.

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9567
2019-08-14 09:56:42 -04:00
Yeongjong Lee c857955a4e efl_ui_layout: remove efl_gfx_hint_size_min_set in _sizing_eval
Summary:
`evas_object_size_hint_min_set` is replaced with `efl_gfx_hint_size_min_set` in
4d79efce6. it is able to have backward compatibility issue because
`evas_object_size_hint_min_set` call `efl_gfx_hint_size_restricted_min_set`
internally.
```
evas_object_main.c:2501
EAPI void
evas_object_size_hint_min_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
{
   efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(w, h));
}
```

This patch remove unnecessary min_set call.

Test Plan: elementary_test

Reviewers: zmike, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9566
2019-08-14 17:48:32 +09:00
Shinwoo Kim 85cf0ce883 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-08-14 12:39:58 +09:00
Jaehyun Cho b8d1747382 efl_ui_layout: fix typo in _sizing_eval 2019-08-14 10:29:49 +09:00
subhransu mohanty 7ab04abf27 edje/style: Remove redundant style tags from style text.
Summary:
Both font and font_size are already added into the style text
in _edje_format_reparse() function and there we update the tag->font_size
as well as tag->font member. so I think it is unnecessary to
add again which has memory as well as parsing performance impact.

Note :
   someone please update this cryptic comment
   /* Add font name last to save evas from multiple loads */
   how this is going to help saving multiple load.

Reviewers: ali.alzyod, Hermet, raster, cedric

Reviewed By: Hermet

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9543
2019-08-13 11:18:01 +09:00
Cedric BAIL a5a7c67bdf elementary: add support for efl_ui_property_bind to all efl_part inheriting from widget using reflection.
Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D9528
2019-08-12 10:13:35 -07:00
Cedric BAIL 74aff95fca elementary: add support for widget part property bind.
Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D9527
2019-08-12 10:13:33 -07:00
subhransu mohanty 9952b9bf18 textblock/optimization: refactor evas_textblock_style for memory and perfromance.
the main user of textblock_style_set() api is the edje whcih keeps its owen edje_textblock_style
tags( string_shared string) by changing the textblock to keep the string_shared string will improve
the chance of sharing the same string hence reducing memory.

By removing the Eina_StrBuf usage inside the loop in textblock_style_set() api we can avoid lot
of temporary memory allocation and deallocation hence will improve performance.

Note: I see lot of places we use Eina_Strbuf inside a loop (eina_strbuf_new() does 2 allocation)
We need to be extra carefull while reviewing when the code uses those construct to see if its really necessary.

Data: it reduces memory allocation by 7000 in elementary_test launch time.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9545
2019-08-12 10:13:30 -07:00
subhransu mohanty 384765b088 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-08-12 10:13:28 -07:00
Carsten Haitzler cb513df377 eldbus - fix null node last on introspection parse
this fixes CID 1402721
2019-08-11 12:47:38 +01:00
Carsten Haitzler 9e94115ab3 evas text - handle null font case for font set
coverity was unhappy wiht inconsistent checks, so we'll be consistent
and thus handle a null font.

fixes CID 1403882
2019-08-11 12:47:38 +01:00
Carsten Haitzler b0ad81d927 elm ctxpopup - be consistent with scope data checks
makes coverity happy.

CID 1403898
2019-08-11 12:47:38 +01:00
Carsten Haitzler 807c8e7357 eina file - don't double unlock a lock
thanks to coverity - found this double unlock path in case of error.

fix CID 1403899
2019-08-11 12:47:38 +01:00
Carsten Haitzler fd48be23c2 eina file - make coverity happy and lock+unlock on init
coverity doesnt like inconsistent behavior of code, so make it
consistent even  if pointless as this is during init when we wont have
threads .... yet.

CID 1403903
2019-08-11 12:47:38 +01:00
Carsten Haitzler f3c01a9a6c efl thread - use pipe array names consistently to avoid err handling bug
in the case pipes fail to create we'll close the wrong ones... this
fixes that. it also happens because i didn't use names consistently.
now it does so it's easier to keep right.

thanks coverity.

fix CID 1396994
2019-08-11 12:47:38 +01:00
Carsten Haitzler 60f549c5fb efl thread - fic pipe close to not close invalid pipe fds
if we only have stdout and no stdin we'd accidentally close junk int's
on the stack. fix this fix CID 1396963
2019-08-11 12:47:38 +01:00
Carsten Haitzler c2a33f2225 efl filter model - fix return value handling to avoid uninit mem access
coverity reported - it's right. this fixes CID 1401461 and CID 1401463
2019-08-11 12:47:38 +01:00
Carsten Haitzler d9bdf12019 edje - fix conversion of edje var from int to float to use tmp var
fix CID 1402624
2019-08-11 12:47:38 +01:00
Carsten Haitzler 8113eb74a0 eldbus - fix leak of message in error path case
fix CID 1402657
2019-08-11 12:47:38 +01:00
Carsten Haitzler 4b8a422a6d edje - fix conversion of edje var from float to int to use tmp var
this should disambiguate the conversion intended.

fix CID 1402675
2019-08-11 12:47:38 +01:00
Carsten Haitzler 05ee22cd68 efl model - fix use after free
fix CID 1402712
2019-08-11 12:47:37 +01:00
Carsten Haitzler 61be4f02bf eet dict+ data read - move rw lock to ourside decode for speed read
on read/decode we can avoid lots of little locks and unlocked by
having the rwlock go to the outside and a single lock+unlock (read) on
the dictionary. it blocks for longer by has less atomics/fence points
as a result and thus decodes faster where changes that we are writing
while decoding is insanely low so no point worrying here.
2019-08-11 12:47:31 +01:00
Carsten Haitzler 8531380de0 efreet - be more patient for efreet to start - up to 2 sec now
seems people have issues with efreetd starting in 0.5 sec on some
systems... even rpi's manage that, but lets be more patient and wait
up to 2 sec
2019-08-09 19:09:25 +01:00
Mike Blumenkrantz 1334514cfe efl_ui/popup: apply user min size hints during group_calc
if these hints are set, they should be used

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9539
2019-08-09 10:25:28 -07:00
Mike Blumenkrantz 3aee9a96c0 efl_ui/popup: optimize popup sizing calcs slightly
ensure that scroll-based popups don't accidentally trigger a full
recalc and (wrong) size change during group_calc by hitting the base
popup size_set() implementation and setting the needs_calc flag or
by using the base popup calc code when it should not be used

this resolves a corner case sizing issue in the text_alert 2 popup
case in elm_test which seems to have been present for a long time

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9538
2019-08-09 10:25:26 -07:00
Mike Blumenkrantz 219cb6fe9e elm/config: clear env var hash on shutdown
env vars should not be retained when this subsystem is not "active"

fixes unit test running

ref 9149767184

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9537
2019-08-09 10:25:24 -07:00
Daniel Kolesa 510d437246 eolian: add an envvar to warn about unimplemented beta funcs
This changes the behavior of the existing env var to only check
unimplemented functions in stable APIs by default. Beta checks
can be enabled with an additional environment var, so use
EOLIAN_CLASS_UNIMPLEMENTED_WARN for stable and
EOLIAN_CLASS_UNIMPLEMENTED_BETA_WARN for extra beta checks.
2019-08-09 16:10:41 +02:00
Cedric BAIL 7248812a51 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-08-09 08:48:15 -04:00
subhransu mohanty 9e3a046661 evas/textblock: optmize textblock format parsing.
Summary:
 textblock format parsing creates/delets eina_TempStr for each
 token. Eina_TempStr is even worse than malloc/free because it also
 takes a lock/unlock along with malloc/free each time we create it.
 Just use a stack bufefr and create string in it if the string is too big
 then it will fall back to heap which is anyway we are doing right now.

 Tested this in Tizen List view the number of allocation reduced by 16000.

Reviewers: Hermet, ali.alzyod, woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9534
2019-08-09 17:36:35 +09:00
subhransu mohanty 1b94d90d53 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-08-09 14:02:24 +09:00
subhransu mohanty da39f53b95 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-08-09 14:00:03 +09:00
Hermet Park 21bebe0422 efl_ui_textpath: clear up path data when it's destructed.
This fixes path data memory leak.

@fix
2019-08-09 13:43:50 +09:00
Mike Blumenkrantz cdaebfa040 evas/render: size and draw proxy render surface based on proxy clipper
if a proxy is not being proxied, it's optimal to create a surface for only
the necessary dimensions and then only draw within those dimensions.

when a proxy is clipped to a size smaller than the proxy object, the required
size for the proxy render becomes smaller as the proxy has less visible area.
this enables us to draw only the clipped region and thus gives a performance
boost

this can only be enabled if the clipper is marked as static

Reviewed-by: Hermet Park <hermetpark@gmail.com>
Differential Revision: https://phab.enlightenment.org/D8881
2019-08-08 18:32:27 -07:00
Mike Blumenkrantz 250777a16e evas/render: clamp mask surface size to clipper size
there's no point in allocating a massive mask surface if it's going to
be clipped to a smaller size, so instead just allocate the smaller size
and position it where the clipped size would be

this can only be enabled if the clipper is known to not be changing size,
as performance would be impacted if the clipper was forcing a full mask
redraw due to regular resizing

Reviewed-by: Hermet Park <hermetpark@gmail.com>
Differential Revision: https://phab.enlightenment.org/D8841
2019-08-08 18:32:25 -07:00
Mike Blumenkrantz 0f58547085 evas: add 'has_fixed_size' property for canvas objects
this provides a hint for rendering that the object is not going to resize
for as long as the flag is set and  allows for some optimizations to
be made during rendering based on this knowledge

@feature

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8887
2019-08-08 18:32:23 -07:00
Carsten Haitzler 9149767184 getenv - reduce continually calling getenv for the same vars do once
do it once and remember the result from the first one. drops overhead
for sure by a chunk i actually could see in perf reports like about 1-2%
of cpu...
2019-08-08 23:57:02 +01:00
Boris Faure cdb920ab08 get rid of shadow variables
Summary: gl: add some EINA_FALLTHROUGH

Reviewers: #reviewers, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9525
2019-08-08 17:18:46 -04:00
Hermet Park 9b7d71df79 ector: ++safety.
null handling just in corner case.
2019-08-08 23:34:02 +09:00
Hermet Park 49343b628a evas vg: ++safety.
Realloc internal composite buffer if its size is invalid.
2019-08-08 23:30:20 +09:00
Carsten Haitzler 5f1e44ddad 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-08-07 21:20:00 +01:00
Lauro Moura ccd5441b8f cxx: Fix funcptr c_args declaration.
Summary:
The internal wrapper was generating the argument types directly instead
of passing through the translation generator `grammar::c_type`.

This caused the type in the `caller` callback to be different from the
actual C type of the declared function pointer, like in `@out` parameters.

Reviewers: tasn, felipealmeida

Reviewed By: felipealmeida

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9524
2019-08-07 16:14:27 -03:00
Marcel Hollerbach 2c0ea5b5e3 efl_ui_focus_layer: we should cleanup on invalidate
Summary:
otherwise there will be errors. Lets pray this did not break anything
else.
Depends on D9518

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9521
2019-08-07 10:24:08 -04:00