eglGetProcAddress should be queried with dlsym unconditionally. What we
had could query it with other extended forms of eglGetProcAddress, which
is probably not what anyone wants.
Also, throwing away the weird extended forms because there's a good chance
our other gl bits don't run on any stacks that don't support normal
eglGetProcAddress.
Commit fcef8d8392
breaks any evas engine that frees/NULLs its own outbuf before
calling evas_render_engine_software_generic_update()
We should unconditionally set the outbuf, we only need to
do the free conditionally.
evas_render_engine_software_generic_update(0 definitely is wrong where
it wants to always free the outbuf even if the buffer passed in is the
same one and thus it ends up being freed and now invalid. fix it
@fix
Because we async render into buffers before the compositor has told us
we can use them, we can end up kicking over to fallback while still
rendering into a buffer.
Refcount the manager to let us clean up properly without crashing when
this happens.
If we render fast enough we can use more than one buffer before the
compositor assigns us buffer ids. We need to be careful to clear the
busy bit on all but the most recent one.
Enlightenment needs to know if a specific dmabuf format is supported
before it lets clients use it. This lets E test commit a wayland
dmabuf object without assigning it a buffer.
Previous patch to not destroy Outbuf on resize should not have removed
this line else software generic tilebuffers will not be in sync with
the updated size.
ref 5ebba4463
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This line should not have been removed from the previous patch. Thanks
to Cedric for catching this.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
On an engine resize, we previously would destroy the Outbuf structure.
This patch modifies the code so that on a resize we no longer have to
destroy the old Outbuf and reallocate a new one. Instead, we will just
reconfigure the existing one and update it's properties.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
On an engine resize, rather than destroy & recreate the Outbuf
structure (and the associated surface) we can just call the
eng_output_resize function (which in turn will call
outbuf_reconfigure) to update Outbuf with new properties. This saves
us from having to create a whole new Outbuf every time we resize.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
In C we need this to make clear that we really do not accept parameters.
Found by the smatch source code matcher. I had run and fixed this before
but it seems to creep in again over time.
Using *im and dereferencing it before doing the actual NULL check does not make
much sense. I kept the checks as they have been there before so the intent was
probably that they could be NULL and should be checked.
CID: 1270030, 1270029, 1270028
If the hidden flag is set, then we don't need to recreate the Outbuf
for a given canvas as the window is hidden and we are not going to
render there until it's shown again.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
When a canvas gets hidden, we don't need to destroy & recreate the
wl_surface. We can simply attach a NULL wl_buffer to the surface which
achieves the same result. This saves us from having to always destroy
& recreate surfaces when we hide/show.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Software rendered wayland clients will now attempt
to use dmabuf on some platforms. This results in a window
that a compositor may be able to drop into a plane without a copy.
Disable it with the env var EVAS_WAYLAND_SHM_DISABLE_DMABUF
but if you need to disable it, please ping me or file a bug report.
Thank you NVIDIA for breaking your drivers regularly!
eglGetDisplay(x11_display) should work but was consistently
returning 0 instead.
Apparently EGL 1.5 introduced "eglGetPlatformDisplay" that
is more advanced to open a display. So, prefer that over
eglGetDisplay if it's available.
@fix
when the DIB header is BITMAPINFOHEADER (size 40),
a bitmap file has alpha channel only if the compression method is BI_ALPHABITFIELDS (= 6).
the original code enabled alpha channel when the compression method was BI_RGB (= 0),
which made an opaque bmp image loaded as a transparent one.
@fix
Not providing a call to the first method segfaults in elm_glview
right away. Instead of crashing, we now just issue a runtime error
about the method not being implemented.
If there's a "next" buffer set, we're better off freeing it before we
start to render. This lets us keep gbm from allocating an extra buffer
which it currently never frees.
Previously we'd call this only when we absolutely needed to, so it made
sense to always attempt to free a buffer, including ones on scanout or
pending flip.
However, it's useful to have a way to release the "next" only, so we can
do that before starting a render to free up the buffer that's never going
to be scanned out.
for gl noscale buffers are texture atlases that are fbo's. the point
is never to scale or transofmr them but to render them pixel for pixel
and just store pre-rendered data where its cheaper to do this than
rebuild every time. this is the enigne infra for sw and gl with the gl
code... it SHOULD work... in theory...
preparing an object is a good idea. especially with gl. you want to do
texture uploads BEFORE using textures all in one batch. otherwise this
may mean the gl implementation has to make a copy of your data in a
tmp location then copy it in later when texture becomes "unused" as it
may be in use at the moment, or it may have to stall and wait.
i have seen somewhere around 7-10% speedups on nvidia and intel
drivers with this on given a very special test case i brewed up (1000
32x32 images where i change 1 pixel every frame). this should have
impact really when we are modifying textures a lot. this is all i've
implemented for now, but this should/would/could do much more like
re-order map, proxy renders to render FIRST in a pre-render list
instead of inline and to pre-render fbo/buffer content for complex
objects like text or textblock etc.
this will define EGL_WAYLAND_PLANE_WL and EGL_WAYLAND_BUFFER_WL if
missing as SOME older egl public headers dont expose them and yet we
still wans to compile and support the feature should the egl BINARY
etc. actually support this (or be upgraded to support it after efl
compilation).
@fix
this technically isn't needed. it does help in some cases hide driver
or other buffer swap bugs, but in and of itself is not needed, so
remove. at least the drm egl bugs still happen on my pi3 so its
something else...