Commit Graph

31955 Commits

Author SHA1 Message Date
Carsten Haitzler 2eaf33d9cf evas gl common - remove unused struct fields from shader src to save mem
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.
2015-10-19 17:06:06 +09:00
Carsten Haitzler 548addbb02 evas gl - fix big endian fully by adding a host of new img shaders
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)
2015-10-18 18:45:11 +09:00
Carsten Haitzler b70f02a652 evas bigendian fix - only fix img shaders as only these src pixels 2015-10-18 15:49:23 +09:00
Carsten Haitzler 7b568a6152 evas gl fix color on bigendian with gl engine
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.
2015-10-18 12:49:11 +09:00
Carsten Haitzler 94ebd96df5 eo - another 1.5 percent speedup in eo_bench eo_do by removing err handl
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.
2015-10-17 11:42:46 +09:00
Carsten Haitzler 1a135fdfb1 evas - clean if check to be a single return point for clarity
if (a) return;
if (b) return;

->

if ((a) || (b)) return;
2015-10-17 11:19:06 +09:00
Mike Blumenkrantz ef89bfbbed ecore-evas-wayland: add frame callback listener during render
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
2015-10-16 15:55:40 -04:00
Mike Blumenkrantz 5ad3c6358f Revert "ecore-wayland: Redo window animators to not use Custom source animators"
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
2015-10-16 15:55:40 -04:00
Tom Hacohen 07ea62419a Eo do: Reuse stack fetching across eo functions.
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.
2015-10-16 16:38:46 +01:00
Tom Hacohen 3ee44dcef0 Eo do: optimise getting the thread call stack for the main loop thread.
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%.
2015-10-16 16:38:44 +01:00
Tom Hacohen b61556aa87 Eo: Move mainloop checks inside Eo.
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.
2015-10-16 14:53:22 +01:00
Tom Hacohen 8e2e7bd61e Eo events: Add a struct member marking if it's a legacy event or not.
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
2015-10-16 11:55:07 +01:00
Jean-Philippe Andre 561481f6ad Evas GL: SW engine CID fixes
Following previous changes, there was unreachable code.
- CID 1327421
- CID 1327420
2015-10-16 10:49:34 +09:00
Jean-Philippe Andre c927f6e4ea Evas: Fix image orientation with GL engine
Fixes T2738

Not sure what to do if yinvert is true. How to handle image
orientation then? Flip vertically on top of the current orientation?
2015-10-16 10:49:34 +09:00
Carsten Haitzler a47d14e246 evas - add another layer->evas check in addition to layer
fixes T7215
2015-10-16 08:27:10 +09:00
Carsten Haitzler 0bca7af2e8 evas - was missing evlogs for the threaded rendering handling - fix 2015-10-15 19:29:40 +09:00
Amitesh Singh 048b5f70e5 edje: load - use evas_object_clipees_has instead of evas_object_clipees_get
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
2015-10-15 15:04:23 +05:30
Amitesh Singh 8e87e56a7c evas: render - use evas_object_clipees_has instead of evas_object_clipees_get
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
2015-10-15 15:02:22 +05:30
Vincent Torri 11846b406b Tests: use eina_environment_tmp_get() 2015-10-15 09:34:33 +01:00
Jean-Philippe Andre 7b401f34da Evas GL: Add more tests
- glReadPixels
- FBO test
- PBuffer test (only GL engine)
- surface formats test (up to depth=24, stencil=8)
2015-10-15 16:20:53 +09:00
Jean-Philippe Andre f6fd05ff74 Evas GL: Add test case for surfaceless contexts 2015-10-15 16:20:53 +09:00
Jean-Philippe Andre e09a4094be Evas GL: Add EGL_KHR_surfaceless_context since it is supported
See 3e39bf3638.
Surfaceless contexts are supported even if the driver does not
support them.
2015-10-15 16:20:53 +09:00
Jean-Philippe Andre 9c69d4c1e1 Evas GL: Error out on surfaceless make_current with OSMesa
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.
2015-10-15 16:20:53 +09:00
Jean-Philippe Andre 079436d4f1 Evas GL: Don't call eglMakeCurrent if already null
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).
2015-10-15 16:20:53 +09:00
Seunghun Lee 261f083c4e ecore_imf/wayland: Add NULL check for text_input_manager.
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
2015-10-15 14:16:56 +09:00
Cedric BAIL 229106963a evas: no need to compute clippees list if we just want to know if there is any.
This is a partial fix for a terrible performance scenario where application take
forever to close with a large number of edje object.

