Commit Graph

63266 Commits

Author SHA1 Message Date
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 742b7afb40 elementary: add tests for the efl_part support of efl_ui_property_bind.
Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9529
2019-08-12 10:13:38 -07: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 c4354dd38e evas test - use correct type for ptr type tracking called
callback setup uses int but thecallback uses intptr_t ... which is...
wrong.
2019-08-11 17:09:32 +01:00
Carsten Haitzler 0a06c7b568 efl check - use global not stack local buffer for srunner_set_xml
asan is most unhappy about using a priori stack frame's data for
this.. it seems check uses the char * buf directly as-is without
duplicating it... so we can't sensibvly use local stack data. that is
what asan is saying... and this makes our tests not work under asan to
begin with... nto to mention other possible issues i have yet to see
as i got to this one first.
2019-08-11 16:35:03 +01: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 e0f0165220 evas - png loader - fix leake in error case of pixels
fix CID 1403027

@fix
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 769fa4b592 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-08-09 10:25:37 -07:00
Mike Blumenkrantz 189ddd9c81 tests/popup: add (extremely) comprehensive test for anchor popups
this verifies all align settings, different anchor points, changing anchors
and aligns on-the-fly, unsetting anchors, and changing popup sizes

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9526
2019-08-09 10:25:35 -07:00
Mike Blumenkrantz 2c33744a8a tests/popup: add test units for all the text_alert popups in elm_test
this is mostly to verify that the internal label is sizing as expected

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9523
2019-08-09 10:25:33 -07:00
Mike Blumenkrantz 0a3dfe8b5c tests/popup: add unit tests for scroll_alert expandable sizing
these correspond to the cases in elm_test

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9522
2019-08-09 10:25:30 -07: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
Marcel Hollerbach 090588f58b efl_ui_selectable: add spec test suite for this
Summary:
this brings a spec test suite for Efl.Ui.Selectable

Depends on D9517

Reviewers: zmike, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9518
2019-08-08 09:12:46 -04: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
Carsten Haitzler b6bc80d2da ecore evas drm - fix code that forgets to del an fd handler
also.. note the badness of the code design mixing a global singleton
with a "per struct" set of data like fd handlers for the same devices
initted only once but... anyway. it's messy.
2019-08-07 18:14:06 +01:00
Carsten Haitzler 064b46b7a3 evas egl - esnure we always destroy surfaces because creating new ones
be sure we dont leak them.
2019-08-07 16:59:43 +01:00
Carsten Haitzler 8e67e9d18e evas - gl_drm - delete old surfaces before creating new ones
we shouldnt go have multiple drm window surfaces per drm surface...
this is bad.

@fix
2019-08-07 16:39:10 +01:00