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.
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
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>
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 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:
_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
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.
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
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>
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:
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>
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
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