Commit Graph

109 Commits

Author SHA1 Message Date
Vincent Torri 8db62cb22b remove arguments of LOGFN in ecore_wayland modules as the are always the same
Reviewers: raster, devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11777
2020-05-06 09:18:31 -04:00
Hermet Park 53599a8d39 ecore wayland: expand internal interface to pass engine option list.
This is a prepartion patch to support msaa in wayland.
ui window needs to deliver engine options (stencil, depth, msaa bits)
to evas engine side, ecore_evas_wayland_egl should have the argument to pass.
2019-04-25 16:56:40 +09:00
Derek Foreman e382bac1a0 wayland: Fix elementary setting window parents at creation time
Summary:
We need to pass the entire pointer, not just 32-bits of it.

Fixes a crash with enlightenment sandbox gadgets where
ecore_wl2_window_alpha_get() is called with an invalid pointer while
trying to display a pop-up.

Reviewers: zmike, devilhorns

Reviewed By: zmike, devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6775
2018-08-08 09:37:30 -04:00
Chris Michael dc43017906 ecore-evas-wayland: Remove unused includes
As most of the "hard work" has been moved into
ecore_evas_wayland_common file, these includes are no longer needed
here.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-02 14:25:10 -05:00
Derek Foreman c425140a67 ecore_evas_wayland: Minimize differences between shm and egl
Finally bring these together as much as possible to avoid future
diversions when bugs are only fixed in one or the other.

There are functional changes - state tracking for client side effects is
now added to the shm engine, some bug fixes for the egl engine have been
brought to the shm engine.
2016-11-02 13:37:02 -05:00
Derek Foreman 4260d5d3a2 ecore_evas_wayland: Make resize code common
Brings resize code into the common implementation - there is a functional
change.  There appears to have been a bug in the egl resize where it
used the same w, h order for portrait evases as for landscape.  This was
fixed in shm.  I've used the shm variant for the common code.
2016-11-02 13:37:02 -05:00
Derek Foreman b23797c55a ecore_evas_wayland: Make rotation_set common
Rotation set can be moved into common now - should be no functional
change.
2016-11-02 13:37:01 -05:00
Derek Foreman 5d2a25a01d ecore_evas_wayland: Make transparent_set common
Moves transparent set into the common implementation - there is a
functional change here - the egl engine now calls transparent_set in
render_updates like the shm engine.

It is probable the this was the intended behaviour all along.
2016-11-02 13:37:01 -05:00
Derek Foreman 9ca6e274a4 ecore_evas_wayland: Make alpha set common
Moves alpha set into the common implementation - there is a functional
change here - the egl engine now calls alpha_do in render_updates like
the shm engine.

It is probable that this was the intended behaviour all along.
2016-11-02 13:37:01 -05:00
Derek Foreman 82277ae6b3 ecore_evas_wayland: Move more functions into the common implementation
Show and hide can be made common with almost no functional changes.
2016-11-02 13:37:01 -05:00
Derek Foreman af4a71bcf0 wayland evas engines: share engine info structure
These engines are incredibly similar - by sharing the same engine info
structure we'll be able to simplify the wayland ecore_evas bits and
make them much more maintainable.
2016-11-02 13:37:01 -05:00
Derek Foreman 54cf6dac4a wayland evas engines: rename wayland display to wl_display
Continuing to make the shm and egl engines closer to eachother.
2016-11-02 13:37:00 -05:00
Derek Foreman 3f75c45122 wayland_egl: Rename surface to wl_surface
Making this code more closely match the wayland_shm engine
2016-11-02 13:37:00 -05:00
Derek Foreman b898d3f929 wayland ecore evas: move move_resize to common
It's identical in both shm and egl variants, share it.
2016-11-02 13:37:00 -05:00
Derek Foreman d960adee72 wayland_egl: Remove some leftovers from www
The render post callback and "wobbling" variable were only required for
the client side effect.
2016-11-02 13:37:00 -05:00
Derek Foreman 398771bf8a evas_engines: Add fn_evas_changed callback
To allow using the pageflip completion event to drive timing in the DRM
engine we need to know as soon as possible that a render has been after
a render has been considered if it will cause a page flip or not.

The fn_evas_changed callback sends this information.
2016-09-08 13:55:23 -05:00
Jean-Philippe Andre b29847e0da wayland_egl: Fix double free in case of failure
When trying to create a window, the WL EGL engine creates
an ecore_evas and connects to the wayland display. But if
EGL is not supported (in weston with nvidia for instance),
the egl initialization fails and the window must be detroyed
in order to fallback to wayland_shm.