@fix
2015-10-14 16:18:37 -07:00
Tom Hacohen 535076f425 Eo: Fix confusing indentation and style. 2015-10-14 20:43:07 +01:00
Chris Michael e7211c1517 ecore-evas-wayland: Don't use custom animators for frame callbacks
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>
2015-10-14 14:56:17 -04:00
Chris Michael bd83d4c03a ecore-wayland: Redo window animators to not use Custom source animators
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>
2015-10-14 14:54:54 -04:00
Cedric BAIL c4117cdae4 ecore: fix usage eina_condition_timedwait to use relative time instead of absolute time.
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.
2015-10-14 11:03:21 -07:00
Amitesh Singh 63634ccd30 evas filter: silent coverity on self assignment
This is a false alarm. Just to make coverity happy, use eo_do
instead of eo_do_ret

CID: 1316017
2015-10-14 21:08:20 +05:30
Chris Michael 897132245f edje_edit: Fix clang warning of unused variables
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>
2015-10-14 09:43:12 -04:00
Chris Michael febae611a7 ecore-evas-wayland-egl: Fix clang warning about extra parentheses
@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-14 09:39:52 -04:00
Chris Michael a2c1faef70 ecore-drm: Add missing field initializers for vt_mode
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>
2015-10-14 09:37:20 -04:00
Chris Michael 3fb78e137b evas: Fix clang warning for missing field 'async' in default_state
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>
2015-10-14 09:28:47 -04:00
Jean-Philippe Andre 425265ca6d Evas GL: Fix support for the SW engines (OSMesa)
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 :)
2015-10-14 20:14:51 +09:00
Jean-Philippe Andre 045f774c27 Evas GL: Improve ERR log (direct rendering failed) 2015-10-14 20:14:51 +09:00
Jean-Philippe Andre 93298d6dc2 Evas GL: Add a test case for Evas GL (make check)
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.
2015-10-14 20:14:51 +09:00
Jean-Philippe Andre a23fcb8b71 Evas GL: Implement glGetString wrapper for OSMesa
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).
2015-10-14 19:46:47 +09:00
Jean-Philippe Andre ec7111938c Evas GL: Minor changes inside glGetString 2015-10-14 19:46:47 +09:00
Jean-Philippe Andre 86d1b190c2 Evas GL: Avoid make_current(0,0) during destroy
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.
2015-10-14 19:46:47 +09:00
Marcel Hollerbach a1be855fe4 gl_x11: val can be everything expected 0 to mean true
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 :).
2015-10-14 11:14:02 +02:00
Vincent Torri d8008f4625 Eina: fix memory leak in eina_file_open()
@fix
2015-10-14 09:44:48 +01:00
Vincent Torri 8854b9f727 Eina: fix eina_file_current_directory_get()
the length was not correctly computed and eina_file_path_sanitize() was
was writing beyond the limit of the string

@fix
2015-10-14 09:44:48 +01:00
Vincent Torri cfe1817315 Eina: fix spelling in eina_tmpstr documentation 2015-10-14 09:44:48 +01:00
Vincent Torri 5e035d7a73 Evil: set EAPI correctly in pwd.h 2015-10-14 09:43:34 +01:00
Carsten Haitzler ef59dc702c evas gl engine - typo remove from previous commit
some typo crept in that... compiled. a stya / on a line. how it
compiled, i don't know.
2015-10-14 15:17:06 +09:00
Carsten Haitzler 620dc45af9 evas - obj destructrion - handle when obj layer is partly destroyed
this should fix T2715 and anything similar as during destruction
object internals are a bit weird.
2015-10-14 14:50:54 +09:00
Carsten Haitzler 094b781b7f evas - fix evlog to push and pop properly 2015-10-14 14:50:53 +09:00
Amitesh Singh b8ab388710 eina: util - set tmp to NULL to fix compilation warning
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";
       ^
2015-10-14 09:19:35 +05:30