Commit Graph

16361 Commits

Author SHA1 Message Date
Chris Michael 781a5089e5 ecore-evas-wayland: Fix NULL pointer dereference
Coverity reports that accessing 'einfo' here is a NULL pointer
dereference. evas_engine_info_get can return NULL, so we should be
checking for a valid return before trying to use it.

Fixes Coverity CID1365654

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-08 11:10:53 -05:00
Chris Michael 8a24d64030 ecore_evas_wayland: Fix null pointer dereference
Coverity reports a null pointer dereference here because
evas_engine_info_get can return NULL. Check for a valid return before
trying to use it.

Fixes Coverity CID1365655

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-08 11:09:00 -05:00
Chris Michael 90dabc831f ecore-evas-wayland: Fix use after free
Coverity reports illegal access here as we are trying to pass a freed
pointer to ecore_evas_free. Rework error handling to avoid this.

Fixes Coverity CID1365657

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-08 11:06:36 -05:00
Vyacheslav Reutskiy 867cf1564a elementary_test: rework a 'Genlist Tree, Insert Sorted' test
This test was reworked for better show how sorted insert work.
Currently sorted insert work bad. The new inserted items does not
check the subitems of prev item.

TODO: fix the elm_genlist_item_sorted_insert.
2016-11-08 09:40:25 +02:00
Vyacheslav Reutskiy 5fc98901ec edje_edit: fix compare double values 2016-11-08 09:40:25 +02:00
Jean-Philippe Andre 04e3d40ec3 evas: Fix performance issue with move
See T4749, 11b7cf6b72 introduced an issue and
e1e28ce320 fixed it but caused a massive
performance impact.

This should fix that. Thanks @zmike for the first patch.

Fixes T4840
2016-11-08 14:15:15 +09:00
Jean-Philippe Andre 0c850f67ce evas: Fix previous pointer position in output coords
This fixes the test "Window Socket" map resize.
I broke that in 40fec5f608

Makes me wonder if the previous position should be exposed
in EO as well.
2016-11-08 14:15:14 +09:00
Guilherme Iscaro 8687a23820 Ecore Evas VNC: add client disconnected callback.
Summary:
Ecore Evas VNC: Properly unregister the region push hook callback.

This callback must be unregistered when the VNC server is deleted.

Reviewers: bdilly, barbieri, cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4384

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-11-07 14:44:40 -08:00
Artem Popov a061f211c0 Eina: add NULL check to eina_module_symbol_global_set API @fix
Summary: Add checking on NULL like in other API in module, to avoid segmentation fault

Reviewers: NikaWhite, cedric

Reviewed By: cedric

Subscribers: myoungwoon, jpeg

Differential Revision: https://phab.enlightenment.org/D4383

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-11-07 14:42:54 -08:00
Andrii Kroitor 595ae821ba elm_layout: add mmap support
Reviewers: cedric, Hermet, raster, NikaWhite

Subscribers: jpeg, reutskiy.v.v

Differential Revision: https://phab.enlightenment.org/D4379

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-11-07 14:42:07 -08:00
Marcel Hollerbach b56e508224 evas: move the error listing in dbg info to the canvas image
Summary:
the canvas image is the only one presenting the load api, in all other
implementations you would only see error messages.

Reviewers: jpeg

Subscribers: cedric, raster

