summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wl2
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-10-05 14:06:42 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-10-12 12:24:03 -0500
commitf6bd73167a0273bba8f11ba335d54be15d4df173 (patch)
treede5e930f8c191a5dee2c26fabe62d43d28fa3f47 /src/lib/ecore_wl2
parent0a185d3efd51e3af2ba45b2ed1c8ec67d1eedd60 (diff)
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
Diffstat (limited to 'src/lib/ecore_wl2')
-rw-r--r--src/lib/ecore_wl2/Ecore_Wl2.h2
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_window.c16
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 70edf4d719..1b15e29d58 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -1892,6 +1892,8 @@ EAPI void ecore_wl2_session_recovery_disable(void);
1892 */ 1892 */
1893EAPI void ecore_wl2_window_commit(Ecore_Wl2_Window *window, Eina_Bool flush); 1893EAPI void ecore_wl2_window_commit(Ecore_Wl2_Window *window, Eina_Bool flush);
1894 1894
1895EAPI void ecore_wl2_window_false_commit(Ecore_Wl2_Window *window);
1896
1895/** 1897/**
1896 * Check if a wayland window's surface is in the pending state. 1898 * Check if a wayland window's surface is in the pending state.
1897 * 1899 *
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c
index 9b223190ce..ebb79182aa 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -1411,6 +1411,22 @@ ecore_wl2_window_commit(Ecore_Wl2_Window *window, Eina_Bool flush)
1411 window->updating = EINA_FALSE; 1411 window->updating = EINA_FALSE;
1412} 1412}
1413 1413
1414EAPI void ecore_wl2_window_false_commit(Ecore_Wl2_Window *window)
1415{
1416 EINA_SAFETY_ON_NULL_RETURN(window);
1417 EINA_SAFETY_ON_NULL_RETURN(window->surface);
1418 EINA_SAFETY_ON_TRUE_RETURN(window->pending.configure);
1419
1420 if (window->commit_pending)
1421 ERR("Commit before previous commit processed");
1422
1423 window->callback = wl_surface_frame(window->surface);
1424 wl_callback_add_listener(window->callback, &_frame_listener, window);
1425 wl_surface_commit(window->surface);
1426 ecore_wl2_display_flush(window->display);
1427 window->commit_pending = EINA_TRUE;
1428}
1429
1414EAPI Eina_Bool 1430EAPI Eina_Bool
1415ecore_wl2_window_pending_get(Ecore_Wl2_Window *window) 1431ecore_wl2_window_pending_get(Ecore_Wl2_Window *window)
1416{ 1432{