Summary:
These are obsolete codes because evas engines no longer
has a use case for handling the drm file descriptor. And also it
is the same change as what Stefan Schmidt did to evas_drm.
Test Plan: N/A
Reviewers: devilhorns, stefan_schmidt, cedric, raster
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1452
Summary: Variable palpriv is going out of scope and leaks the storage it points to,
if we do not free it before exiting.
Test Plan: NA
Reviewers: seoz, raster, cedric
Subscribers: cedric, seoz
Differential Revision: https://phab.enlightenment.org/D1429
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This fixes an issue where we had to hard-code the resolution in the
wl_drm module. Instead, we now properly get the current screen
resolution/mode from the drm library and use that.
NB: This is needed to fix wl_drm module in Enlightenment to setup the
proper resolution.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
Now, evas gl-drm engine is using ecore_drm instead of its own code to handle tty.
This patch has removed obsolete tty handling codes from engine. It is almost the same as what
Stefan Schmidt did to evas drm engine.
Test Plan: N/A
Reviewers: devilhorns, cedric, raster, stefan_schmidt
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1409
With the move to ecore_drm for tty handling these all became unused.
Ecore_drm already takes care of setting up the SIGUSR1/2 handler and
the rest of the tty setup.
Now that this is gone evas_drm_init/shutdown have no functionality
anymore either.
When getting called from expedite we don't have ecore_evas in between which
normally sets things up for tty. Handle this special case here so the evas
drm engine keeps working for expedite.
tga provides 16bpp images as actually 15bpp. the upper bit (alpha mask
bit) can be 0 or 1, but we don't check the descriptor byte to see if
this bit is relevant or not. coverity pointed this out in CID 1039473
- logically dead code that should not have been dead except for this
missing logic. well done coverity!
While we are likely will keep the embedded copy for a while to avoid a really
new dependency we allow now to use the external liblz4. You need at least
revision r120 and a package that ships the pc file for it.
Personally I would like to get rid of it rather sooner than later due to the
security implications and a bunch of code we ship but have no idea about.
Reality is that it will need some time until this new lib is actually
packaged and shipped with releases for a a majority of people.
This patch was co-worked with Doug Newgard <scimmia22@outlook.com>
Summary: This is the first step to introduce a gl-drm backend.
Test Plan: "ecore evas" create with ecore_evas_gl_drm_new(). It creates "ecore evas" with gl_drm evas backend.
@feature
Reviewers: raster, Hermet, cedric, devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1187
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
This fixes broken rendering of the main surface when new surface is created.
Rendering on main surface can be broken due to invalid size of common gl context.
Since common gl context is shared between surfaces, if new surface has been changed
size of common gl context, then rendering on main surface can be broken.
In order to fix problem, engine has to change size of common gl context after egl
make current according to size of current Outbuf.
@fix
Test Plan:
run elementary_test with wayland_egl engine under wayland and click any
button to create new surface. watch the main surface of elementary_test.
Reviewers: devilhorns, raster, stefan_schmidt, cedric
Reviewed By: cedric
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1346
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
use eng_output_resize of software_generic engine and move wl_egl_window_resize to
eng_outbuf_reconfigure. and remove eng_output_resize of wayland_egl.
@fix
Test Plan: run elementary_test with wayland_egl engine under wayland
Reviewers: devilhorns, raster, stefan_schmidt, cedric
Reviewed By: cedric
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1343
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
On Ubuntu 14.04 it makes a 32 bit depth window un-responsive
to any XEvent.
Reviewers: cedric, raster
Reviewed By: raster
Subscribers: raster, capOM, cedric
Differential Revision: https://phab.enlightenment.org/D1236
Reset the Outbuf's Engine information pointer.
We also don't need to do an eng_window_free during reconfigure because the
software_generic_update function will free it anyway.
We should also re-setup the tilebuffer during eng_setup.
Fix gl_context resize to work even if there is no wl_egl window setup
yet.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This is the first part of the wayland-egl engine fix. Don't resize the
gl_context during the first_rectangle function, and don't set any
preserve bits on the gl_context
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
If we fail to init gl_generic then we should cleanup properly and free
the recently created Outbuf.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This fix T1459. I have added an ERR to catch this kind of issue earlier.
I am wondering if that should not be even a CRI.
The reason why we do see the problem only after the introduction of the
use of Eina_Rectangle_Pool is due to how efficiently they pack data, resulting
in ressource ending up in the wrong format bucket. Nothing wrong with the
patch itself.
Summary:
@fix
Segfault in wayland_egl engine is casused by illegal library linking.
Fix this by linking to GLESv2 and EGL libraries.
Test Plan: N/A
Reviewers: devilhorns, raster, cedric, Hermet
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1332
several loaders make too much noise when a file fails to load - almost
all of this is because the file isnt actually an image format file at
all, and an ap is just asking evas to try do a load to see if it is a
loadable image at all. this results in noisy strerr output that simply
shouldnt be there. so silence for loaders. @fix
i found that we are not setting u and v to be smooth (linear
interpolate) for yuv reendering, even when asked. they remain at a
default "nearest". this enables linear for u and v always, meaning
even when smooth is off, we still interpolate u and v (not y), and
even when at 1:1 with no scaling u and v get interpolation for better
quality.
@fix!
since colors are hex, 96 bytes of hex would be 32bytes per r, g and b,
and that would be 128 bits per r g and b and that just is never seen
or used. also coverity is right in CID 1193201 that we just can't
shift that many, so go down to max 16 bits per rgb which is sensible
and able to be done. (thats 12 bytes max for hex of color).
We cannot use the texture to find a valid format Before the texture is
actually created. This is invalid, leads to "warning: tex is used
uninitialized' message from the compiler, and just plain wrong.
Instead, use the alpha property of the Evas_GL_Image to find the
proper texture format, Then create the texture.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
so in fixing one CID for a format lookup failing and thus invalid mem
access, a possible leak was made in this case. fix that by doing
lookup before any allocation and if lookup fails, return there
this fixes CID 1230999 1230998 1230997
gl_generic functions expect the Outbuf to contain the canvas, so we
fixed the eng_window_new function to accept that, And the engine info.
This simplifies the calls to eng_window_new.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Since we simplified the eng_window_new function to accept the canvas
and engine info, we need to update calls to that function
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
We need to pass in the canvas and engine info structure as the
gl_generic engine needs the outbuf->canvas to be set.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
Evas wayland_egl engine crashes on startup when it is running with mesa.
Evas is trying to get EGL / GLES extension function addresses where evas_gl_symbols.
It is called before eglGetDisplay. Then mesa considers that current egl platform is
X11 if it has no EGL_PLATFORM env var. This behavior of mesa is bad. But we should
provide workaround until it is fixed. Thus EGL_PLATFORM env var should be defined to
wayland before calling eglGetProcAddress.
@fix
Test Plan: run elementary_test under wayland with wayland_egl engine.
Reviewers: raster, stefan_schmidt, devilhorns
Reviewed By: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1312
Seems the newer wayland-egl code was missing the log domain variable
and thus would not load at time of dlsym due to missing symbol. This
fixes that problem by defining the variable.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
these were static rect cutouts, so they stayed around on exit and thus
we "lost" them. this nukes them on context free and each new frame.
fixes the "leak"
The eng_gl_context functions are used for Evas 3D, so let's support
those in the wayland_egl engine.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Previous (french) changes to evas_gl code broke the wayland egl engine. This
batch of changes fixes that by rewriting to engine to work with new
evas_gl functions.
Fixes Phab ticket T1478
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Recent changes to evas engines require using evas_gl_generic now, so
let's sort out the headers and include the gl_generic one we need
Signed-off-by: Chris Michael <cp.michael@samsung.com>
We allocate a new eina_rectangle here, but we never free it after
sending damages to the surface.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
ico files were defined to have bmp's in each key - in fact a subset of
them. unbenknownst to yours truly, vista now allows them to also be
pngs and thus the ico loader rejects them as corrupt. at least detect
it and complain right now
We use this functionality already from ecore_drm. The evas version does
not even use udev to acquire the device which means we could not support
hotplugging. The only missing feature was the capability check for
DUMB_BUFFER which I added to ecore_drm now.
This is the second iteration of this patch. Thsi time also taking expedite
runs of he evas drm engine in account.
Note that we can't access gl_common directly as it is not possible to link it
2 times. I also didn't want to force evas to be linked with GL/EGL. So I rely
now on dlsym on about 20 symbols to get that backend going.
This is the first step to introduce a common gl infrastructure for all gl based backend.
For now it is strictly doing the exact same thing that the gl_x11 was doing, but I already
spoted that a lot of the optimization in gl_x11 where not incorporated in other gl backend.
So this is going to help everyone by sharing more code on a crucial part of our infrastructure.
This reverts commit 5e18223f67.
Conflicts:
src/modules/evas/engines/gl_common/evas_gl_context.c
we've got a side effect(another quality issue) of the patch. so revert it.
Masking is not used (there even was a recent commit by Hermet to
remove most of the occurences of mask shaders in GL), and I've
introduced a new ETC1+Alpha feature. Replace the old texm and
associated variables by texa for alpha texures.
Software Generic backend can send us OUTBUF_DEPTH_INHERIT during a
reconfigure. If we are inheriting the previous depth, let's check that
so we don't get needless destrouction/recreation of shm buffers.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Seems the new software_generic backend is passing in
OUTBUF_DEPTH_INHERIT during a reconfigure, so let's add a check for
that else if not, the entire drm engine stops rendering due to output
buffers not being created to match the framebuffer depth.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Adjust the ob->w/h dimensions After the framebuffer has been setup
because we cannot have output buffers smaller than the framebuffer
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
We cannot use epd->output.w/h in these calls as the setup of the
output buffer May cause a resize. Drm buffers cannot be allocated
Smaller than the framebuffer size, so evas_drm_outbuf_setup function
May resize the ob->w/h to match the framebuffer.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Eeeeh. Not only we don't support atlasses with this RGB+A thing
yet, but ETC1 does not even support SubImage2D (according to the
current spec).
Also, fix a few typos in that same function.
Some colorspaces (ETC, S3TC, GRY, ...) don't care about the value
of BGRA support or the alpha flag. So, let's introduce the
new boolean^Wenum value MATCH_ANY ;)
Note: the compressed texture formats with alpha support have been
marked as matching both TRUE and FALSE for alpha. The images
should always have the alpha flag set to TRUE, though.
The BGRA flag really doesn't matter.
The TGV loader is an Evas_Loader, not part of evas itself
(eg. in cserve), so we can't use evas functions from there.
eina_cpu provides appropriate CPU features detection.
Save images with alpha in two planes:
- RGB data as ETC1
- Alpha as ETC1 (from a greyscale image)
The second plane alpha is located right after the RGB plane.
The RGBA data is not premultiplied, so that RGB can be encoded
at a better quality in ETC1. This should avoid some blockiness
artifacts that we can see in the current ETC2 mode (which supports
alpha natively). Eventually ETC2 should also support non
premultiplied data for a better encoding quality.
This patch implements the saver and the loader.
@feature
These shaders take two textures as input and sample RGB from
texture 1 and alpha from texture 2. This is the non-premultiplied
version, so RGB' = RGB*A.
This includes only the GLSL code.
We need to check if evas_outbuf_setup Failed and did not return a new
ob for us to work with...so this if check was invalid
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
We need to have the drm fd & tty setup Prior to creating the output
buffer so that the output buffer knows what drm card to use
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This reverts commit 31ad73efa9.
Conflicts:
src/modules/evas/engines/drm/evas_engine.c
Revert this commit as these functions are needed to run evas engine
standalone (expedite) on drm