structure.
- moved gl_sync_draw_done for a better structure packing.
- changed gl_sync_draw_done type from int to char which is enough.
- added more description to gl_sync_draw_done
We where inserting the pointer data instead of the pointer, leading to
unaligned access on Sparc (Thanks Lutin to report it and Debian tools/infra
to help us catch it) and also a memory leak.
Summary: Add data set case of selection event for XDND selection if selection atom is XDND
Reviewers: raster
Reviewed By: raster
CC: JackDanielZ, woohyun, Hermet, seoz, cedric
Differential Revision: https://phab.enlightenment.org/D446
In cserve2, a shortcut was taken to check if two images were the
same, using memcmp() on the Evas_Image_Load_Opts struct. But it
seems some empty areas in the struct are uninitialized, potentially
making memcmp() fail when the images were actually the same.
This is a minor issue since this function is called only when
bypassing the socket wait.
Also, memset load_opts to 0 and copy all the fields to avoid
the same warning in socket send().
I'm just wondering about the performance impact vs. memcpy/memcmp.
The bullet library generates tons of warnings:
1. -Wunused-variable
2. -Wunused-parameter
3. -Wshadow
2 and 3 were properly ignored by pragma GCC, but unused-variable
doesn't seem to work. At least on my version of GCC (4.8.2).
So, let's ignore ALL warnings from libbullet includes.
this makes efl ignore certain env vars for thnigs and entirely removes
user modules (that no one ever used) etc. etc. to ensure that *IF* an
app is setuid, there isn't a priv escalation path that is easy.
this MIGHT fix T45 but i can't reproduce to confirm, but reading a
backtrace indicates this could have been the issue. it looks like
there is room for a dangling pointer anyway, so fix.
stable release - cherry-pick me!
- Invalid alloc size (typo)
- Initialized value never read (set twice)
- Potential memleak (call free(msg) in case of send error)
- Null pointer dereference (check nullity)
There are still other warnings, but I believe these are false
positives.
since the map_changed is reset right after the map is updated,
it could not decide to redraw the map surface properly.
now map_update() returns the value to redraw the map surface properly.
vasprintf can return -1, in which case the buffer is corrupted.
So we better handle this ...
gcc told me of this thanks to -Wunused-result when building package,
thank you gcc for your incredible powers.
ERR<7807>: lib/eina/eina_binbuf_template_c.x:95 eina_binbuf_append_length() *** Eina Magic Check Failed !!!
This fix a problem where eina_binbuf was used without
calling eina_binbuf_new when ECORE_CON_REMOTE_UDP is used.
We do have mmap provided by Evil, but there is no implementation yet of
an anonymous map support. Also it is not clear how the memory system of
windows does actually work, so not sure this optimization is relevant
to windows at all. Thus we disable it for the time being and unbreak
the windows support.
- cherry-pick me -
stable release - cherry-pick me!
of course! eina_hash_direct_add() for the object pointer is using the
poitner to the stack value, not the value itself it points to... this
was bad and just by luck out value was on the stack that grows but
never shrinks and thus never crashes, BUT... it will just break in all
sorts of fun ways. basically it makes the hash useless as the keys in
it are effectively all the SAME value as they point to the same
storage.. but it changes whenever that stack mem gets changed.
Summary: evas_scale_smooth would not compile with BUILD_NEON set
Reviewers: raster
CC: cedric
Differential Revision: https://phab.enlightenment.org/D424
this fixes T323 - this is a change in lua 5.2 that makes osize encode
the type of data being allocated where 5.1 didn't do it and the math
was thus screwed as a result. comments in the diff.
cherry-pick me!
Summary:
evas_string_char_next_get is simple wrapper of eina_unicode_utf8_next_get with
some check routines.
But in _markup_get_text_utf8_append, these check routines look unnecessary.
Reviewers: cedric, seoz, raster
Reviewed By: raster
CC: cedric
Differential Revision: https://phab.enlightenment.org/D420
Summary:
_op_blend_mas_c_dp_neon rework:
main loop now process 4 pixels per iteration
fast path when *m == 0
Reviewers: raster
Reviewed By: raster
CC: cedric
Differential Revision: https://phab.enlightenment.org/D418
Summary:
When there is multi text nodes for range text get,
it gets wrong format node of last text node.
It makes broken result.
Test Plan: https://phab.enlightenment.org/D398
Reviewers: woohyun, tasn, seoz
Reviewed By: tasn
CC: cedric
Differential Revision: https://phab.enlightenment.org/D399
so firstly the module loading logic in emotion is pretty bad. it
forcible loads into memory (dlopen + run code from) EVERY emotion
module whenever you use emotion anywhere. this is a fat memory cost and
startup cost. it should not ever have done this. so remove that code
and make it explicitly load only the backend requested and fall back
to using what is compiled in (generic by default) and otherwise
generic as a module, then xine, then gstreamer then gstreamer1.
gstreamer1 seems broke - all i see is a black box (no video).
this also fixes a deadlock problem. if you have BOTH gstreamer AND
gstreamer1 modules loaded i get a deadlock inside glib. this seemingly
fixes it as it'll only load the first one it finds, not both (unless
explicitly requested).
We now build a list of item to walk on for each step to just avoid all necessary walking.
It is a slightly more elegant idea than my previous patch even if it only give a speed
improvement of 5% in the best case. Now that render code and the callee only take 1.6%
of the time I am looking at in the benchmark, meaning nothing else to improve here.
This fix the bug spotted in Enlightenment dialog box.
This reverts commit a69c5ba0ae.
yes - this broke text rendering. revert it. several dialogs/uses in e
broke with shadow and glow text being heavily offset up/to the right
of the proper text.
- No need for a separate xcb_connection here as we already have a
connection at this point so let's use that.
- Fix up formatting.
Signed-off-by: Chris Michael <devilhorns@comcast.net>
We now build a list of item to walk on for each step to just avoid all necessary walking.
It is a slightly more elegant idea than my previous patch even if it only give a speed
improvement of 5% in the best case. Now that render code and the callee only take 1.6%
of the time I am looking at in the benchmark, meaning nothing else to improve here.
Being annoyed by different types of eina critical macros - CRI, CRIT,
CRITICAL -, I concluded to unify them to one. Discussed on IRC and
finally, CRI was chosen to meet the consistency with other macros -
ERR, WRN, INF, DBG - in terms of the number of characters.
If there is any missing bits, please let me know.
This does help for some textblock benchmark with a speed increase of 12% and
the one that don't get better don't get slower either, so let's put that in.
This patch will detect how many more times ecore_init was called
during initialization and use that as a threshold to do a clean shutdown.
It is a necessary evil as we do have ecore module that will initialize
eldbus that will then reinit ecore_init from within ecore_init and without
a chance for the application to act on it.
I also reenable a test to make sure we will catch earlier this kind of issue.
Add to fuction prototype new param: Eina_Bool approximation.
If need exact matching state name and value set EINA_FALSE to
'approximate'. In other cases used EINA_TRUE.
Reviewers: cedric, raster, seoz
CC: cedric
Differential Revision: https://phab.enlightenment.org/D400
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
This commit will add API for working with smooth for image
and proxy part type.
There are two functions will be added:
1. edje_edit_state_fill_smooth_get
2. edje_edit_state_fill_smooth_set
Reviewers: cedric, raster, seoz
Reviewed By: cedric
CC: cedric
Differential Revision: https://phab.enlightenment.org/D394
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
There was detected that pending_objects array of Evas structure of
email application stores at least 550 objects that never are removed
from this array. These objects are not active and are not about to render.
We know that once the decision not to remove changed objects from this
array was accepted. But then the criterion of leaving object in this
array was weakened.
We propose to weaken this criterion more sufficiently – do not store
in this array objects that can not be cause of whole canvas
invalidation. Our exact proposal for this criterion you can see in the
patch attached to this issue.
NOTE: This patch is a try, there may be some side effect especially with
mapped object that we didn't find, so it could be reverted if before the
release of 1.9 we see anything wrong.
Reviewers: cedric
CC: cedric, seoz
Differential Revision: https://phab.enlightenment.org/D354
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
This commit will add some API to restack part above/below target part.
There are two functions will be added:
1. edje_edit_part_restack_part_below
2. edje_edit_part_restack_part_above
Reviewers: cedric, seoz, raster
Reviewed By: cedric
CC: cedric
Differential Revision: https://phab.enlightenment.org/D390
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
Changed edje_edit_image_del logic: image can't be deleted if it's in use,
after deletion last image in list is moved to freed position so there are no
"holes" in image list.
Following functions added to api:
edje_edit_image_replace
edje_edit_image_usage_list_get
edje_edit_image_usage_list_free
Reviewers: cedric, seoz, raster
Reviewed By: cedric
CC: reutskiy.v.v, cedric
Differential Revision: https://phab.enlightenment.org/D392
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
This commit will add API for working with text source.
There are two functions will be added:
1. edje_edit_state_text_source_get
2. edje_edit_state_text_source_set
Reviewers: cedric, seoz, raster
CC: cedric
Differential Revision: https://phab.enlightenment.org/D389
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
This commit will add API for working with text style.
There are two functions will be added:
1. edje_edit_state_text_style_get
2. edje_edit_state_text_style_set
Reviewers: cedric, seoz, raster
Reviewed By: cedric
CC: cedric
Differential Revision: https://phab.enlightenment.org/D388
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
This new function will copy the whole group into same file but with another group name/id.
Copying whole group data field by field require some huge code.
Alternatively we found another solution for copying whole group as you can see it in this commit.
This function will copy group and all it's data (like scripts etc) and it will be totally independent.
Reviewers: cedric, seoz, raster
CC: reutskiy.v.v, cedric
Differential Revision: https://phab.enlightenment.org/D385
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
for more gurantee to update map properly,
we should reset the map changed flag after the map updation is performed.
this will fix a mapbuf bug that map is not updated.
when the map is changed without rendering but it's in the active object list,
the map updation couldn't be happened later that map is rendered. (if the map is not updated at this frame)
Git log should be enough for the credit :)
This code was merged into efl upstream by devilhorn's aggressive synchronization between efl upstream and tizen.
But that commit didn't have the author's credit.
However We will never forget the contribution of Gwanglim Lee <gl77.lee@samsung.com>.
positional arguments must appear at the end of the description array
(after the last option) and should have a metavar set and not have
shortname or longname. Simple, elegant and fit :-)
There is a new function to parse the positional arguments,
ecore_getopt_parse_positional() because we may want to not try to
parse them in the case of a quit-option such as --help, --license,
--copyright, --version or some user-defined action. This avoids us
producing errors of missing positional arguments when printing help
and adds some flexibility as well.
This should make Tasn happy :-)
this actually fixes the issue. coverity did point it out but i fixed
it incorrectly. since it was still there in the scan i now fixed it
properly. fixes CID 1039279
Summary:
This commit will add some API for working with aliases.
There are four functions will be added:
1. edje_edit_group_aliases_get - this function will return the list of aliases of certain group.
2. edje_edit_group_is_alias - this function will check if the given group name is actually an alias.
3. edje_edit_group_aliased_get - return the main real group that is being aliased.
4. edje_edit_group_alias_add - add new alias name.
Also the function "edje_edit_group_del" was modified because of wrong behaviour.
Now if the given group is alias, it will successfully delete it,
but if the given group is main group, it will also delete all it's aliases.
This commit also modify EDJ file by adding new field for detecting if the group is alias or not.
Reviewers: cedric, seoz, raster
Reviewed By: raster
CC: reutskiy.v.v, cedric
Differential Revision: https://phab.enlightenment.org/D376
Summary:
After making part relative to the whole interface (by giving NULL parameter)
it was returning EINA_FALSE (not successfull).
Reviewers: seoz, cedric, raster
Reviewed By: raster
CC: reutskiy.v.v, cedric
Differential Revision: https://phab.enlightenment.org/D379
Summary:
Anchor and item tags should be updated when text is changed.
In _edje_entry_imf_event_delete_surrounding_cb function,
the text is changed by "evas_textblock_cursor_range_delete" API
and there was no update about anchor and item tags.
It can result that the tags hang in the air after deleting.
Reviewers: tasn, woohyun, seoz, jihoon
Reviewed By: tasn
CC: cedric
Differential Revision: https://phab.enlightenment.org/D368
in one case data is not separately allocated but is part of the
Eet_Variant_Unknow struct where it is allocated as extra space on the
end of the data blob. in this case don't free it, otherwise do (pass
in true) as before. this should fix CID 1039728
size_ret is used later as an argument for malloc, so it should be
positive. In addition this should ensure that
ecore_x_window_porp_property_get returns a positive value and is true if
we malloc data.
Hopefully also fixes CID 1135636
Markup parsing will segv if a value string is empty,
as in "<style=>". Sure, this is invalid, but hey, it could
definitely be used from an app or even by a user writing
his own markups :)
The internal doc says this function expects an item to be
of the form "key=val" but there are no checks beyond the
presence of "=" in the string before calling it.
If an image failed to load, and cserve2 returned an error message,
then the File_Entry was freed, but not removed from the hash.
Solution: remove entry from the hash, let the callback free the data.
this adds a ifdefable feature to sync rendering only to animator
slots. this should reduce over-render of more frames than a user can
see when updates are triggered by things like mouse movements (which
may come in many times faster than the framerate). this is an
experiment to see if this helps smoothness and load. it also has
problems in e grabs x while rendering - this is now fixed in e18
alreadey, but it is just a config you can turn off.
As bounds is a pointer, bounds + num will always be postive, so this is
an eternal loop. In addition, XFixesInvertRegion only accepts one
region, so num must be 1.
Fixes CID 1039469
Data returned from ecore_x_window_prop_property_get are malloced, so use
free, not XFree. Which also is consistent, as free was used on other
occasions.
it might have been free'd by the user, so set it to NULL before next
iteration. This is an attempt to fix CID 1039913 and 1039914.
We don't use the pointer value, only the pointer, so the error is wrong.
Could flag the error in coverity, but if this fixes it, we wont see the
error in other situations.
if the some of children are the mapped object in source object tree as well as the the mappped object is invisible,
then they wont be render_pre() called.
this make sure those render_pre() in proxy rendering.
stable release - cherry-pick me!
We propose a patch that reduces graph traversal work in
evas_object_child_map_across_mark(). It fixes a few particular
slowdowns around Tizen applications, including 0.6 seconds slowdown.
evas_object_child_map_across_mark() does not seem to need to
recursively call itself on the same object many times. Yet we have
noticed that in some scenarios it repeatedly traverses the same
subtrees of objects over and over again, whenever there is more than
one way of reaching these subtrees. In the production issue mentioned
above, certain elm_object_part_content_set() call results in millions
of recursive calls of evas_object_child_map_across_mark(), taking
~0.6sec total.
We propose to allocate a hash table during top-level call to store all
objects visited, and return from sub-calls instantly whenever we are
called over an object we already visited.
stable release - cherry-pick me!
there way a problem with software rendering - it rendered some areas
more than once per frame due to overlapping rectangles. it also had
more rectangles to cover the same update area that it should have had.
this fixes this.
This is the correct implementation of the idea developped in Lucas De Marchi's blog :
http://www.politreco.com/2013/09/optimizing-hash-table-with-kmod-as-testbed/
This give an interesting +15% for all Eina_Hash user whatever hash function they use. The inlined
djb2 is still the fastest one and all other give very close result. It does increase memory foot
print, but as much as the previous way of doing it.
This is not perfect, it will just limit the propagation of the problem
for some time. Yes, it does hide it under the carpet, but that's better
than having a crash. Problem seems to be in Eina_Hash, but is really
difficult to reproduce and fix for the moment.
This bug is particularly visible in EFM video preview ( T 539 ). The problem is
that the logic for changed has evolved over time. At the beginning Evas canvas
was flat and could be handle in an array. It was then not using the changed flag
that much. This day, we are living with a tree and we need to propagate the
changed flag to the parent, so that when we walk them we only need to walk the
active objects and don't spend our time on branch that are completely static.
Sadly things did collide here. We remove all object that have been rendered
from the pending_objects array. That does include any smart object that was
processed even if one of the child was not. Once any of the child of that not
processed object is marked changed, it will be propagated up to the first
parent that is changed. As the parent of that one are marked as not changed
when evas_render walk the tree, he is blocked really early in the process and
never get a chance to detect that the child of a not changed object did change
and tada !
The fix is to add all the parent of all the object that are in the pending_objects
array back into the pending_objects list. So they will always be marked as changed.
Another alternative to this logic would have been to change pending_change to
filter out those and keep them around. I choose the first solution as I think it
will be more robust to catch all the parent in all case.