Differential Revision: https://phab.enlightenment.org/D4380

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-11-07 14:41:06 -08:00
Cedric BAIL 6d7c6445f8 ecore: simplify suite name as I try to spot an intermitent failure.
While running ecore_suite, I, some times, see a failure in the thread queue test,
sadly I can't reproduce it while just executing :
CK_RUN_CASE=Eina_Thread_Queue  ./tests/ecore/ecore_suite
2016-11-07 14:05:55 -08:00
Cedric BAIL de131bf5d0 eina: remove Eina_Promise. 2016-11-07 13:43:11 -08:00
Cedric BAIL 50402592bf eio: fix conversion mistake from Eina_Promise to Efl_Future. 2016-11-07 13:43:11 -08:00
Cedric BAIL 144ef9dad3 eolian: remove Eina_Promise. 2016-11-07 13:43:11 -08:00
Cedric BAIL 8a3e745e1a eolian: remove test for generated Eina_Promise. 2016-11-07 13:43:11 -08:00
Cedric BAIL e03c8957cd eolian_js: remove Eina_Promise. 2016-11-07 13:43:11 -08:00
Cedric BAIL 997249e6c2 eolian: remove generation of Eina_Promise. 2016-11-07 13:43:11 -08:00
Cedric BAIL 90c7a8a680 bindings: remove Eina_Promise reference from JS binding. 2016-11-07 13:43:11 -08:00
Cedric BAIL 6ee17d8f2d bindings: remove Eina_Promise from C++ bindings. 2016-11-07 12:03:55 -08:00
Cedric BAIL d45e3abdba eolian_cxx: do not test Eina_Promise anymore. 2016-11-07 12:03:55 -08:00
Cedric BAIL 8a471e96be elementary: fix conversion mistake from Eina_Promise to Efl_Future in file selector. 2016-11-07 11:29:23 -08:00
Cedric BAIL e842c79ff3 eina: remove Eina_Promise tests. 2016-11-07 11:23:59 -08:00
Cedric BAIL 1f7d96e167 ecore: remove Eina_Promise tests. 2016-11-07 11:18:37 -08:00
Cedric BAIL 5db949196e eina: remove benchmark for Eina_Promise. 2016-11-07 11:12:33 -08:00
Cedric BAIL 5038f2551a elementary: update example to use Efl_Future. 2016-11-07 11:10:49 -08:00
Cedric BAIL 9413b260b6 elementary: remove old comment and update code accordingly. 2016-11-07 11:02:25 -08:00
Cedric BAIL 08c3102dc0 ecore: remove ecore_thread_promise_run. 2016-11-07 10:49:02 -08:00
Cedric BAIL af3788439b ecore: remove tests for ecore_thread_promise_run. 2016-11-07 10:47:31 -08:00
Mike Blumenkrantz e1e28ce320 evas: restore expected behavior for rejecting move with same coords
move the check to after the intercept where it was previously

ref 11b7cf6b72

fix T4749
2016-11-07 11:03:16 -05:00
Stefan Schmidt 9a10b83281 docs: ecore_con: add missing docs for new efl_net_* components 2016-11-07 15:58:54 +01:00
Stefan Schmidt a06aa07001 docs: elm_web: add missing docs for elm_web 2016-11-07 15:58:11 +01:00
Stefan Schmidt a670418431 docs: efl_io: add missing docs for efl_io_manager 2016-11-07 15:53:35 +01:00
Stefan Schmidt 095c8d2484 docs: efl_input: add missing docs for efl input pointer 2016-11-07 12:07:28 +01:00
Stefan Schmidt 55ee0d8fe8 docs: eldbus: add docs for new eldbus enum 2016-11-07 11:43:20 +01:00
Subhransu Mohanty 7c51b3de00 ector: update the render api eo signeture 2016-11-07 16:54:09 +09:00
Carsten Haitzler b1e5539005 swap mode - add evlog logging for querying surface age
more debugging to hunt down possible blocks in getting buffer age if
it happens
2016-11-07 11:47:46 +09:00
Carsten Haitzler ad9cc1676e egl engines (wl, x11, drm) - add buffer age events for debugging
this adds evlog events that give buffer age details for event log
debugging to help hunt down issues.
2016-11-07 11:45:08 +09:00
Carsten Haitzler d762f74962 wl_drm and eayland_egl buffer age fix for gl when age changes
so i was just about to add buffer age debugging evlogs to everywhere
doing buffer age and i found... drm gl and wayland gl engines DONT
HANDLE age change like gl_x11! they dont reset to a "full render" for
that frame. well well. this explains bugs i am seeing for sure. very
very bag! i thought this was handled properly. this does lend some
credence to my thoughts about somehow having a single universal buffer
swapping/update calculating and "applying" api inside efl somewhere...

