ecore_wl2: Add as partial commit function for setting off a tick

This adds the concept of a "false commit" that just sends a surface
commit without changing any other state.

This is intended to be used by ecore_evas to request a frame callback
from the compositor
This commit is contained in:
Derek Foreman 2017-10-05 14:06:42 -05:00
parent 0a185d3efd
commit f6bd73167a
2 changed files with 18 additions and 0 deletions

View File

@ -1892,6 +1892,8 @@ EAPI void ecore_wl2_session_recovery_disable(void);
*/
EAPI void ecore_wl2_window_commit(Ecore_Wl2_Window *window, Eina_Bool flush);
EAPI void ecore_wl2_window_false_commit(Ecore_Wl2_Window *window);
/**
* Check if a wayland window's surface is in the pending state.
*

View File

@ -1411,6 +1411,22 @@ ecore_wl2_window_commit(Ecore_Wl2_Window *window, Eina_Bool flush)
window->updating = EINA_FALSE;
}
EAPI void ecore_wl2_window_false_commit(Ecore_Wl2_Window *window)
{
EINA_SAFETY_ON_NULL_RETURN(window);
EINA_SAFETY_ON_NULL_RETURN(window->surface);
EINA_SAFETY_ON_TRUE_RETURN(window->pending.configure);
if (window->commit_pending)
ERR("Commit before previous commit processed");
window->callback = wl_surface_frame(window->surface);
wl_callback_add_listener(window->callback, &_frame_listener, window);
wl_surface_commit(window->surface);
ecore_wl2_display_flush(window->display);
window->commit_pending = EINA_TRUE;
}
EAPI Eina_Bool
ecore_wl2_window_pending_get(Ecore_Wl2_Window *window)
{