summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wl2/ecore_wl2_subsurf.c
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-10-06 10:31:25 -0400
committerChris Michael <cp.michael@samsung.com>2015-12-03 12:02:40 -0500
commit475ade8bf8832dafac3b8fa0e63e6c197fe4d08d (patch)
treeed9e3c2d424019419fab8281d02d4039e9c20d46 /src/lib/ecore_wl2/ecore_wl2_subsurf.c
parentd50af2db70e37878a505374de86a245e28c351e1 (diff)
ecore-wl2: Add API function to set sync/desync on a subsurface
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_wl2/ecore_wl2_subsurf.c')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_subsurf.c17
1 files changed, 17 insertions, 0 deletions
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
126 126
127 wl_subsurface_place_below(subsurface->wl.subsurface, surface); 127 wl_subsurface_place_below(subsurface->wl.subsurface, surface);
128} 128}
129
130EAPI void
131ecore_wl2_subsurface_sync_set(Ecore_Wl2_Subsurface *subsurface, Eina_Bool sync)
132{
133 EINA_SAFETY_ON_NULL_RETURN(subsurface);
134 EINA_SAFETY_ON_NULL_RETURN(subsurface->wl.subsurface);
135
136 sync = !!sync;
137 if (subsurface->sync == sync) return;
138
139 subsurface->sync = sync;
140
141 if (subsurface->sync)
142 wl_subsurface_set_sync(subsurface->wl.subsurface);
143 else
144 wl_subsurface_set_desync(subsurface->wl.subsurface);
145}