anyway - this fixes this issue for these 2 engines which is a real
necessary fix to be correct.

@fix
2016-11-07 11:40:02 +09:00
Carsten Haitzler d6ed9e048d evas render evlog - add more evlog spots to help identify issues
this adds more logging spots to provide to evlog + efl debugd so we
can identify issues much more easily
2016-11-07 11:26:22 +09:00
Daniel Zaoui 38a069e1e4 ElmTests: modify flip test to fit Exactness limitations.
Animations are not supported by Exactness. The test screenshots were not
giving any kind of information as they were taken only when the front
was displayed on the screen.
With this change, animations set on the back of the flip can be replaced by
a background, meaning that flip switches can be checked.
2016-11-06 10:38:41 +02:00
Carsten Haitzler f18d9d7237 remove memcmp calls for better performance where size is known
so i have been doing some profiling on my rpi3 ... and it seems
memcmp() is like the number one top used function - especially running
e in wayland compositor mode. it uses accoring to perf top about 9-15%
of samples (samples are not adding up to 100%). no - i cant seem to
get a call graph because all that happens is the whole kernel locks up
solid if i try, so i can only get the leaf node call stats. what
function was currently active at the sample time. memcmp is the
biggest by far. 2-3 times anything else.

  13.47%  libarmmem.so                [.] memcmp
   6.43%  libevas.so.1.18.99          [.] _evas_render_phase1_object_pro
   4.74%  libevas.so.1.18.99          [.] evas_render_updates_internal.c
   2.84%  libeo.so.1.18.99            [.] _eo_obj_pointer_get
   2.49%  libevas.so.1.18.99          [.] evas_render_updates_internal_l
   2.03%  libpthread-2.24.so          [.] pthread_getspecific
   1.61%  libeo.so.1.18.99            [.] efl_data_scope_get
   1.60%  libevas.so.1.18.99          [.] _evas_event_object_list_raw_in
   1.54%  libevas.so.1.18.99          [.] evas_object_smart_changed_get
   1.32%  libgcc_s.so.1               [.] __udivsi3
   1.21%  libevas.so.1.18.99          [.] evas_object_is_active
   1.14%  libc-2.24.so                [.] malloc
   0.96%  libevas.so.1.18.99          [.] evas_render_mapped
   0.85%  libeo.so.1.18.99            [.] efl_isa

yeah. it's perf. it's sampling so not 100% accurate, but close to
"good enough" for the bigger stuff. so interestingly memcmp() is
actually in a special library/module (libarmmem.so) and is a REAL
function call. so doing memcmp's for small bits of memory ESPECIALLY
when we know their size in advance is not great. i am not sure our own
use of memcmp() is the actual culprit because even with this patch
memcmp still is right up there. we use it for stringshare which is
harder to remove as stringshare has variable sized memory blobs to
compare.

but the point remains - memcmp() is an ACTUAL function call. even on
x86 (i checked the assembly). and replacing it with a static inline
custom comparer is better. in fact i did that and benchmarked it as a
sample case for eina_tiler which has 4 ints (16 bytes) to compare
every time. i also compiled to assembly on x86 to inspect and make sure
things made sense.

the text color compare was just comparing 4 bytes as a color (an int
worth) which was silly to use memcmp on as it could just cast to an
int and do a == b. the map was a little more evil as it was 2 ptrs
plus 2 bitfields, but the way bitfields work means i can assume the
last byte is both bitfields combined. i can be a little more evil for
the rect tests as 4 ints compared is the same as comparing 2 long
longs (64bit types). yes. don't get pedantic. all platforms efl works
on work this way and this is a base assumption in efl and it's true
everywhere worth talking about.

