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.
This reverts commit 1319733cae.
Let's revert this patch and lower the recursion number.
As we released efl 1.8, let's find the root causes of the problem and fix them.
I already told this revert to raster so I am not mean :)
Summary: Adding an option to use a cubic-bezier curve in edje transitions.
Reviewers: Sachiel, cedric, raster
Reviewed By: raster
CC: raster
Differential Revision: https://phab.enlightenment.org/D319
Summary:
Hello guys,
We are now working on a accessibility support for elementary (ATSPI2) and we need following function to correctly register application.
Reviewers: cedric, raster, lucasdemarchi
Reviewed By: raster
Differential Revision: https://phab.enlightenment.org/D327
The previous workaround used to send a mouse up event to the
application, using the pointer enter callback to determine when an
implicit grab has finished. This was "simulating" a mouse up event when
the surface move or resize finished.
However, this doesn't work for touch-based move. The pointer enter isn't
emitted, because the wl_touch interface doesn't have the concept of a
pointer.
Changing this code to make it more similar to what Weston's toytoolkit
does, the mouse up event is sent as soon as the move or resize grab
starts. After that, the compositor takes care of the move/resize almost
entirely.
Should fix T468.
down_info is a struct that stores some information about the current
pressed touch events. It should be used for that specific touch point,
instead of the generic input info, when sending a mouse_up event.
This happen because proxy was already freed and we try print some information
about the proxy in error message.
This fix: https://phab.enlightenment.org/T543
Summary:
Block SIGCHLD during select().
This fixes a bug with edje_cc when EVAS_CSERVE2=1: Fixes T464.
select() used to return prematurately with EINTR because the
app received some unexpected signals. In particular SIGCHLD
is received when a child terminates, but this is not a reason
to cancel the image load.
In theory, all blocked signals in pselect() should be pending
until pselect returns, so any SIGCHLD should still trigger
the app's signal handler.
Reviewers: cedric
CC: raster, cedric
Maniphest Tasks: T464
Differential Revision: https://phab.enlightenment.org/D357
I have no idea how the previous formula was supposed to work at all, but
this one is the same as our alignof code to make sure we do allocate to
the really nearest size and don't do over allocation. Additionnaly it works.
eina_array_remove() didnt ever realloc down unless we went to 0
members. this wasn't very good as you'd expect the array to be reduced
in size if enough items were removed. not only that the old code was
stupid and ALWAYS malloc()ed a new array of the exact same size and
copied items over in the most complex way possible, then freed the old
one. this would have added overhead wherever used (evas_render) that
should not have been there.
this is based on the idea in a patch from
Viacheslav Lvov <v.lvov@samsung.com>, but this is a re-do of it
entirely, reducing the codebase massively even compared to the patch
and making it much simpler to read, maintain, actually reduce memory
and cut overhead.
According to clang static analyzer it is possible to find a path where
buf and svr->buf are pointing to the same array, better be safe than sorry.
Arguably this code could be more readable if it was using Eina_Binbuf.
The maximum index of tagname is 7, and preedit_type_size is equal to 8.
Checking "attr->preedit_type <= preedit_type_size" implies that the value of "attr->preedit_type" may be up to 8
This patch fixes CID 1039308
This means unref will really free the object instead of just let it
linger in memory once the object is unrefed.
This is also correct because once detached from the canvas, Evas has
nothing to do with the object and it shouldn't need the manual free
anymore.
This fixes the infinite loop while deleting canvases with still
referenced objects.
The canvas should not assume it can get rid of all of the objects. Some
objects might be referenced. I also added a printf to let the user know
about it.
This fixes T565.
When the ecore_animator_source_set() is called with different sources repeatedly, sometimes internal timer is not deleted and this leads animator misbehavior.
Especially when the source is changed from ECORE_ANIMATOR_SOURCE_TIMER to ECORE_ANIMATOR_SOURCE_CUSTOM before the SOURCE_TIMER's internal timer is deleted, this problem occurs.
In this case, even though _end_tick() is called in ecore_animator_source_set(), the SOURCE_TIMER's timer is not deleted because the source is already changed to CUSTOM.
So we should delete the internal timer in _end_tick() in all cases.
bug T569 still shows that we have cases where, during e shutdown, we
still get eo_data_scope_get() return NULL for a parent object.
whatever this is, segfaulting is much worse than protecting and
marching on. so protect
Whites at the end of lines ending with whites should not be cut, but
should be wrapped (there's no legal line break there).
Thanks to Shilpa Singh for reporting.
Previously, if you were hold down shift for 1-2 seconds and then press
a key, you would get superfluous key repeats (even tho you released
the printable key). This was because the "key repeat" code was not
checking for the same key before (re)starting the repeat timer.
This fixes the repeating key issue by checking if the key pressed is
different than the one already pressed. If so, it will (re)start the
timer. If it is not different, then the timer is already running and
we don't need to do anything.
Fixes T552
Signed-off-by: Chris Michael <cp.michael@samsung.com>
values.
Previously, the keyname and key fields of the Ecore_Event_Key
structure were being filled in with the capitalized version of the
key. This is due to xkb_keysym_get_name always returning keys with the
modifier applied. There is no actual function in xkbcommon to Not do
this :/ so we have to manually check if Shift is pressed, and if so
then we need to convert the key to lowercase.
Fixes T550
Signed-off-by: Chris Michael <cp.michael@samsung.com>
The subsurface protocol was moved into Wayland Core
around v1.3.90 (i.e. v1.4.0).
Test if subsurface protocol is part of wayland-client.h.
If not, we include our own copy of the protocol header.
Also, some whitespace cleanup in ecore_wl.c.
Tested with Wayland 1.3.0 and 1.3.90 (master:360dca5).
Fixes T529
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Perhaps they are insane, but as the comments imply it defines
USE_HARFBUZZ which is needed afterwards. You just broke everything. I
know it's a mess there, but it's a mess that works. Your change doesn't.
This reverts commit d4b9e3b287.
Before this patch, we were unconditionnaly destroying the Eina_File if that one
did change on disk. We also make sure that we remove the right entry from the cache
if the file did change there.
This is an extension to raster's 0355a6a296
(eo - fix _parent_set in base clase when old_parent_pd is NULL).
I also added an error message in case this check fails.
The lock on the main hash was taken to late (after we took the decision
to remove the targeted Eina_File from the cache), this means it was possible
to get an Eina_File from the cache that was going to be removed. This patch
attempt to fix that potential race condition.
Hopefully should fix T461.
Summary:
Function returns boolean value, docs said it can return int.
I had fixed that.
Reviewers: cedric, raster
Reviewed By: raster
CC: cedric
Differential Revision: https://phab.enlightenment.org/D342
The order was messed up when inserting a few formats in the
markup_append/prepend functions without any characters between them.
For example, inserting "<b><i>" would result in "<i><b>" being inserted.
Thanks to YoungBok Shin for reporting this.
Send events to properly focused surface.
Fill in missing parts of the event structures (ev->root, ev->multi).
Signed-off-by: Chris Michael <cp.michael@samsung.com>
cw/cy are never used inside the "dosel" block, so no need to fetch
geometry and calculate difference here (already fetched below when
needed anyway).
Signed-off-by: Chris Michael <cp.michael@samsung.com>
When deleting the drag, free any dupped strings.
Hopefully this fixes Phab Ticket T471. Don't know for sure as I cannot
reproduce the crash here :/
Signed-off-by: Chris Michael <cp.michael@samsung.com>