From 475ade8bf8832dafac3b8fa0e63e6c197fe4d08d Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Tue, 6 Oct 2015 10:31:25 -0400 Subject: ecore-wl2: Add API function to set sync/desync on a subsurface Signed-off-by: Chris Michael --- src/lib/ecore_wl2/ecore_wl2_subsurf.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/lib/ecore_wl2/ecore_wl2_subsurf.c') diff --git a/src/lib/ecore_wl2/ecore_wl2_subsurf.c b/src/lib/ecore_wl2/ecore_wl2_subsurf.c index 0a4a49be52..2456fd2aaa 100644 --- a/src/lib/ecore_wl2/ecore_wl2_subsurf.c +++ b/src/lib/ecore_wl2/ecore_wl2_subsurf.c @@ -126,3 +126,20 @@ ecore_wl2_subsurface_place_below(Ecore_Wl2_Subsurface *subsurface, struct wl_sur wl_subsurface_place_below(subsurface->wl.subsurface, surface); } + +EAPI void +ecore_wl2_subsurface_sync_set(Ecore_Wl2_Subsurface *subsurface, Eina_Bool sync) +{ + EINA_SAFETY_ON_NULL_RETURN(subsurface); + EINA_SAFETY_ON_NULL_RETURN(subsurface->wl.subsurface); + + sync = !!sync; + if (subsurface->sync == sync) return; + + subsurface->sync = sync; + + if (subsurface->sync) + wl_subsurface_set_sync(subsurface->wl.subsurface); + else + wl_subsurface_set_desync(subsurface->wl.subsurface); +} -- cgit v1.2.1