Summary:
Added test case for eina_list_data_idx function
Signed-off-by: Vivek Ellur <vivek.ellur@samsung.com>
Reviewers: cedric
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3287
Summary:
Thought, if realloc fails, its better to fail the test case than
continue.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: cedric
Differential Revision: https://phab.enlightenment.org/D3273
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
Returning from default would result in memory leak of f. Now the memory
is not leaked.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: cedric
Differential Revision: https://phab.enlightenment.org/D3272
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
This lib would be used in efl_network_websocket.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: cedric
Reviewed By: cedric
Differential Revision: https://phab.enlightenment.org/D3244
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
Use same way using color pick under GLES and not:
Use GL_RGBA texture insted of GL_RED
Generate and pass to engine 3 components color of mesh
See T2761
Reviewers: cedric, Hermet
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3135
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
Without this, selection can get cleared when changing focus.
For example, if we have 2 entries:
The first entry is focused and has a selection.
When we focus the second entry, we want to select all the text.
But the old selection gets unfocused and sends a clear signal
to the new focused entry and it gets unselected.
This should fix T2739.
Reviewers: raster, tasn, devilhorns
Subscribers: herdsman, thiepha, cedric
Maniphest Tasks: T2739
Differential Revision: https://phab.enlightenment.org/D3127
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
Common part will make savers and loaders shorter and easier for understanding and refactoring.
https://phab.enlightenment.org/T2713 - due to this task.
Should be merged after https://phab.enlightenment.org/D3030
Should be merged to start adding refactored savers and loaders.
Reviewers: Hermet, raster, Oleksander, cedric
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3038
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
Move model save/load to common3d.
Here also will be common algorithms and structures which will be used in all loaders and savers.
See task https://phab.enlightenment.org/T2713.
Reviewers: cedric, Hermet, raster, Oleksander
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3030
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary: This API builds vertex and index data of convex hull around the given mesh.
Reviewers: raster, perepelits.m, Hermet, cedric
Reviewed By: cedric
Subscribers: cedric, artem.popov
Differential Revision: https://phab.enlightenment.org/D2799
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
Add new API eina_strftime API in eina_str
@feature
Test Plan: test case and example also updated
Reviewers: tasn, cedric
Reviewed By: cedric
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3148
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
Add eina_tmpstr_manage_new, eina_tmpstr_manage_new_length APIs, these APIs create new tmpstr but reuse the input string memory.
@feature
Test Plan: Test case and example updated
Reviewers: tasn, cedric
Reviewed By: cedric
Differential Revision: https://phab.enlightenment.org/D3178
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
This API would be used in efl_network_websocket.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: cedric
Differential Revision: https://phab.enlightenment.org/D3200
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
Remove dead code
If anchor sel is not there, code inside
while can not execute.
Test Plan: NA
Reviewers: tasn, herdsman, cedric
Reviewed By: cedric
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3190
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
Object not created if theme source is not available.
In many case we dont need or define all the
theme sources for entry, even if the sources are
null, edje object is being created.
Test Plan: NA
Reviewers: tasn, herdsman, cedric
Reviewed By: cedric
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3199
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Commit 0cd59bb1 introduced the use of basename()
which needs libgen.h (hence winsock2.h before) on Windows.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This reverts commit 4b116627c2.
This can't be done, because the freeze state can change from within the
callbacks so you need to check if events are frozen every time.
This is faster in most cases, and to be honest, should be much faster
than it is. I don't understand why there's no better directive to mark a
variable as *really* important thread storage that is used all the time.
We don't really need the eo_id most of the time, and when we do, it's
very easy to get it. It's better if we just don't save the eo_id on the
stack, and just save if it's an object or a class instead.
It seems that the idea behind that optimisation, is to save object data
fetching when calling functions implemented by the object's class inside
functions implemented by the object's class. This should be rare enough
not to worth the upkeep, memory reads and memory writes, especially
since for all cases apart of mixins (for which this optimisation won't
work for anyway), the upkeep is more costly than fetching the data
again.
As we no longer have an fd handler to listen on the drm fd, we don't
need this function anymore
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: As we already call drmHandleEvent when we pageflip, we don't
need to be using an fd handler to catch them. This should fix T2791
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: If we already have a pending pageflip scheduled for a given
framebuffer, don't reschedule another one. This also includes a minor
fix when mmap'ing the framebuffer (previously was also mapped
PROT_READ).
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: drmHandleEvent will return 0 on success, or -1 on error. We
should trap for the error case so that we can cleanup any allocated
callback structures.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: In efforts to reduce tearing in the gl_drm engine, implement
support for eglSetDamageRegionKHR to mark parts of a surface as being
damaged.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
In efforts to reduce tearing in the gl_drm engine, find and link to
the eglSetDamageRegionKHR function so we can mark damaged regions of a
surface
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: If we are rendering using gl_drm, then we don't need to be
creating extra software dumb buffers.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: If we are running using gl_drm, then we don't need to create
software dumb buffers on the drm device. Since we may not have the
dumb buffers (only used in software rendering), then we should not
always be checking the framebuffer size against the dumb buffer size.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
The engine setup code already checks if we are disabling vsync
(defaults to on), so we should be setting the Outbuf vsync according
to what the engine info has
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
Fix Segmentation Fault when TEXT part getting resized and when it has
some params (for example ellipsis).
Fix T2640
@fix
Test Plan: Refer to T2640
Reviewers: raster, Hermet, seoz, herdsman, cedric, reutskiy.v.v, NikaWhite
Subscribers: stefan_schmidt, tasn, cedric
Maniphest Tasks: T2640
Differential Revision: https://phab.enlightenment.org/D2944
We see segfaults on Jenkins with these two test cases. Better check
before setting them as we had similar problems before on this setup
as XDG_RUNTIME_DIR might never be set.
SSLv3 has been compromised a year ago by what is known as POODLE
(https://en.wikipedia.org/wiki/POODLE). Every major browser have now
dropped support for SSLv3 and distribution are starting to do so also.
It is a good timing for us to do so, especially as it breaks build on
some distribution.
Summary: Support for using EVAS_NATIVE_SURFACE_WL was missing/incomplete in the
wayland_egl engine. This commit addresses that issue so that now the
wayland_egl engine can support both EVAS_NATIVE_SURFACE_OPENGL and
EVAS_NATIVE_SURFACE_WL.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: With linux kernels >= 4.2.x, the gl_drm engine was not
functional. This is due to the egl config returning an improper config
which did not match the expected pixel format. This commit fixes that
issue and gl_drm evas engine works again. Should fix ticket T2807
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: With linux kernels >= 4.2.x, we need to use
GBM_FORMAT_XRGB8888 when creating a new canvas else we end up with a
format mismatch when trying to add the framebuffer
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
While cached surfaces is a topic we're discussing recently,
this code is dead right now, and we will have to redesign the
buffer caching better to handle proxies, maps, smart objects, etc...
When the no_render flag was set on a proxy source, the object would
not be visible, but it would also not render inside the proxy surface,
which completely beats the purpose of this flag. This patch makes
the objects render inside a proxy surface.
On Windows, both backslash and slash can be used as file path
separators. Therefore, it is fixed to consider backslash as a file path
separator as well on Windows.
@fix
if a client added $home in the efreet extra desktops dirs, then
efreetd would detect and nuke cache, exit, causing a restart cycle
forever. this makes efreet simply ignore the errant dir so it can keep
working.
@fix
use env vars to determine module init for ecore-imf so you don't have
things like e locking up trying to init scim when running in wl mode.
do the same for ibus and xim modules too. do the inverse for wayland
imf module but here add also the check for ELM_DISPLAY that wasn't
there (like it is now in the other modules) so it is only initted on
wayland.
@fix
Summary:
According to my understanding of this function, this check of im_old is
redundant, as im_old will never be NULL. For im_old to be NULL, image should be
NULL. But that is checked at line 637. im is assigned image and im is checked for NULL. At line 654 im_old is assigned image and it is not modified till line 673. So this check would always return true and enter if case and would never
enter else case. So removing the redundant code.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: cedric
Reviewed By: cedric
Differential Revision: https://phab.enlightenment.org/D3233
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
Checking for NULL is redundant here, because if cfgs was NULL, then at
line 760 it would fail.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: cedric
Differential Revision: https://phab.enlightenment.org/D3238
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
This is not an ABI break as we never did provide the broken name symbol, just a typo
in the header that wasn't detected until now.
@fix
Signed-off-by: Vivek Ellur <vivek.ellur@samsung.com>
Reviewers: cedric
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3248
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary: In efforts to debug some non-working drm issues for people,
it would be helpful to know what drivers and versions they are using.
This commit just adds some debug printing for that information
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary; This fixes an issue where maximizing efl/elm apps in Weston
and in Enlightenment would cause extra space to be left around the
window.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: When we are told to resize the canvas, we should also be
resizing the gbm_surface. This should fix the issue of wl_drm module
in E not working when the canvas gets resized (WFM now)
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: If we go to setup a tty and it is already in graphics mode,
then there is no need to exit with a failed setup here. Instead, we
can actually continue to setup the tty.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Typos, lack of NULL check, excessive sizeof(type) not matching
the object type, no border set, etc... This all lead to a crash
and then no render (with an error message and then without...).
This also simplifies the implicit loading of ETC1 as ETC2 when
supported by the driver.
@fix
This reverts commit d1f863b272.
My test script was wrong, thus the test for this commit being a pass while it shouldn’t.
Moral: don’t code when you crave some sleep.
i found that intel drm device gives BROKEN timestamps vs system clock
- it is off by about 0.3 to 0.4ms - this means the vsync event is in
the future vs when we actually wake up and do processing - this leads
to bizare timelines and likely odd event and animation handling.
fix this by detecting it and figuring out an average delay and
offsetting events by that in future, but until then, use "now" when
the drm thread wakes up as the timestamp.
@fix
This reverts commit 22b45f220c.
eina_file_cleanup always does an eina_tmpstr_del. This is now capable of doing
double or even triple free in some case.
During a rework this bit got missed and made the build fail if ivi-shell was
enabled. Thanks a lot to aerodynamik for bringing this to our attention and
even pointed out the fix.
Fixes T2798
with eo id indirection on, a nul object is silently ignored as anok
error case (like free(NULL)). but if you turne eoid off in build its
all complaints to here and the black stump. fix this by making the eo
id "off" path match eo id on by making null objects silent.
@fix
so the evas thread renderer didnt START rendering until evas FINISHEd
walking all objects generating a render queue. this means all the cpu
time spend generating commands couldn't allow a parallel thread
actually go and DO the rendering.
this flushes the render thread every render command thus waking up the
render thread to work in parallel to the mainloop generating commands.
this actually means int he traces i see the render thread finished byt
he time evas_render completes thus brinign forward the frame display
by quite a bit.
thanks to evlog for pointing this out.
@fix
removing the klass member meant removing hooks and keeping cache small
but that meant not using it. this meand if the object is not an obj...
i removed the:
call->obj = _eo_class_id_get(call->klass);
line - seemed harmless/pointless. apparently not. so put it back but
use the klass there in local vars and not in call as it's not there
(and not needed).
fix.
in the case of operations which change framespace, rejecting resizes
at this point will cause the canvas to fail at resizing and result in a
partially-rendered canvas; the real canvas geometry must be calculated by
running the entire function in order to determine whether the resize is valid
fixes toggling borderless state of windows
Summary:
Add code to unit test to check if Eolian correctly recognize a struct
name as a struct type when it is used in a method.
Add new method to struct.eo to create this test.
Update struct_ref.c accordingly.
Reviewers: tasn, q66
Differential Revision: https://phab.enlightenment.org/D3213
we pass both the callcache and the op id - both are static and filled
in at runtime, so merge them into the same struct. this should lead to
better alignment/padding with the offset array and the next slot and
op fields, probably saving about 4-8 bytes of rame per method with no
downsides. also pass in only cache ptr, not both cache ptr and opid -
less passing of stuff around and should be better.
Add the edje signal "swallow", "unswallow", "text,set", "text,unset".
In edc file, the part name take a role of source.
If the layout should be changed when any object is swallowed or any
text is set, use this signal.
@feature
Due to the missing break we would fall into the next case here which might lead
to variables overridden with wrong values.
CID: 1261441, 1261440, 1261438
This seems to come from some intention to fetch dh from openssl somewhow but
it was never implemented. fh always stays 0 since its init and thus we can
remove the code it guards.
CID: 1288930
so. clang is wrong. end of story. it complains that i should add
braces to:
static Eo_Call_Cache ___callcache = { 0 };
WRONG. that is correct c99. 100%. you can add more {}'s and init every
field separately like {{0},{0},{0}} etc. or make it 1 or any value -
it doesn't matter... clang complains. clang is wrong. plain and
simple. this warning should just never exist. it is pointless.
but... peolpe won't shut up about clang warnings until i "fool" clang
into being silent by assuming the default 0 value of static storage.
this silences clang
BEWARE! this breaks eo ABI. _eo_call_resolve and _eo_data_scope_get
are 2 of the biggest cpu users in eo. they easily consume like 10-15%
cpu between them on tests that drive a lot of api - like simply
scrolling a genlist around. this is a lot of overhead for efl. this
fixes that to make them far leaner. In fact this got an overall 10%
cpu usage drop and that includes all of the actual rendering, and code
work, so this would drop the eo overhead of these functions incredibly
low. using this much cpu just on doing call marshalling is a bug and
thus - this is a fix, but ... with an abi break to boot. more abi
breaks may happen before release to try and get them all in this
release so we don't have to do them again later.
note i actually tested 4, 3, 2, and 1 cache slots, and 1 was the
fastest. 2 was very close behind and then it got worse. all were
better than with no cache though.
benchmark test method:
export ELM_ENGINE=gl
export ELM_TEST_AUTOBOUNCE=1
while [ 1 ]; do sync; sync; sync; time elementary_test -to genlist;
sleep 1; done
take the 2nd to the 8th results (7 runs) and total up system and user
time. copmpare this to the same without the cache. with the cache cpu
time used is 90.3% of the cpu time used without - thus a win. at least
in my tests.
@fix
in many cases edje dumbly calls eo_do() or evas_object_xxxx on objects
to set up their porperties when the part never uses that thing at al -
eg filters. the obnject never had filters and will not have them n3ext
- why always set filter to null every time? skip when not needed for
speedups.
so this fixes over-zealous calling whihc adds overhead that is not
needed causing battery drain and cpu usage, heat creation etc. etc.
@fix
1. according to svg path specification, path string may or may not contain ',' as the separator
with current parsing logic we were expecting a ',' after each segment.
2. relative cubic bezier parsing was wrong as we were not adding the current value to all 4 points.
3. refactored the parse_pair, parse_six and parse_quad to use same helper function
path1: "M7.279,2h35.442C45.637,2,48,4.359,48,7.271v35.455C48,45.639,45.637,48,42.723,48H7.279C4.362,47.997,2,45.639,2,42.727V7.271C2,4.359,4.362,2,7.279,2z"
path2: "M-2.073-7h36.147C36.796-7,39-4.793,39-2.073v36.146C39,36.796,36.796,39,34.074,39H-2.073C-4.793,39-7,36.796-7,34.072V-2.073C-7-4.793-4.793-7-2.073-7z"
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
Memory leak was caused by using the USE macro. So move the macro before
doing any allocation.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: cedric
Differential Revision: https://phab.enlightenment.org/D3183
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
Assigning to NULL has no effect in the function calling this. So changed it to void.
Some compiler complain about this kind of construct. It is better to use the (void)
construct for silencing unused parameter with different kind of configure option.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: cedric
Differential Revision: https://phab.enlightenment.org/D3180
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
Fix memory leak
Delimiter string is being saved using
eina_stringshare_replace without any del or free
when object is deleted.
@fix
Test Plan: NA
Reviewers: cedric, tasn, herdsman
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3201
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
when running in a wayland compositor, the ideal mode of operation is to
only prepare/send frames when the compositor has finished with the previous
frame
to achieve this, manual rendering can be toggled upon creating and completing
a frame callback, ensuring that a canvas never has multiple pending buffers at
any given time
fix T2784
The ecore_evas_fb module uses ecore_fb_ts_* functions which are only available to EFL internals and not for the general API.
However, EAPI not being defined in ecore_fb_private.h made the symbols not being exported at all, which in return made execution-time linking not finding them and thus failing.
in the case where a surface is created before the compositor binds its shell(s),
a shell surface would never be created
fixes case where internal windows would not create frames in enlightenment
@fix
Summary:
Fix memory leak
Delimiter string is being saved using
eina_stringshare_replace without any del or free
when object is deleted.
@fix
Test Plan: N/A
Reviewers: tasn, herdsman
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3175
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
The assigned value has no effect outside the function. So removing it.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: cedric
Differential Revision: https://phab.enlightenment.org/D3181
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
If realloc fails, lst would be NULL. So handling it.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: cedric
Differential Revision: https://phab.enlightenment.org/D3182
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
Null assignment has no effect in the caller function. So removed it.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: cedric
Differential Revision: https://phab.enlightenment.org/D3184
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
In a different scaling environment, wrong comparison of min values causes resize issue as original size is compared instead of scaled size.
Signed-off-by: Shilpa Singh <shilpa.singh@samsung.com>
Signed-off-by: Subodh Kumar <s7158.kumar@samsung.com>
@fix
Test Plan:
Create a layout with some min size and swallow a resizable layout inside the layout.
the parent layout will not expand even when the height has crossed its min size.
Reviewers: cedric, tasn, raster
Subscribers: subodh6129
Differential Revision: https://phab.enlightenment.org/D3185
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
In evas table that homogeneous mode is turned off,
the size of items in cells, whose rowspan or colspan is larger than 1
and horizontal or vertical padding exists, are miscalculatd.
T2655
@fix
Test Plan: elementary_test "Table Padding"
Reviewers: Hermet, cedric
Subscribers: cedric, DaveMDS, Hermet
Differential Revision: https://phab.enlightenment.org/D3192
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
we use a bit more memory than we need by having unused fields for
shaders. the old binary data ptrs and size fields we just have not
used for years now as we dont compile in shader binaries anymore as no
living drivers need this anymore. so this removes that with no actual
side-effects.
no shortcuts. we used the same img sharder for pixles as for native
surf. so need new shaders to do the swiszzling. add them all,
generation scripts metadata and enums etc.
@fix (along with previous 3 commits)
this fixes rendering on ppc (bigendian) where we have thnigs swizzled
oddly. not bgra -> argb but rgba -> grab ...
so generate a bigendian shader file and use if on bigendian.
this should fix T2721
it fixes it in the visual screenshots i can get remotely.
so we do a bit of error handling like does a stack fail to allocate,
does setting the tls var fail, have the stack frames been nulled or
not allocated, etc. - these acutally cost every call because they mean
some extra compare and branches, but ore because they cause a lot fo
extra code to be generated, thus polluting instruction cache with code
and cacheline fetches of code that we rarely take - if ever.
every if () and DBG, ERR etc. does cost something. in really hotpath
code like this, i think it's best we realize that these checks will
basically never be triggered, because if a stack fails to grow... we
likely alreayd blew our REAL stack for the C/C++ side and that can't
allocate anymore and has already just crashed (no magic message there -
just segv). so in this case i think this checking is pointless and
just costs us rather than gets us anything.
when a render occurs, frame callbacks must be managed in order to ensure
successful rendering for future frames. the best place to do this is in the
engine here, since this is the lowest-level place which has access to both
the wl_surface as well as the evas rendering state
ref T2784
This reverts commit bd83d4c03a.
adding an animator (and then not managing its ticks) causes the animator
to fire constantly. in this case, it was causing 100% cpu usage and forcing a
compositor re-render for every frame regardless of damages
This causes a significant speed up (around 10% here) and is definitely
worth it. The way it's done lets the compiler cache the value across
different eo_do calls, and across the parts of eo_do. Start and end.
This breaks ABI.
This may look like an insignificant change, but it doubles the speed of
this function, and since this function is called so often, it actually
improves my benchmarks by around 8%.
This breaks ABI in a harmless way, and it will give us the ability to
drastically improve Eo in the future without breaking ABI again, thus
allowing us to declare Eo stable for this release if we choose to.
My previous patch to this piece of code
(37f84b7e96), caused a significant
performance regression. This is such a hot path, that even accessing the
strings when we don't have to slows things down drastically. It makes
more sense to just store it in the structure.
This commit breaks ABI (though most people probably won't even need to
recompile anything else because of the memory layout).
It was discussed on IRC and was decided this is a big enough issue to
warrant a fix during the freeze.
@fix
evas_object_clipees_has is far cheaper than evas_object_clipees_get in case of checking if
clipees exist or not. This should improve the performance in case of large set of clipees.
@fix
evas_object_clipees_has is far cheaper than evas_object_clipees_get in case of checking if
clipees exist or not. This should improve the performance in case of large set of clipees.
@fix
While OSMesa may support surfaceless contexts, we don't support
them yet in the SW engine. Instead of switching to NULL, NULL,
let's error out and do nothing instead.
If the current context & surface are already null, avoid
calling eglMakeCurrent again, since it can return an error
(EGL_FALSE but with no error code, thanks Nvidia).
Summary: this patch fixes crash caused by accessing the text_input_manager in wayland_im_context_add().
Test Plan: N/A
Reviewers: jihoon
Reviewed By: jihoon
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3176
Summary: As we now have per-window timer-based animators in
ecore_wayland for frame callbacks, we no longer should be using Custom
animators to handle surface frame callbacks
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This moves window animators (for frame callbacks) to not use
a custom animator source but rather use a timer-based source. This
also moves animators to be per-window based (in that an animator is
created per-window).
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This could lead to some very long and unexpected pause as the timeout passed
to eina_condition_timedwait was passed as a absolute time instead of relative.
Hopefully we don't build rocket.
Summary: clang reports that these static variables are not being used
anywhere (and grep confirms this), so remove them.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: clang reports missing field initializers for usage of vt_mode
structure, so add the missing initializers
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Evas_Object_Filter_Data has a bool for 'async' at the end of the
struct. This field was missing from the initialization of
'default_state'
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Since @raster changed the behaviour of the dirty flag on images,
damages must be added to redraw the GL surface. Evas_Image checks
if it is an Evas GL surface by looking at its native surface.
But in case of SW engine, there was no native surface information
for Evas GL surfaces. Also, the OPENGL surface type was awfully
abused for OSMesa support. Luckily EVASGL surface type lets us
pass arbitrary pointers :)
For now this only covers SOME of Evas GL's functions.
It will try to run with opengl_x11 and buffer (OSMesa). It'll also
try to fail silently if the engine initialization failed, or if
OSMesa could not be found. If the engines work, then Evas GL must
work properly.
This is only one step into making the software engine actually
work the same as a proper GL engine from Evas GL APIs point of view.
This is necessary for the test suite (coming next).
Show an error message and call make_current(NULL, NULL) only if
the object (context, surface) being destroyed is current.
Otherwise, avoid changing the current context & surface.
For me on a intel driver val is -1 and it needs to be inverted.
So we need to checkout that val is not 0 and not equals to 1.
Thx to raster for helping debugging this thing :).
lib/eina/eina_util.c: In function 'eina_environment_tmp_get':
lib/eina/eina_util.c:96:7: warning: 'tmp' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (!tmp) tmp = "/tmp";
^
As spotted by @FurryMyad I inverted the logic for source_clip.
This should restore the proper behaviour while keeping my previous
fixes working. See D2940.
As all Mouse and Keyboard events comme from Cocoa, the poll period must
be reduced. Backwards of this method is that when no signal are
received for a long period, the timer fired anyway and consumes CPU
for nothig but it seems there is no easy method to integrate NSApplication
mainloop into an existing one.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary: If we do not include unistd.h, we end up with implicit
declaration warnings when compiling
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Actually copying max is pretty useless and super slow. We usually have something
like 1024 slot in a context, but a very small amount of them are acutally active.
It would be better to actually do some kind of copy on write technique here, but
as Eina_Cow doesn't handle array and we are close to a release, let's be
conservative.
As reported by vtorri, sometimes ecore_exe on win32 will encounter double
free issues. This was because the variable was freed, but not set to NULL
as expected by the cleanup function.
Fixes T2675
@fix
This reverts commit f51168f4ec.
if this is right or not... this RESULTS in enlightenment becoming
totally unusable. put this back WHEN other issues are fixed you think
that exist. last i knew we query yinvert start with glx per native
surface and use that info - so as best i know it is and has been right
for a long time.
:)
This fixes the CPU to be usedat 100% for each thread in ecore_exe. This
is obviously not an ideal fix and will be improved in the future.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
On windows, stat() returns -1 if a path is finished with a \ or /,
so replace all stat() calls with a function which removes the trailing
slash or backslash on Windows
At this stage the code duplicate many code path for avoiding potential
borkage on Unix system. During 1.17 release cycle, it would be nice to
refactor this piece.
@fix
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Output and error threads could not read all the data sent by the child.
Based on a patch by Guillaume Friloux
@fix
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Named pipes created with CreateNamedPipe() must have a unique name,
so append the process Id to the name
@fix
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
The assignment to size has no effect on the caller and compiler
complain about it. Do shutdown compiler complain in a more reliable
way.
Signed-off-by:
Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: cedric
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3156
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
When an edje program attempted to play a sound that was not registered
(e.g. in a sounds{} block), edje_cc would segfault instead of throwing
an error.
@fix
Reviewers: cedric
Reviewed By: cedric
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3171
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary: If we have already resized this ecore_evas to be what we
want, then there is no point in running the below resize code as we
should already be at the requested size. Add a test at the beginning
to see if we have already set these values
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
_ecore_x_modifiers_get() causes multiple XGetModifierMapping requests to the
server through _ecore_x_key_mask_get() function. _ecore_x_key_mask_get()
requests XModifierKeymap pointer every time it gets executed.
This can be optimized by a single XGetModifierMapping request in the
_ecore_x_modifiers_get() function itself and then passing the XModifierKeymap
pointer thus retrieved to the _ecore_x_key_mask_get() function.
Reviewers: raster, Hermet, tasn, zmike
Subscribers: yashu21985, alok25, sachin.dev, singh.amitesh, cedric
Differential Revision: https://phab.enlightenment.org/D3166
for framespace
Summary: As we have already adjusted for framespace in various code
leading up to a configure callback, don't adjust for it here. This
fixes an issue where xdg surface window geometry would get incorrect
values which were including framespace. The values of the
xdg_surface_set_window_geometry should be Just the geometry of the
visible window.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: ecore_wl_window_resize adjusts the internal representation of
the window size so this should not include the "framespace" also. This
fixes an issue where xdg surface would be getting an incorrect window
geometry which included framespace.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
function
Summary: As we call ecore_wl_window_update_size from various places
when needed, don't call it inside the resize function. This addresses
an issue where sizes for the Ecore_Wl_Window may be out of sync
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
In a rare situation the filter would access an invalid buffer.
Solution: Stop messing with buffer references by properly
referencing and releasing them when not needed, rather
than stealing references and hoping for the best. (There were
flags tracking stolen references, but that was still madness)
This was broken because the wrong image size was used
in the proxy's fast path (proxy of another image).
Why did snapshot use a specific surface_w,h instead of
reusing the usual cur->image.w,h? (@cedric)
Simplify code.
when fixing something like a leak .. it might be good to fix it to not
CRASH 100% of the time. a leak (minor) is better than a crash by far.
the strings in the list are stringshared.
fixes 896c18045a
Summary:
xcb_get_modifier_mapping_reply_t *reply is obtained from
xcb_get_modifier_mapping_reply and should be freed after use.
Reviewers: raster, Hermet, tasn, zmike
Subscribers: singh.amitesh, yashu21985, alok25, sachin.dev, cedric
Differential Revision: https://phab.enlightenment.org/D3167
@fix
Following this patch, the correct enum type is now passed to this
function. It's also passing the same value (0), but now from the correct
enum. This doesn't change behaviour, and looks like what was intended.
This fixes the clang warning.
Summary: As we do not listen for surface enter/leave events, we do not
need these functions so comment them out.
Thanks to Tom for the report :)
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: As session listener is currently disabled in Ecore_Wayland,
we don't need these functions defined so comment them out.
Thanks to Tom for the report :)
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Double parenthesis comparison is reserved for evaluation for assignment, not just comparison.
So for example you should do ((x = 2)) and (x == 2), but not ((x == 2)) or (x = 2).
Due to a misplaced semicolon, EINA_LIST_FREE was doing nothing and only
the last part was freed if there was one, and probably a crash if there
wasn't.
This shows again that having statements without {} is dangerous. We need
to force {} and add a lint rule, or at the very least, add a rule to put
the ; in a new line (like clang warns about by default anyway).
(Same as issue found in previous commit)
@fix
Due to a misplaced semicolon, EINA_LIST_FREE was doing nothing and only
the last part was freed if there was one, and probably a crash if there
wasn't.
This shows again that having statements without {} is dangerous. We need
to force {} and add a lint rule, or at the very least, add a rule to put
the ; in a new line (like clang warns about by default anyway).
@fix
This is probably not an issue because the function should always
return a value, but initialising this variable silence clang's
warning and is not harmful anyway.
We use function names instead of function pointers of Windows, because
of dll import/export issues (more in a comment in eo.c). Before this
commit we were comparing the pointers to the strings instead of the
content in some of the places, which caused op desc lookup not to work.
This fixes that.
Thanks to vtorri for his assistance.
@fix
Summary:
Checking if client is NULL before freeing is not of much use. If it is NULL, it would have crashed before when it was dereferenced in printf. So checking NULL before dereferencing.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: cedric
Reviewed By: cedric
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3151
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
The assignment of NULL will have no effect on the caller. So removed that statment.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: cedric
Reviewed By: cedric
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3153
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
realwin is uninitialized and is being checked against 0 at 384. It is set at 377 only if win2 == win, else it remains uninitialized. So initializing it to NULL.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: cedric
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3154
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
If realloc fails, then lst would be NULL, so assigning lst[i] only if realloc is successful, else assigning lst to previous memory location.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: cedric
Reviewed By: cedric
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3155
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
When fd handler is deleted by ECORE_CALLBACK_CANCEL, _ecore_main_fdh_poll_del() is not called.
So fd still exists in epoll's event pool.
Reviewers: raster, seoz, woohyun, Hermet, cedric
Reviewed By: cedric
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3131
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
so there is an issue that e brings out where configure events get
queued and deferred AND e ends up requesting a new size, but new size
is wrong as its read from an old event (requested size is updated) and
in the end ecore-evas doesnt request the actual new size because
current w/h is "the same" even though it isn't... bah - it's complex
and a self-feeding event issue. just doing the move/resize solves it.
@fix
Summary: A previous code change to the common code which processes
updates is relying on having the ecore_evas->draw_ok flag set in order
to process updates. This change makes sure that ee->draw_ok is in sync
with canvas visibility.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
processing updates
Summary: When processing render updates, we should be checking if the
Ecore_Evas "should be visible" property is set.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: As we loop the regions of the output buffer and accumulate
changes to post, we should be freeing the rectangles when we are done
with them.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: Seems we were never setting any merge_mode for the
wayland-shm engine. This fix implements setting merge_mode
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
If the filtered object (text or image object) was deleted, its
output image (cached inside the filter data) would be freed
immediately. This could cause crashes in case of async rendering.
@fix
if there is an identity signaure at the end, ONLY check it if it looks
like a real one (correct magic number, cert and sig size fields are
sane etc.). this means eet opens dont fail for files that may have
trailing garbage or padding that is not an eet identity signature.
If the textblock object was not visible in the main canvas, but
still needs to be rendered in a proxy surface, then _relayout may
not have been called. This forces generation of paragraphs based on
the current geometry.
This patch is ugly. I know. This is evas render :)
This is an ugly hack to fix an issue reported in D3114. I don't
understand how the proposed patch could even fix anything given
the current situation.
Test case:
- Create edje object with textblock inside
- Clip out edje object (--> all children become not visible)
- Take textblock from edje and set it as source of a proxy
- Mark proxy as source_clip
Result: Nothing visible.
Expected: Proxy should contain the textblock object, since
source_clip means we ignore the edje object's clipper, and
only care about the textblock's clipper (entire canvas).
Here's what was happening:
- During a first pass, textblock is not visible, cur->cache.clip
is calculated, marked as clip_use=1 with geom 0,0 0x0
- In a second pass, the proxy is rendered, which needs to draw
the textblock in a surface. But cache.clip was used and it was
wrong.
Solution:
- Ignore cache.clip when rendering inside a proxy. I'm pretty
sure there are other instances where cache.clip will still
be a problem.
Problem: textblock never called relayout since it was not
visible.
Conclusion: cache.clip needs to die. It's a legacy optimization
that now causes more issues than it fixes.
Summary:
Xprint has been deprecated since 2008.
It's recently (August 2015) been removed from debian.
Reviewers: zmike, devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3150
Summary: Disable async rendering for EGL engine as EGL is sync only.
This fixes gl_drm engine to work (in my tests) using ecore_evas
example apps.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This adds support for ecore_wl to handle ecore animators and
thus the egl engine can receive frame callbacks now.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
the overhead didnt show up in y tests. do show up with certain
expedite tests. hmmm. last time i messed with region code it was
actually same speed as tiler. bonus was it was fully accurate.
calculating updates has been re-rendering centers fo solid rects if
the solid rects moves/resizes with a lot of overlap and objects
underneath changes - their changes show through. this fixes that
@fix
I'm not actually sure if it's a false, because finding the possible
options is hard. Just to be safe, it's better to set buf to "" in the
else case. I'm doing this instead of initialising the variable so the
compiler/static analyser will be able to warn us if there are other code
paths that should probably set buf, but don't.
CID 1316016
@fix
Gist of it: we check, and then there's a window between our check and
the mkdir. We don't really need it anyway, because we just want to mkdir
and if it exists, just go on and do nothing.
CID 1039559
CID 1039558
@fix
Coverity was complaining about a possible integer overflow. This isn't
actually possible, but coverity has no way to know that because we were
in fact using a too big of a type. I fixed it to be the right type so
now everything should work.
CID 98384
@fix
Summary:
There were warnings after adding primitive in the same frame more then once, the check was added to avoid it
@fix
Reviewers: cedric, raster, Hermet
Subscribers: cedric, artem.popov
Differential Revision: https://phab.enlightenment.org/D3090
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
Fix children size and position calculation when padding is used
For each child size calculation padding is adjusted
but box height should include padding.
Secondly, x and y position of children should not include
the vertical and horizonatal padding as child size has already
included the given paddings.
@fix
Test Plan:
Please modify test_box.c file in
function test_box_vert2 as follows:
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
elm_box_padding_set(bx, 50, 50);
elm_box_layout_set(bx, evas_object_box_layout_flow_horizontal, NULL, NULL);
evas_object_show(bx);
Now,
1. open elementary_test
2. box
3. Box vert 2 (observe box is broken)
4. Try resizing the window (observe)
Reviewers: raster, cedric
Reviewed By: cedric
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D3049
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary: The current poll backend code uses only filename when reporting changes, while eio tests (and presumably other backends) use absolute path. This makes poll backends behavior more consistent with other backends.
Test Plan: Ran eio test suite with poll backend.
Reviewers: cedric
Reviewed By: cedric
Subscribers: cedric
Projects: #efl
Differential Revision: https://phab.enlightenment.org/D3083
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This removes code that became dead in commit:
389c6d35f2
The commit doesn't explain why we don't shrink or grow when using mmap,
but this is how it is. No reason to keep old code there.
CID 1240224
@fix
This reverts commit 05c18876b3.
i endabled backtraces by DEFAULT because it is otherwise pretty damned
hard to get them from things like enlightenment, or on tizen apps as
running them on the cmdline and having them work is close to
impossible. yes it's noise. FIX THE ERRORS then. this commit is just
like turning off gcc etc. warnings because the code is too noisy in
compilation with them on. it's a bug. fix it. the bt lets you do that
without gdb or re-executing AGAIN with an env var and HOPING to find
the bug the next time around.
not to mention efl programming docs cover this backtrace and say it
is on by default and how to get useful info out of this. this makes
the elf docs a lie by removing what is documented as default.
@fix
changes zmike made to e's systray make e abort due to libdbus seeing
the bus name as invalid. it actually is. it's
/org/ayatana/NotificationItem/steam for example - instead of
or.whatever.blah - thuis e aborts continually if you run steam at all.
eldbus should be more crash-proof thus this adds checks so dbus fun
doesnt cause an app to crash if it happens to call incorrect dbus names.
@fix
valgrind pointed this one out. we access freed memory when we dup a
context because the context CONTAINS ptrs to things like rects for
cutouts. we didnt dup these. use the proper context dup call (and
properly ref pixman color image too). this was a random bug/crash
waiting to happen and valgrind caught it. suprising it hasnt turned up
before :/
@fix
All examples and docs point to using only the dirty flag in
order to trigger a redraw of an Evas GL surface. The commit
21c4352823 broke this behaviour (for a good reason, but not
related to Evas GL).
This is a compatibility fix.
While this seems to go against the rest of the API (because we
always pass in the Evas GL object), there is no way right now
fully restore a context if there are multiple Evas GL objects.
For instance, an app can use Evas GL from an Elm GLView, and also
use Cairo with another Evas GL at the same time. In that case Cairo
needs to restore the previous Evas GL but the library had no way
of getting the current Evas GL. This is the equivalent of
eglGetCurrentDisplay().
@feature
Summary:
there is a problem with _eldbus_message_iter_arguments_vget.
Assume: We have a array of type y, there are 3 elements in the array.
Lets say we are iterating with
printf("%c", dbus_message_iter_get_arg_type(iter));
and
dbus_message_iter_next(iter);
throuw the iter.
You will see that this will output yyy. As we are having 3 times v.
While the signature of the message iterator is y.
If you now call eldbus_message_iter_arguments_get(message, "y", &cont)
it will return false, with the errormessage in line 766, reason for this
is that the type of the signature iterator differs from the message
iterator. Because of the upper example.
So all in all: The signature given to the method has not to be equal to
the signature of the message iterator, it has to be equal to the
iterated signature, which cannot be found easily with the eldbus api.
The solution is to only iterate in the message iterator that long until
the signature iterator is at the end, if the type differs in this
region, give a error and return false. Otherwise return true.
The sad thing about this is that it is a behaviour break, but the
behaviour is borked, so its a fix.
I tested this over a week now, without any problem in efl/elm/e.
Reviewers: stefan_schmidt, zmike
Reviewed By: stefan_schmidt
Subscribers: zmike, ceolin, simotek, DaveMDS, cedric
Projects: #efl
Differential Revision: https://phab.enlightenment.org/D3074
This set of documentation update basically make it clearer that Eio
use Eina and do cross linking of function used by Eio to Eina. It
also copy some of the warning coming from Eina documentation into Eio.
Summary: We really don't need to be allocating a shm pool this large
during resize, so reduce the size of the pool.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This just adds support for 'smart' merge mode in the evas
gl_drm engine to keep in line with gl_x11 engine.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This just adds support for 'smart' merge mode in the wayland
egl engine to keep in line with the gl x11 engine
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Strangely only the other states were checked for errors. Errors
include:
- no name for state, or "description with missing state"
- invalid clip_to
Also improve the error message a bit
Without that, the image has no fill information. Fill properties
may need to be added to SNAPHOT parts but the default behaviour
should make sense. Before this patch you just get a black rectangle.
Considering how image filters currently work, marking snapshots
as filled by default is not the best solution (need padding_set(0)
to render nicely).