yes - i tried __int128 too. it was not faster on x86 anyway and can't
compile on armv7. in my speed tests on x86-64, comparing 2 rects by
casting to a struct of 2 long long's and comparing just those is 70%
faster than comapring 4 ints. and the 2 long longs is 360% faster than
a memcmp. on arm (my rpi3) the long long is 12% faster than the 4 ints,
and it is 226% faster than a memcmp().

it'd be best if we didnt even have to compare at all, but with these
algorithms we do, so doing it faster is better.

we probably should nuke all the memcmp's we have that are not of large
bits of memory or variable sized bits of memory.

i set breakpoints for memcmp and found at least a chunk in efl. but
also it seems the vc4 driver was also doing it too. i have no idea how
much memory it was doing this to and it may ultimately be the biggest
culprit here, BUT we may as well reduce our overhead since i've found
this anyway. less "false positives" when hunting problems.

why am i doing this? i'm setting framerate hiccups. eg like we drop 3,
5 or 10 frames, then drop another bunch, then go back to smooth, then
this hiccup again. finding out WHAT is causing that hiccup is hard. i
can only SEE the hiccups on my rpi3 - not on x86. i am not so sure
it's cpufreq bouncing about as i've locked cpu to 600mhz and it still
happens. it's something else. maybe something we are polling? maybe
it's something in our drm/kms backend? maybe its in the vc4 drivers or
kernel parts? i have no idea. trying to hunt this is hard, but this is
important as this is something that possibly is affecting everyone but
other hw is fast enough to hide it...

in the meantime find and optimize what i find along the way.

@optimize
2016-11-06 13:13:10 +09:00
Carsten Haitzler 45771d47ab eo - use free queue for at least some eo core memory and pointers
this should help improve robusteness by keeping memory around for a
bit until the free queue flushes or is full

@feature
2016-11-06 13:13:10 +09:00
Carsten Haitzler ac861be550 eina list - use free queue to defer freeing list nodes and accting
this should help with robustness a little bit by keeping nodes in the
free queue purgatory until enteirng idle etc.

@feature
2016-11-06 13:13:10 +09:00
Carsten Haitzler 895f56aa64 ecore main loop - drive the free queue from the loops idle enterer
this will drive the free queue and make sure an idler will run through
pending frees once the loop has gone idle.
2016-11-06 13:13:10 +09:00
Carsten Haitzler 0ee33e7b4b eina - add a free queue (eina_freeq) for deferring frees of data
this adds eina_freeq api's for c land for deferring freeing of
pointers and can be used a s a simple copy & paste drop-in for free()
just to "do this later". the pointer will eveentually be freed as
eina_shutdown will free the main free queue and this will in turn free
everything in it. as long as the main lo0op keeps pumping things will
og on the queue and then be freed from it. free queues have limits so
if they get full they will clear out old pointers and free them so it
won't grow without bound. the default max is 1mb of data or 16384
items whichever limit is hit first and at that point the oldest item
will be freed to make room for the newest. the mainloop whenever it
finishes idle enterers will add an idler to spin and free while idle.
the sizes can be tuned and aruged about as to what defaults should be.

this also allows for better memory debugging too by being able to fill
freed memory with patterns if its small enough etc. etc.

@feature
2016-11-06 13:13:10 +09:00
Bruno Dilly 613167333c elementary/test_entry: resize window on test without it
test_efl_ui_text was creating a very small window,
with cropped components, etc.
So let's create it with a mininum size to be able to
properly see this test.
2016-11-04 19:51:28 -02:00
Guilherme Iscaro fc2a3052b4 VNC Example: Add support to Ecore_Evas FB engine. 2016-11-04 18:29:42 -02:00
Guilherme Iscaro 70b83ad455 Ecore_Evas VNC: Add frame buffer support. 2016-11-04 18:29:42 -02:00
Guilherme Iscaro 0fa8dc48cd Evas FB: Add support for region push hook.
This will be useful to support the Ecore_Evas VNC server
under FB backend.
2016-11-04 18:29:42 -02:00