summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wl2
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-08-14 17:45:41 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-08-18 14:27:32 -0500
commitb599b1b90006f74979ae3c8527ed2c91082ef3be (patch)
tree5b9f67c960cc2473f214e2eb52215ccc8b5c7f9d /src/lib/ecore_wl2
parent11d3bf7939fa2f2934efd0cf73172a3c6075f3af (diff)
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.
Diffstat (limited to 'src/lib/ecore_wl2')
-rw-r--r--src/lib/ecore_wl2/Ecore_Wl2.h11
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_window.c7
2 files changed, 18 insertions, 0 deletions
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);
1891EAPI void ecore_wl2_window_commit(Ecore_Wl2_Window *window, Eina_Bool flush); 1891EAPI void ecore_wl2_window_commit(Ecore_Wl2_Window *window, Eina_Bool flush);
1892 1892
1893/** 1893/**
1894 * Check if a wayland window's surface is in the pending state.
1895 *
1896 * A surface is pending if it's been commit but we haven't received a
1897 * frame callback for it yet. This mean's we're not ready to draw yet.
1898 *
1899 * @return whether the window's surface is pending or not.
1900 *
1901 * @since 1.20
1902 */
1903EAPI Eina_Bool ecore_wl2_window_pending_get(Ecore_Wl2_Window *window);
1904
1894# endif 1905# endif
1895 1906
1896# undef EAPI 1907# 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)
1357 1357
1358 if (flush) wl_surface_commit(window->surface); 1358 if (flush) wl_surface_commit(window->surface);
1359} 1359}
1360
1361EAPI Eina_Bool ecore_wl2_window_pending_get(Ecore_Wl2_Window *window)
1362{
1363 EINA_SAFETY_ON_NULL_RETURN_VAL(window, EINA_FALSE);
1364
1365 return window->commit_pending;
1366}