This led to a double disconnect from the wayland display
as both the ecore_evas del and the error handling code
were trying to disconnect.

Also, use ref == 0 in two places rather than ref <= 0, as
it can prevent double frees in bad situations (ref < 0).
And reset a global variable to NULL on shutdown.
2016-08-11 11:37:41 +09:00
Chris Michael c163e51dd3 ecore-evas-wayland: Minor formatting fixes
NB: no functional changes

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-06-13 16:19:46 -04:00
Jean-Philippe Andre 5aa00004a5 ecore_evas: Register direct input cb from modules
If the ecore_evas modules were using
ecore_event_window_register() then they can also redirect
everything though the direct callback instead.
2016-05-31 19:03:04 +09:00
Mike Blumenkrantz 9d5caf00b6 wayland: implement session recovery
add support for reconnecting wayland applications if the compositor dies

disconnect -> destroy gl ctx + image textures -> block rendering ->
reconnect -> create gl ctx -> create image textures -> unblock rendering ->
sprinkle special seasoning on top -> just like ma used to make

 #SamsungFeatures

@feature
2016-05-05 10:49:31 -04:00
Mike Blumenkrantz 17bb2d60ca ecore_evas wayland: store relevant www data in engine info
this accumulates all data relevant to client-side www into
the Evas_Engine_Info_Wayland_Egl struct so the client can react to it.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2016-04-01 06:49:49 -04:00
Cedric BAIL bb1a1eef65 ecore_evas: introduce support for per window animator trigger.
This code is currently only using the older fallback code and not any
new event source, so all animator on all window are still triggered
whatever the case are.
2016-02-02 10:47:25 -08:00
Mike Blumenkrantz 54df1d9c6a ecore-evas wayland: move frame sending to pre-flush callback
it was possible to deadlock rendering if a pre-render occurred but
the resulting render had no updated regions

@fix
2015-12-15 17:24:52 -05:00
Chris Michael 0848792204 ecore-evas-wl: Fix copy/paste errors
This fixes fat-finger copy/paste errors when copying functions from
ecore_evas_wayland_shm to ecore_evas_wayland_egl

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-11 11:34:42 -05:00
Chris Michael 757f530af9 ecore-evas-wl: Defer creating surfaces for wayland canvas
This code adds support for deferring of surface creation and showing
inside Ecore_Evas Wayland. This is needed for Enlightenment so that it
does not try to create or show surfaces until the compositor has had a
chance to sync globals. This fixes an issue where early surface
creation would cause a crash in the compositor due to globals not
being syncd.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-11 11:26:24 -05:00
Chris Michael abbfde9d68 ecore-evas-wayland: Move configure acknowledge to render_flush_pre
If we acknowledge a configure from xdg during post render, we end up
breaking maximize of EFL clients inside Weston (and perhaps other
compositors). In order to fix that, we will now send the configure ack
post render but pre flush.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2015-12-09 12:08:15 -05:00
Chris Michael 49e645d695 ecore-evas-wayland: Properly cleanup ecore_wl2 during error
If we fail to connect to an existing wayland display, then we should
properly cleanup (call ecore_wl2_shutdown) before exiting

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2015-12-04 11:40:54 -05:00
Chris Michael 04a4b599ab ecore-evas-wl: Cleanup creating a wayland canvas
Unsure where all these extra display_connect calls came from, but
remove them.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2015-12-04 11:36:15 -05:00
Chris Michael caa1b4323b ecore-wl2: Port Ecore_Evas engines to use Ecore_Wl2 code
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:07:20 -05:00
Chris Michael 7ae6c7d11d ecore-wl2: Port Ecore_Evas engines to use Ecore_Wl2 code
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:05:01 -05:00
Chris Michael 9e83ddbc48 ecore-wl2: Port Ecore_Evas engines to use Ecore_Wl2 code
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:05:01 -05:00
Chris Michael 7f8b269c3e ecore-evas-wayland: Fix error message for connect failures
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:03:35 -05:00
Chris Michael c092941be8 ecore-evas-wl: Use ecore_wl2_display_window_find function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:02:40 -05:00
Chris Michael da2990b414 ecore-evas-wl: Fix calls to ecore_wl2_window_resize (due to botched
rebase)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:02:40 -05:00
Chris Michael def834380b ecore-evas-wayland: Comment out calls to set custom animator
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:02:40 -05:00
Chris Michael cd1d9ec196 ecore-wl2: Port Ecore_Evas engines to use Ecore_Wl2 code
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-12-03 12:02:40 -05:00
Mike Blumenkrantz a347a47e75 ee-wayland: use frame callbacks exclusively to determine render timing
when running in a wayland compositor, the ideal mode of operation is to
only prepare/send frames when the compositor has finished with the previous
frame

