Commit Graph

2255 Commits

Author SHA1 Message Date
Vostokov Sergey 6a5e72d37b evas - Clip mark performance improvement
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.
2013-12-05 21:08:35 +09:00
Carsten Haitzler 9c3682b746 evas - fix overdraw + too many rects problem found in some expedite tests
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.
2013-12-05 20:04:26 +09:00
Cedric Bail 2e9f96cc24 eina: this is actually a better way of improving Eina_Hash performance.
This reduce the size of the rbtree part dedicated to the hash key match,
but reuse only bit that weren't matched by the bucket.
2013-12-05 16:32:02 +09:00
Daniel Juyung Seo 998c543ae2 ecore ecore_glib.c: fixed documentation about glib integration always configure option.
--enable-glib-integration-always was changed to --with-glib=always in efl 1.8.
2013-12-04 19:45:17 +09:00
Cedric Bail ff845b0a7c eina: improve cmp function of eina_hash string related hash.
For strings, we already know the length, so let's just not call the
heavy strcmp if the length is not already the same. Get some easy
speedup here.
2013-12-04 19:05:03 +09:00
Cedric Bail df909605c5 eina: increase hash matching inside of Eina_Hash.
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.
2013-12-04 18:33:05 +09:00
Cedric Bail 3a15c5bbb3 Revert "eina: work around current strange behavior seen in eina_cow."
This reverts commit e4107b2936.
2013-12-04 18:33:05 +09:00
Cedric Bail 4f161f0c8d Revert "eina: more work around to limit problem."
This reverts commit c5db264e0a.
2013-12-04 18:33:05 +09:00
Cedric Bail 3c7185e880 Revert "eina: check if the complete hash match before checking if the key match during children walk."
This reverts commit 295babadb1.

The implementation of that said optimization is actually wrong.
2013-12-04 18:33:04 +09:00
Cedric Bail c5db264e0a eina: more work around to limit problem. 2013-12-04 16:31:49 +09:00
Cedric Bail e4107b2936 eina: work around current strange behavior seen in eina_cow.
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.
2013-12-04 15:36:17 +09:00
ChunEon Park a7c51c4d39 evas/event - fix the inccorect event hit area.
cedriccccccccccccccccccccccccccc!!!!!!!!!!!!!!!!!!
2013-12-04 01:04:21 +09:00
Cedric Bail f90803aa2f evas: bugfix in evas_render of not maintaining changed flags on object correctly.
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.
2013-12-03 16:43:58 +09:00
Carsten Haitzler 48d3253b45 NEON vectorization: added use of COLSAME define in map routine
Reviewers: raster

Reviewed By: raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D341
2013-12-02 16:33:34 +09:00
Daniel Juyung Seo 5b21fa7169 Revert "fix smart sma by allowing more recursion"
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 :)
2013-12-02 16:02:23 +09:00
Otavio Pontes afd8a238d1 Adding the cubic-bezier curve to edje transitions
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
2013-12-02 15:02:40 +09:00
Carsten Haitzler 0b605c5daa Eldbus: added function for getting bus unique name
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
2013-12-02 14:57:07 +09:00
Vyacheslav Reutskiy 40d4acd77e edje_edit: Add getters and setters for fixed param
Reviewers: cedric, seoz, raster

Reviewed By: raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D339
2013-12-02 14:54:28 +09:00
Daniel Juyung Seo e2467724da ecore ecore_x_e: check 0 and -1 for ecore_x_window_prop_card32_get() return value which mean fail.
- ecore_x_window_prop_card32_get() returns:
  -1 if the property was not successfully fetched.
  0 if the property exists but has no elements.
2013-12-02 12:46:18 +09:00
Jihoon Kim 49511730d7 fix unchecked return value of stat in ecore_file_mv
stat() function may fail and return an error code

This fixes CID 1039697
2013-12-02 09:40:48 +09:00
Cedric Bail 069a2b027f evil: use the right ifdef. 2013-12-01 20:56:52 +09:00
Carsten Haitzler 0f21e4cfa7 eina - fix set-but-unused warning in eina_cow when valgrind off 2013-12-01 13:52:53 +09:00
Carsten Haitzler 2512eaf157 evas event freezing is "wrong" for core events - turn it off
this turns off event freezing for SOME event types for eveas canvas
events (was was intended to begin with). this fixes T577
2013-12-01 13:26:04 +09:00
Carsten Haitzler 970bcc64d8 evas - pre/post render events are for canvas not object
the eo event naming was wrong for pre/post render event callbacks.
they are for the canvas as a whole, not per object
2013-12-01 12:50:45 +09:00
Carsten Haitzler c12ac143c6 fix freetype header includes to be correct where ft 2.5.1 breaks builds
this should fix T591
2013-12-01 12:16:28 +09:00
Boris Faure f45618d15b fix eina_cow issues. Closes T581, T527 2013-11-30 15:41:08 +01:00
Oleksandr Shcherbina 1cad4c2afe ecore/ecore_file: NULL-check for input parameter
Add check by NULL for input parameter 'path' in method ecore_file_mkpath

