summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/wayland_shm/evas_shm.c
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-01-05 13:36:35 -0600
committerDerek Foreman <derekf@osg.samsung.com>2017-01-05 13:40:31 -0600
commit4c1227433fd03efd472abf4f9eac0484f678c6a0 (patch)
treeba2282478ee1c2da74dd6d3532cc47ace99ed840 /src/modules/evas/engines/wayland_shm/evas_shm.c
parent7b0f93788056a754cab467b3cad00e3f108756a1 (diff)
wayland_shm: Add a way to update the stored wayland objects
On session recovery the engine needs to be given new copies of the surface, dmabuf, and shm objects to run in the new connection. This fixes session recovery breakage introduced when we stopped recreating the outbuf on reconfigure.
Diffstat (limited to 'src/modules/evas/engines/wayland_shm/evas_shm.c')
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_shm.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/modules/evas/engines/wayland_shm/evas_shm.c b/src/modules/evas/engines/wayland_shm/evas_shm.c
index b1c55531d8..9435284364 100644
--- a/src/modules/evas/engines/wayland_shm/evas_shm.c
+++ b/src/modules/evas/engines/wayland_shm/evas_shm.c
@@ -577,6 +577,21 @@ _evas_shm_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count, Ei
577} 577}
578 578
579Eina_Bool 579Eina_Bool
580_evas_shm_surface_surface_set(Surface *s, struct wl_shm *wl_shm, struct zwp_linux_dmabuf_v1 *wl_dmabuf EINA_UNUSED, struct wl_surface *wl_surface)
581{
582 Shm_Surface *surf;
583
584 surf = s->surf.shm;
585
586 if ((surf->shm == wl_shm) && (surf->surface == wl_surface))
587 return EINA_FALSE;
588
589 surf->shm = wl_shm;
590 surf->surface = wl_surface;
591 return EINA_TRUE;
592}
593
594Eina_Bool
580_evas_shm_surface_create(Surface *s, int w, int h, int num_buff) 595_evas_shm_surface_create(Surface *s, int w, int h, int num_buff)
581{ 596{
582 Shm_Surface *surf; 597 Shm_Surface *surf;
@@ -612,6 +627,7 @@ _evas_shm_surface_create(Surface *s, int w, int h, int num_buff)
612 s->funcs.data_get = _evas_shm_surface_data_get; 627 s->funcs.data_get = _evas_shm_surface_data_get;
613 s->funcs.assign = _evas_shm_surface_assign; 628 s->funcs.assign = _evas_shm_surface_assign;
614 s->funcs.post = _evas_shm_surface_post; 629 s->funcs.post = _evas_shm_surface_post;
630 s->funcs.surface_set = _evas_shm_surface_surface_set;
615 631
616 return EINA_TRUE; 632 return EINA_TRUE;
617 633