summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-08-17 15:12:57 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-08-18 14:27:32 -0500
commit3290e6da1026f87e71508d57ffca697c1e8df02f (patch)
treee7597d744121c9796196b7e4a777c360b67368c3 /src
parent5f0fa084673d1e531ff17d1af96e62203ed65c2c (diff)
wayland_shm: Use ecore_wl2_window_buffer_attach
No longer calling wl_surface_attach directly.
Diffstat (limited to 'src')
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_dmabuf.c12
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_shm.c6
2 files changed, 12 insertions, 6 deletions
diff --git a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
index aa6ff2e5b4..ce408210c1 100644
--- a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
@@ -479,6 +479,7 @@ _create_succeeded(void *data,
479 struct zwp_linux_buffer_params_v1 *params, 479 struct zwp_linux_buffer_params_v1 *params,
480 struct wl_buffer *new_buffer) 480 struct wl_buffer *new_buffer)
481{ 481{
482 Ecore_Wl2_Window *win;
482 struct wl_surface *wls; 483 struct wl_surface *wls;
483 Dmabuf_Buffer *b = data; 484 Dmabuf_Buffer *b = data;
484 485
@@ -500,8 +501,9 @@ _create_succeeded(void *data,
500 if (b != b->surface->pre) return; 501 if (b != b->surface->pre) return;
501 502
502 /* This buffer was drawn into before it had a handle */ 503 /* This buffer was drawn into before it had a handle */
503 wls = ecore_wl2_window_surface_get(b->surface->surface->info->info.wl2_win); 504 win = b->surface->surface->info->info.wl2_win;
504 wl_surface_attach(wls, b->wl_buffer, 0, 0); 505 wls = ecore_wl2_window_surface_get(win);
506 ecore_wl2_window_buffer_attach(win, b->wl_buffer, 0, 0, EINA_FALSE);
505 _evas_surface_damage(wls, b->surface->compositor_version, 507 _evas_surface_damage(wls, b->surface->compositor_version,
506 b->w, b->h, NULL, 0); 508 b->w, b->h, NULL, 0);
507 ecore_wl2_window_commit(b->surface->surface->info->info.wl2_win, EINA_TRUE); 509 ecore_wl2_window_commit(b->surface->surface->info->info.wl2_win, EINA_TRUE);
@@ -672,6 +674,7 @@ _evas_dmabuf_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count,
672 struct wl_surface *wls; 674 struct wl_surface *wls;
673 Dmabuf_Surface *surface; 675 Dmabuf_Surface *surface;
674 Dmabuf_Buffer *b; 676 Dmabuf_Buffer *b;
677 Ecore_Wl2_Window *win;
675 678
676 surface = s->surf.dmabuf; 679 surface = s->surf.dmabuf;
677 b = surface->current; 680 b = surface->current;
@@ -696,10 +699,11 @@ _evas_dmabuf_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count,
696 } 699 }
697 surface->pre = NULL; 700 surface->pre = NULL;
698 701
699 wls = ecore_wl2_window_surface_get(s->info->info.wl2_win); 702 win = s->info->info.wl2_win;
703 wls = ecore_wl2_window_surface_get(win);
700 if (!hidden) 704 if (!hidden)
701 { 705 {
702 wl_surface_attach(wls, b->wl_buffer, 0, 0); 706 ecore_wl2_window_buffer_attach(win, b->wl_buffer, 0, 0, EINA_FALSE);
703 _evas_surface_damage(wls, surface->compositor_version, 707 _evas_surface_damage(wls, surface->compositor_version,
704 b->w, b->h, rects, count); 708 b->w, b->h, rects, count);
705 } 709 }
diff --git a/src/modules/evas/engines/wayland_shm/evas_shm.c b/src/modules/evas/engines/wayland_shm/evas_shm.c
index feeb4bf12c..e7acd146fc 100644
--- a/src/modules/evas/engines/wayland_shm/evas_shm.c
+++ b/src/modules/evas/engines/wayland_shm/evas_shm.c
@@ -536,6 +536,7 @@ _evas_shm_surface_data_get(Surface *s, int *w, int *h)
536void 536void
537_evas_shm_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count, Eina_Bool hidden) 537_evas_shm_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count, Eina_Bool hidden)
538{ 538{
539 Ecore_Wl2_Window *win;
539 struct wl_surface *wls; 540 struct wl_surface *wls;
540 Shm_Surface *surf; 541 Shm_Surface *surf;
541 Shm_Leaf *leaf; 542 Shm_Leaf *leaf;
@@ -546,11 +547,12 @@ _evas_shm_surface_post(Surface *s, Eina_Rectangle *rects, unsigned int count, Ei
546 leaf = surf->current; 547 leaf = surf->current;
547 if (!leaf) return; 548 if (!leaf) return;
548 549
549 wls = ecore_wl2_window_surface_get(s->info->info.wl2_win); 550 win = s->info->info.wl2_win;
551 wls = ecore_wl2_window_surface_get(win);
550 552
551 if (!hidden) 553 if (!hidden)
552 { 554 {
553 wl_surface_attach(wls, leaf->data->buffer, 0, 0); 555 ecore_wl2_window_buffer_attach(win, leaf->data->buffer, 0, 0, EINA_FALSE);
554 556
555 _evas_surface_damage(wls, surf->compositor_version, 557 _evas_surface_damage(wls, surf->compositor_version,
556 leaf->w, leaf->h, rects, count); 558 leaf->w, leaf->h, rects, count);