Reviewers: seoz, Hermet

CC: cedric

Differential Revision: https://phab.enlightenment.org/D349
2013-11-30 13:50:17 +09:00
Sebastian Dransfeld 3ebebbca1a eina: formatting 2013-11-29 22:20:50 +01:00
Sebastian Dransfeld 575f466a10 efreet: improve locking
Do find and ref inside lock, so no one can ref-- after we find desktop
2013-11-29 22:20:50 +01:00
Rafael Antognolli cc4aedaaee ecore/wayland: Use touch_focus for touch_based events.
Also call the mouse related events with BTN_LEFT instead of 0, otherwise
the correct button won't be assigned to the event (button 1).
2013-11-29 18:05:42 -02:00
Rafael Antognolli a14ee372e0 ecore/wayland: Send a mouse up event when the implicit grab starts.
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.
2013-11-29 18:05:19 -02:00
Rafael Antognolli 2c95c5ee1d ecore/wayland: Get the touch up event position from the down_info.
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.
2013-11-29 18:05:06 -02:00
Rafael Antognolli b92fc57c5a ecore/wayland: Remove list of touch points from input structure.
We already have the "Ecore_Wl_Mouse_Down_Info" list, that contains this
information.
2013-11-29 18:05:06 -02:00
José Roberto de Souza 64687356b0 eldbus: Fix crash caused when the object of an monitored proxy is deleted
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
2013-11-29 17:21:14 -02:00
José Roberto de Souza b25fd77827 Revert "workaround for T543"
This reverts commit b663b5b8c7.
2013-11-29 16:39:10 -02:00
Jean-Philippe Andre 62093d99d4 evas/cserve2: Fix interrupt on select in edje_cc
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
2013-11-29 15:47:57 +09:00
Cedric Bail 4f33c81bdb evas: roundup the step size of an array to fit in one page of memory.
This make an array stay in 4K instead of 20K before. It should reduce a little
bit our peak memory usage without slowing down things to much.
2013-11-29 15:33:51 +09:00
Cedric Bail aefd608453 eina: fix rounding logic to avoid making the array to short.
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.
2013-11-29 15:33:51 +09:00
Jihoon Kim 50e74f02d4 ecore_evas: fix wrong check in _ecore_evas_buffer_msg_send
'if (!child_ee)' implies that "child_ee" is equal to NULL, but
child_ee is used in the nest of if statement.

This fixes CID 1039431
2013-11-29 13:53:47 +09:00
ChunEon Park c61ce59162 evas - code refactoring.
put the frequently used compare prior to the other.
2013-11-28 21:24:11 +09:00
Carsten Haitzler 523d8607d1 fix eina_array_remove to actually realloc down in size to remove bloat
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.
2013-11-28 18:03:54 +09:00
Cedric Bail 403e97ecb0 ecore_ipc: prevent a double free.
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.
2013-11-28 17:17:09 +09:00
Cedric Bail a969459b0b evas: simplify logic for better readability.
This also should solve some complain from clang static analyzer.
2013-11-28 17:03:32 +09:00
Cedric Bail 8e7921dffa ecore_con: remove unecessary code. 2013-11-28 16:36:21 +09:00
ChunEon Park 7acdb30f95 evas/line - fix the line position set problem.
If the line goes to the 0, 0 then it won't be updated. Now it's fixed.
2013-11-28 14:03:05 +09:00
Daniel Juyung Seo a5c98947ae ecore ecore_x_e: initialize local variable to avoid having wrong value.
Thanks to devilhorns!
2013-11-27 21:43:06 +09:00
Cedric Bail 1e70d703b3 ecore_con: fix unitialized use of buffer from strncpy.
Fix CID 1039725.
2013-11-27 14:30:03 +09:00
Cedric Bail d0837ee5f5 ecore_con: fix non initialized use of buf with strncpy.
This fix CID 1039723.
2013-11-27 14:27:00 +09:00
Jihoon Kim 3d2b7f2ec1 edje_entry: fix out-ouf-bounds issue in _edje_entry_imf_event_preedit_changed_cb
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
2013-11-27 09:31:26 +09:00
Daniel Juyung Seo 2ebd985b31 evas evas_render: removed unnecessary semicolon from a macro.
This fixes coverity CID 1132631.
2013-11-27 02:02:41 +09:00