If the egl_surface is different from the current one, it may be that the
it has been destroyed already. Removing the below check (and just
checking for different contexts) will avoid calling makecurrent when
destroying a window. That was always failing anyway.
Should fix https://phab.enlightenment.org/T311 for gl_x11 too.
If the egl_surface is different from the current one, it may be that the it has
been destroyed already. Removing the below check (and just checking for
different contexts) will avoid calling makecurrent when destroying a window.
That was always failing anyway.
Should fix https://phab.enlightenment.org/T311 for wayland_egl.
duplicated code.
Resize the frame object before we update the window saved size.
Remove (again) call to _ecore_evas_wayland_resize and set the resize
edge of the window.
NB: The call to _ecore_evas_wayland_resize ends up sending duplicate
configure events here, hence whey it is removed.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
At least on recent mesa (since commit 9f07ca11c17), it will find the
mentioned symbols but they won't really work, leading to error messages,
and possibly some other errors. So far, I just ifdef'ed the
glGenFramebuffer and glBindFramebuffer functions, but it may require
others to be ifdef'ed too.
This is just a workaround, to fix https://phab.enlightenment.org/T246.
NB: Not sure how/why this was here, but it's entirely Not needed and
leads to duplicate calls of wl_shell_surface_resize.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
It's always enabled as it's a dbus module and links to nothing,
actually the daemon doesn't need to be running -- in that case it will
do nothing. In the case the daemon becomes active then it will get the
OnLowBattery property and keep it in sync.
NOTE: I couldn't test the property change as my laptop takes many
hours to get to that situation... let's hope it works :-)
Ecore will now load "system modules" on ecore_init(). The "systemd"
module will use DBus to monitor localed, hostnamed and timedated and
add system events related to those changes.
We don't want to execute any of the function below if t is NULL. Its not
only about strdup but alsa ecore_x_netwm_name_set which might dereference it.
CID 1039400
NB: These calls are NOT needed here (they setup and tear down the
actual wayland display fd connections, and are not necessary in order
to use ecore_wl functions).
Signed-off-by: Chris Michael <cp.michael@samsung.com>
erroneous calls to engine_setup code if we check surface validity.
NB: Short Version: Don't reassign surface if we don't need to.
NB: Prior to this, during a call to ecore_evas_show we would always
Reset the evas engine data (which was basically triggering code to
tear down and reconstruct all the engine internals including the
buffers and the swapper). By checking surface validity first, we can
potentially avoid all that teardown and reconstruction Thus resulting
in faster "show" speed.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
NB: When trying to attach a buffer to a surface, there was a corner
case that could fail in that if we just had 'rects' but count was 0,
then the surface would not get damaged (essentially a call to
wl_surface_damage would get passed 0,0 as the size). This fixes that
problem in that if count is <= 0 now, then we'll damage the whole
surface.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
functions on it.
NB: Wayland (internal) functions typically do not do Any object
validity checking, so lets be proactive and do it here first.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
ecore_wl_globals_get before trying to use them.
After we have bound a text input manager, there is no need to keep
looping the globals, so break out.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Porting commit f10c108283d9b76708418ba172b9ff0b28a09cd6 to wayland
engine.
Added a feature to dump out a png image before calling SwapBuffers.
To turn on the feature, use the following env vars.
EVAS_GL_SWAP_BUFFER_DEBUG_DIR="dir_name" sets the name of the directory
that the files will be output to and enables the debug mode.
EVAS_GL_SWAP_BUFFER_DEBUG_ALWAYS=1 will enable the writing of the
files every frame. This in effect turns on the swap_buffer_debug
variable, which can be set on or off in gdb for debugging. This will
allow dumping of certain frames without having to dump out a ton of
files to track down one frame.
Added a feature to dump out a png image before calling SwapBuffers.
To turn on the feature, use the following env vars.
EVAS_GL_SWAP_BUFFER_DEBUG_DIR="dir_name" sets the name of the directory
that the files will be output to and enables the debug mode.
EVAS_GL_SWAP_BUFFER_DEBUG_ALWAYS=1 will enable the writing of the
files every frame. This in effect turns on the swap_buffer_debug
variable, which can be set on or off in gdb for debugging. This will
allow dumping of certain frames without having to dump out a ton of
files to track down one frame.
- ecore_evas_pixmap_visual_get
- ecore_evas_pixmap_colormap_get
- ecore_evas_pixmap_depth_get
Assign interface functions for above when creating the new interface.
When creating the pixmap, store the visual and colormap for later
retrieval.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Since we take the lock at the start of the function, we should release
the mutex lock if we are going to return.
NB: Fixes Coverity CID1039381
Signed-off-by: Chris Michael <cp.michael@samsung.com>
- Add "pixmap" structure to engine_data.
- Free the front and back pixmaps when the ecore_evas gets freed.
- On resize, drop the backing pixmap if size is different.
- Before we render, check pixmap size vs EE size and create new
backing pixmap if needed.
- After we have rendered into the backing pixmap, flip it to the
front so that any calls to "pixmap_get" will return the proper one.
- Add pixmap_new_internal code (the actual guts for all this)
NB: These can be used to create an internally double-buffered
ecore_evas that renders to a pixmap (not a window).
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Evas loaders' open() function expect the key to be a stringshare,
so declare it as such and keep using ref() without add().
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
If we get an error trying to "make current" an allocated surface, then
we should free that allocated surface.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
If a jpeg image is rotated and we have allocated space for ptr_rotate,
then we should free it Always ... Not Only if the degrees are
180...because we allocate it always
Signed-off-by: Chris Michael <cp.michael@samsung.com>
In case of render_mode == EVAS_RENDER_MODE_ASYNC_INIT we're jumping
directly to end which then calls
evas_gl_preload_render_unlock(eng_preload_make_current, re);
Make sure re is initialized with the render engine data so we don't
dereference junk.
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
It might be that our engine list is empty and thus our engine might still
be set to NULL. Better check and return if this is the case instead of
dereferencing NULL.