to achieve this, manual rendering can be toggled upon creating and completing
a frame callback, ensuring that a canvas never has multiple pending buffers at
any given time

fix T2784
2015-10-20 16:57:05 -04: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 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 6b943ffa70 ecore-evas-wayland: Don't resize ecore_wl window to include frame size
Summary: ecore_wl_window_resize adjusts the internal representation of
the window size so this should not include the "framespace" also. This
fixes an issue where xdg surface would be getting an incorrect window
geometry which included framespace.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-12 10:58:00 -04:00
Chris Michael 210c6b9b7c ecore-evas-wayland: Set ee->draw_ok appropriately based on visibility
Summary: A previous code change to the common code which processes
updates is relying on having the ecore_evas->draw_ok flag set in order
to process updates. This change makes sure that ee->draw_ok is in sync
with canvas visibility.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-08 16:10:53 -04:00
Chris Michael bce8a82268 ecore-evas-wayland-egl: Add support for custom Ecore_Wl animator
Summary: This adds support for ecore_wl to handle ecore animators and
thus the egl engine can receive frame callbacks now.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-05 13:53:36 -04:00
MinJeong Kim 2cf0ed49ce ecore_evas_wayland: prevent duplicated shutdown of ecore_wl
Summary:
When the ecore_evas of wayland_egl/shm is freed with ecore_evas_free(),
ecore_wl_shutdown() is called by _ecore_evas_wl_common_free().
so ecore_wl_shutdown() after ecore_evas_free() has to be skipped.
@fix

Reviewers: devilhorns, raster, zmike, gwanglim

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2503
2015-05-14 07:55:24 -04:00
Cedric BAIL ce5ccfb5be ecore: remove the need to order the header correctly for Windows. 2015-05-07 09:53:10 +02:00
MinJeong Kim f485d5ffdd ecore-evas-wayland: remove duplicated shutdown of ecore_evas_wl_common
Summary:
 After a creation for ecore_evas_wayland_shm or ecore_evas_wayland_egl is
failed, _ecore_evas_wl_common_shutdown() gets called 'twice'.

 First shutdown is from _ecore_evas_wl_common_free() which is set as fn_free()
of ecore_evas engine, and this fn_free() is called by ecore_evas_free().
 Second is from direct call inside ecore_evas_wayland_shm_new_internal()
(or ecore_evas_wayland_egl_new_internal()).
 This duplicated shutdown causes block of first next _ecore_evas_wl_common_init
because init count is not zero but -1.

 So second shutdown should be removed so that it makes enable fall back to
another wayland engine correctly when one is failed to create ecore_evas_wayland.

@fix

Reviewers: gwanglim, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2451
2015-04-30 11:31:19 -04:00
Chris Michael b55a24727a ecore-evas-wayland: Remove frame callbacks from Ecore_Evas wayland
engine

Summary: Frame callbacks are now handled inside the engine itself and
are thus not needed here anymore

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-03-17 15:50:56 -04:00
Mike Blumenkrantz 7171135792 ecore evas should not crash when unsetting pointer
ref D812

disappointed.jpg
2015-02-06 17:54:08 -05:00
kabeer khan 9bf76ddc8a ecore_evas/wayland_egl: Set alpha of ecore_evas object if parent alpha is set
Summary:
Resolved FIXME ecore_evas_wayland_egl_new_internal to set alpha if parent alpha is set

@fix

Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1861
2015-01-09 13:24:03 -05:00
Chris Michael 9cd2d614e9 ecore-evas-wayland: Fix issue with ELM_PROFILE=mobile and windows not
showing up correctly.

Summary: If elm config profile is set to Mobile, then the
auto_norender_withdrawn is set to 1, which was causing Elm windows to
not draw properly due to the ee->withdrawn property not being updated.
It was not getting updated due to these checks for override.

NB: Tested this with all elm profiles, tested in weston, and tested in
Enlightenment (Wayland).

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-05 12:52:22 -05:00
Chris Michael ae00e44269 ecore-evas-wayland: Fix wayland windows not showing up after 5954289c6c
Summary: Wayland windows should follow X11 windows fairly closely,
thus only set withdrawn property if they are override windows. If not,
internal dialogs do not show up in Enlightenment (wayland-only).

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-29 14:55:17 -04:00