Commit Graph

2782 Commits

Author SHA1 Message Date
Cedric BAIL 53dd596f43 evas: reduce usage of __thread directive.
Moved rects caching into draw context to avoid the use of __thread
slot. Draw context are defined per thread anyway and should be just
fine. This doesn't really change the picture regarding glibc problem
when to many __thread are needed, but slightly improve the global
picture. Also this patch doesn't affect our performance in expedite
benchmark as far as I can tell.
2016-11-16 16:05:56 -08:00
Cedric BAIL 55ab71bd67 evas: make sync and async work in the same way and not trigger empty flush/clear. 2016-11-16 11:31:04 -08:00
Jean-Philippe Andre f50b0fed13 elm/evas: Fix disappearance of window icons with CSD
After a few patches trying to fix clipping of frame or
non-frame objects the icon finally ended up invisible. Even
if the elm_icon was marked as is_frame, its internal evas
object image would not have the flag set, thus it would be
clipped out.

Solution: Propagate the is_frame flag to all smart children,
not only when setting it but also when adding new members.
A hack with the API indicates that the frame edje is a very
special object that does not propagate the flag.

See also:
7ce79be1a1
0f6c33eff1
9c9c8809a7
ac5ca9281c
2016-11-16 20:48:58 +09:00
Jean-Philippe Andre ac5ca9281c evas: Try to fix bad clipping of non-frame objects
Test cases (in WL or X with client-side decorations on):

1. elementary_test -to Animation
  Resize the window to a small size (eg, 100x100) and observe the
  balls overflowing outside the window content part. This tests
  unclipped normal objects.

2. elementary_test "Window Plug" (requires also Window Socket)
  Drag the handles outside the window, observe overflow in the
  framespace area. This tests mapped images ('can_map').

3. elementary_test -to "Gesture Layer"
  Drag a photo around. This tests non-image mapped objects.
  NOTE: This test is badly broken!

This patch fixes both of those issues. I'm not sure what I'm
breaking, though.
2016-11-16 20:48:37 +09:00
Cedric BAIL ee16c647dc evas: make sure that the documentation match the behavior by return true only when something is rendering. 2016-11-15 15:54:29 -08:00
Stefan Schmidt 16143b62b4 docs: evas_canvas: fill gaps in evas canvas eo file documentation 2016-11-15 17:45:32 +01:00
Stefan Schmidt 237ab9c681 docs: efl_gfx: fill gaps in efl_gfx eo file documentation 2016-11-15 17:45:32 +01:00
Stefan Schmidt dbe01dd2b9 docs: ector: fill gaps in ector eo file documentation 2016-11-15 17:45:32 +01:00
Stefan Schmidt a198c2423c docs: efl_ui: fill gaps in efl_ui eo file documentation 2016-11-15 12:00:22 +01:00
Stefan Schmidt b768a365e6 docs: evas_canvas: fill gaps in evas canvas primitives eo file documentation 2016-11-15 12:00:21 +01:00
Stefan Schmidt 1abaecc481 docs: efl_vg: fill gaps in efl vector graphics eo file documentation 2016-11-15 12:00:21 +01:00
Stefan Schmidt 212fac6c37 docs: efl_input: fill gaps in efl_input eo file documentation 2016-11-15 12:00:21 +01:00
Stefan Schmidt f04d2817d2 docs: evas3d: fill gaps in evas 3D canvas eo file documentations 2016-11-15 12:00:21 +01:00
Stefan Schmidt 21e35157ec evas: fix typo in thread name setting for ecore-pipe
Thanks to Vincent Torri for pointing this out.
2016-11-15 12:00:21 +01:00
Guilherme Iscaro 883d41f006 evas focus: Do not allow two objects focused by the same seat.
Summary:
Before focusing an object, the intercept focus callback
is called. This callback may ask Evas to focus another object
instead, so it's necessary to check if the seat in question still
have a focused object event after a efl_canvas_object_seat_focus_del() call.

Reviewers: cedric, bdilly, barbieri, ProhtMeyhet, netstar

Subscribers: cedric, jpeg

Maniphest Tasks: T4864, T4886

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-11-14 10:24:57 -08:00
Cedric Bail 99b327598e evas: protect against wrong request to default seat.
Enlightenment kept crashing without this patch.
2016-11-12 13:56:24 -08:00
Guilherme Iscaro 17af933ae7 Evas: Change evas_canvas_default_device_get() to property.
Reviewers: barbieri, jpeg, bdilly

Reviewed By: bdilly

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4387
2016-11-09 11:24:07 -02:00
Jean-Philippe Andre bff8dcfe21 evas: Fix clipping of masks and masks of masks
When an object inside a genlist is masked, scrolling would
cause render issues as the mask is not redrawn on move (only
the clip geometry is marked as dirty and recalculated, the
mask pixels are assumed to be well prepared already). As a
result, masked objects in a genlist would not show up
properly once you start scrolling.

This fixes that by hacking into evas a safety test to avoid
unnecessary clipping, and by using parent masks even if they
are not the direct clipper.

