We set the wayland surface to NULL in engine info, then destroy the wayland
surface later. The GL stack tries to render to the destroyed surface and
dies.
If we destroy the GL surface when we set the engine info (before we destroy
the wayland surface)it stops the GL stack from doing bad wayland calls.
This fixes a crash on exit, or when any window closes when using mali GL
drivers. Surprisingly, Mesa was tolerant of this.
Recently, the gl_cocoa engine started to crash at
startup. glGetIntegerv() in gl_common was called
without any gl context, and therefore segfaulted.
We now make sure it is called after a gl context
has been created and used.
Thanks jpeg for troubleshooting.
Fixes T4402
To properly implement EGL_KHR_partial_update we need to know the buffer
damage before any drawing operations take place. Add a new callback to
software_generic that takes place after combining of surface damage and
swap mode when we actually have this available.
Note: This means the three copy pasta implementations of
EGL_KHR_partial_update scattered around the tree are all wrong. bummer.
If buffer age isn't present we really want to return MODE_FULL, but we were
previously returning MODE_AUTO.
On recent mali drivers this resulted in accidental partial updates leading
to incorrect rendering.
Summary:
If native surface is multiple buffer pixmap such as named pixmap, Evas should recreate eglImage everyframe.
Because DDK get the buffer ID once at eglImageCreate time.
So if internal buffer ID is changed, should recreate eglImage.
Test Plan: Wearable Tizen.
Reviewers: wonsik, raster, cedric, jpeg
Reviewed By: jpeg
Subscribers: spacegrapher, dkdk, cedric
Differential Revision: https://phab.enlightenment.org/D4211
The previous commit exposed an issue with the region test
does not take into account the scale down factor.
Not a @fix in itself, as it depends on the previous patch.
Summary:
1) BMP loader support region decoding.
@feature
2) Fix an issue what BMP loader can't decode an 16bit image with bit field
@fix
Test Plan: attached sample codes
Reviewers: cedric, jpeg, jypark
Differential Revision: https://phab.enlightenment.org/D4228
This is reverts:
e4c641ed1e
build fix
19eb7b727fbf35620a13fb65b50d3056a484360e:
glx: Fix black windows in E on nvidia
For all extension functions, we need to match with the extension itself
since GetProcAddress() can return a non-NULL value even when the function
does not exist. Drivers can do a runtime mapping depending on the
context. So, we only trust the return value of GetProcAddress() when
we know for sure that the extension exists.
Thus, if a symbol exists we will always prefer it rather than relying
on GetProcAddress().
Also, glGetString(GL_EXTENSIONS) is now deprecated so we're lucky
it still works most of the time. glGetStringi() should be used
instead. This patch changes some of the use cases, but not all.
Fixes T3030 (again)
Fixes T4288
@fix
it serems some changes broke our buffer age querying - we were using
the wrong symbol... the EXT or ARGB onenot the core one which does
work. use that first. then we get buffer age.
@fix
Not sure how this got in there, but it looks like
gbm_surface_release_buffer was being called twice on the same buffer.
This should sort out the double-free mentioned in ref T4335
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Simply add support for EVASGL native surfaces.
I removed all code related to OPENGL surfaces (deprecated stuff
from old Evas GL).
Fixes T2936
Note that here are still some missing features in Evas GL
support on Wayland (at least pbuffers support is not implemented).
make coverity happy with CID 1347410 - it's technically right that the
code assumes the im ptr is valid until then as it dereferences it
until then and then stores it under pd->image but then checks for
NULL.. it would have crashed already if it were, so rmemove the
pointless check.
This fixes an issue from 19eb7b727f where the code
would no longer compile due to not finding noext_glXCreatePixmap in
the structure. This was due to the fact that this field was not
compiled into the structure if gl_gles was defined.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This fixes calls to glXCreatePixmap that would consistently
fail on nvidia >= 360.
It seems glXCreatePixmapEXT was used instead of glXCreatePixmap,
and that function always returned 0.
One could assume always using the non-EXT version of the
function should be preferred. Unfortunately, doing so for all
the other functions brings back the black windows.
I'm taking a very careful approach by doing this only for drivers
>= 360.
Fixes T3030
@fix
so our sysv shm segments were both over-permissive (nothing bad
really, just other users could read and write to/from our pixel data
destined for the screen... they could do this to x11 directly anyway
so no real issue), but be more restrictive and use 0600 as xserver
runs as root so can read/write anyway and we only want our own uid
access. but even more - fix our shm segment flushing to not keep lots
of segments floating about like a bad smell when we don't need them.
we had a cache but it wasnt flushed when it should be since async
rendering turned up. this fixes that and we're back to agressively
flushing them out when idle.
@fix
using map_bo/unmap_bo instead of gem_map_bo_gtt/gem_unmap_bo_gtt
results in a cacheable mapping and a large performance boost.
(dmabuf will still remain turned off by default for the release)
This removes the need for khronos_[u]int64_t as well as the special
typdef EvasGL[u]int64.
Hopefully this should work on all platforms (note: [u]int64_t is
used in Eina APIs, so it is already required for EFL apps).
Fixes T3200
When using a mix of vblank and pageflip events like we're stuck with now
a failed flip is going to happen sooner or later. We fix this by triple
buffering. We shouldn't turn off the custom ticker.
We need to be creating buffers with ARGB by default so that things
like Alpha/Transparency work when toggled. If we always create with
XRGB then toggling Alpha/Transparency state fails.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
Now, if image is native, do not recreate texture when image size is changed.
Recreate next native surface set time. So during the time between image_size_set and native_surface_set, native image is fragile. Fix it.
Test Plan: Local Test
Reviewers: spacegrapher, jpeg, wonsik, dkdk, raster
Reviewed By: raster
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D4153
So ok. haha. Amusing. But this is inappropriate.
1. It's not an INTENDED effect in theme so unless the theme ius doing
it - it shouldn't happen.
2. There are places to do this and it's NOT inside an engine. There
are high level filter and other mechanisms.
3. Actually this shouldn't be even done client-side. It should be done
compositor-side when moving a window around. Knowing velocity vector
etc. is useful to a client so the protocol can stay but doing the
animation client-side is "wrong". Some windows wobble and others do
not based on toolkit? really? sure we have to live with the CSD
difference but this? The compositor can do this JUYST fine. leave it
to compositor... OR do this properly with filters client-side. e.g. a
2d displacement map with evas filters would do the job as long as it
interpolates. If you want a way of forcing ALL objects in the canvas
to redirect to an intermediate buffer then do it up there at the
canvas level. It then works in GL and software, as opposed to only GL.
Also.... this is now causing issues for users:
<memeka> hi, from
https://git.enlightenment.org/core/efl.git/commit/?id=fb76fe55a52ac212b6870f1d74470a79ea5c5246
i run EFL_WAYLAND_DISABLE_WWW=1 terminology -> but it crashes in
wayland_egl/www.c in the setup_shaders function .... HELP?
so the fun was fune until we do a release (now) and until this causes
problems for users. Back to tried and tested code.
If you want to do this... do it right at the portable layers above.
...
Revert "wayland-egl: Fix use after free"
Revert "wayland_egl: Fix redirect to texture"
Revert "evas-wayland-egl: Add www protocol handling to wayland-egl engine"
Revert "gl_common: Add API for redirecting render to texture"
This reverts commit 2760afbb0e.
This reverts commit c937248eac.
This reverts commit c67f50b40a.
This reverts commit 0f7f4b6de0.
map struct allocation was not handled right - we assumed successthen
later checked for failure with an if() after using the ptr. this
should fix CID 1353722
Fix using mkstemp directly without securely setting umask first by
making use of eina_file_mkstemp function which does set umask.
Fixes Coverity CID1357164
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>