derekf pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=b599b1b90006f74979ae3c8527ed2c91082ef3be
commit b599b1b90006f74979ae3c8527ed2c91082ef3be Author: Derek Foreman <der...@osg.samsung.com> Date: Mon Aug 14 17:45:41 2017 -0500 ecore_wl2: Add API ecore_wl2_window_pending_get() Lets us test if a commit has been requested but the compositor hasn't yet told use to draw new content for it. --- src/lib/ecore_wl2/Ecore_Wl2.h | 11 +++++++++++ src/lib/ecore_wl2/ecore_wl2_window.c | 7 +++++++ 2 files changed, 18 insertions(+) diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index 1a558a2bdb..dad9652709 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -1891,6 +1891,17 @@ EAPI void ecore_wl2_session_recovery_disable(void); EAPI void ecore_wl2_window_commit(Ecore_Wl2_Window *window, Eina_Bool flush); /** + * Check if a wayland window's surface is in the pending state. + * + * A surface is pending if it's been commit but we haven't received a + * frame callback for it yet. This mean's we're not ready to draw yet. + * + * @return whether the window's surface is pending or not. + * + * @since 1.20 + */ +EAPI Eina_Bool ecore_wl2_window_pending_get(Ecore_Wl2_Window *window); + # endif # undef EAPI diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index 422b330443..23eaafc960 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -1357,3 +1357,10 @@ EAPI void ecore_wl2_window_commit(Ecore_Wl2_Window *window, Eina_Bool flush) if (flush) wl_surface_commit(window->surface); } + +EAPI Eina_Bool ecore_wl2_window_pending_get(Ecore_Wl2_Window *window) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(window, EINA_FALSE); + + return window->commit_pending; +} --