Note that no_render is still quite broken (eg. a no_render
mask may cause major issues, even crashes).

This reverts 5917b49f59
2016-11-09 10:52:26 +09:00
Jean-Philippe Andre f909a6d6ea evas: Fix masks of masks and clippers of clippers in general
The root cause was simple: smart object clipped was not
calling efl_super() on clip_set.

Fixes T4813 (and probably a whole lot of other bugs)
2016-11-09 10:52:03 +09:00
Guilherme Iscaro 0e53b9a8ac Evas: Add support for multiple focused objects.
Using the multi-seat support, Evas is able to handle multiple focused objects.
This implementation allows one focused object per seat.
This patch introduces new APIs and events to handle this new scenario,
while keeping compatible with the old focus APIs.
2016-11-08 17:54:34 -02:00
Guilherme Iscaro add589c1b4 Evas: Properly set the device under legacy events.
If the user did an evas_device_push(), the event will contain the
pushed device, otherwise use the default devices.
2016-11-08 17:54:34 -02:00
Guilherme Iscaro fd4f17f315 Evas Events: Properly ref the Efl_Input_Devices. 2016-11-08 17:54:34 -02:00
Guilherme Iscaro 453770137f Evas: Add the default input devices for Evas.
This will be useful when Ecore_Evas is setting up the
EFL_POINTER/KEY_EVENT struct.
2016-11-08 17:54:34 -02:00
Guilherme Iscaro cb6b049987 Efl Input Hold: Increment/Decrement the device reference. 2016-11-08 17:54:34 -02:00
Guilherme Iscaro 6d668f011c Efl Input Key: Increment/Decrement the device reference. 2016-11-08 17:54:34 -02:00
Guilherme Iscaro 059bb53bec Efl Input Pointer: Increment/decrement the device reference. 2016-11-08 17:54:34 -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
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
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 095c8d2484 docs: efl_input: add missing docs for efl input pointer 2016-11-07 12:07:28 +01: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
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
Stefan Schmidt f742c8488c docs: efl_ui*: add docs for interfaces and events 2016-11-04 12:28:11 +01:00
Mykyta Biliavskyi 132bac98c8 Evas events: fix for works with pipes on windows.
Evil implementation of pipe() function uses sockets. Windows functions
"write", "read" and "close" doesn't works with sockets. In this commit
added macros, that replace "read" with "recv", "write" with "send" and
"close" with "closesocket".

@fix
2016-11-04 11:06:11 +02:00
Daniel Kolesa 4fa4be2b14 evas_textgrid: remove pointers 2016-11-03 17:13:30 +01:00
Daniel Kolesa df47f92236 evas_box: remove pointers 2016-11-03 17:13:00 +01:00
Daniel Kolesa 713df88b66 efl_canvas_output: remove pointer 2016-11-03 17:10:40 +01:00
Daniel Kolesa 01117bf898 efl_vg: remove pointer 2016-11-03 17:10:01 +01:00
Daniel Kolesa af45994679 evas_canvas3d_light: remove pointer 2016-11-03 17:09:22 +01:00
Daniel Kolesa db3bbe821f evas_canvas3d_node: remove pointers 2016-11-03 17:08:54 +01:00
Daniel Kolesa 418f68020f evas_canvas3d_primitive: remove pointer 2016-11-03 17:08:10 +01:00
Daniel Kolesa 137afa68ad evas_canvas3d_mesh: remove pointers 2016-11-03 17:07:46 +01:00
Daniel Kolesa b347c05f11 evas_canvas3d_camera: remove pointer 2016-11-03 17:07:15 +01:00
Daniel Kolesa 06e0473a79 evas_canvas: remove pointers 2016-11-03 17:06:28 +01:00
Daniel Kolesa cbe42ac34d efl_canvas_text: remove pointers 2016-11-03 17:05:00 +01:00
Daniel Kolesa d433f1e73c efl_canvas_text_cursor: remove pointers 2016-11-03 17:04:00 +01:00
Daniel Kolesa 3c4e0ff76e efl_input_event: remove pointer 2016-11-03 16:53:33 +01:00
Carsten Haitzler 51b2789a35 evas lang unicode tables - reduce memory by 24k+1324 bytes
so bu5hman pointed out a compile warning from clang that

 { 0x20000, 42711, EVAS_SCRIPT_HAN },

has 42711 exceeding a signed short. true. so this should be an
unsigned short. but this drew me to the fact the whole array could be
shorter by packing this short with the style memeber after it making
them pack into a nicely aligned 4 byte chunk next to the start unicode
value before it, thus chopping 1324 bytes off this table. even worse
the 8192 entry fast table above is using a full 32bits per entry where
they data they store is not even exceeding 7bits, so move this to an
unsigned char saving another 24k. this should reduce cache misses and
memory footprint and binary footprint of the evas .so files etc.

@fix + @optimize
2016-11-03 22:22:54 +09:00
Stefan Schmidt 049bf0247c docs: evas: document various type defines 2016-11-03 11:57:40 +01:00