summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wl2/ecore_wl2_surface.c
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2018-01-26 13:15:45 -0600
committerDerek Foreman <derekf@osg.samsung.com>2018-01-26 15:54:00 -0600
commit0fc4fa71565a466ce006a08b3d2f9099f074d0cc (patch)
tree7a0b9c8c6ca8b22cd8488e528e47f1e085552219 /src/lib/ecore_wl2/ecore_wl2_surface.c
parentfb3928ec96e6b0497918bdc3070e8297b666fb6c (diff)
ecore_wl2: Add surface_window_get api
One of the last remaining blockers for compiling dmabuf support as a plug-in.
Diffstat (limited to 'src/lib/ecore_wl2/ecore_wl2_surface.c')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_surface.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_surface.c b/src/lib/ecore_wl2/ecore_wl2_surface.c
index b5331c2e6e..e110a2c86b 100644
--- a/src/lib/ecore_wl2/ecore_wl2_surface.c
+++ b/src/lib/ecore_wl2/ecore_wl2_surface.c
@@ -152,6 +152,7 @@ _evas_dmabuf_surface_post(Ecore_Wl2_Surface *s, void *priv_data, Eina_Rectangle
152{ 152{
153 Ecore_Wl2_Dmabuf_Private *p; 153 Ecore_Wl2_Dmabuf_Private *p;
154 Ecore_Wl2_Buffer *b; 154 Ecore_Wl2_Buffer *b;
155 Ecore_Wl2_Window *win;
155 156
156 p = priv_data; 157 p = priv_data;
157 158
@@ -164,10 +165,12 @@ _evas_dmabuf_surface_post(Ecore_Wl2_Surface *s, void *priv_data, Eina_Rectangle
164 ecore_wl2_buffer_busy_set(b); 165 ecore_wl2_buffer_busy_set(b);
165 ecore_wl2_buffer_age_set(b, 0); 166 ecore_wl2_buffer_age_set(b, 0);
166 167
167 ecore_wl2_window_buffer_attach(s->wl2_win, b->wl_buffer, 0, 0, EINA_FALSE); 168 win = ecore_wl2_surface_window_get(s);
168 ecore_wl2_window_damage(s->wl2_win, rects, count);
169 169
170 ecore_wl2_window_commit(s->wl2_win, EINA_TRUE); 170 ecore_wl2_window_buffer_attach(win, b->wl_buffer, 0, 0, EINA_FALSE);
171 ecore_wl2_window_damage(win, rects, count);
172
173 ecore_wl2_window_commit(win, EINA_TRUE);
171} 174}
172 175
173static void 176static void
@@ -325,6 +328,14 @@ ecore_wl2_surface_manager_del(Ecore_Wl2_Surface_Interface *intf)
325 _smanagers = eina_list_remove(_smanagers, intf); 328 _smanagers = eina_list_remove(_smanagers, intf);
326} 329}
327 330
331EAPI Ecore_Wl2_Window *
332ecore_wl2_surface_window_get(Ecore_Wl2_Surface *surface)
333{
334 EINA_SAFETY_ON_NULL_RETURN_VAL(surface, NULL);
335
336 return surface->wl2_win;
337}
338
328/* TEMPORARY HACK FOR TESTING */ 339/* TEMPORARY HACK FOR TESTING */
329Eina_Bool 340Eina_Bool
330ecore_wl2_surface_manager_dmabuf_add(void) 341ecore_wl2_surface_manager_dmabuf_add(void)