summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wl2
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2018-06-15 13:18:30 -0500
committerDerek Foreman <derekf@osg.samsung.com>2018-06-15 13:18:30 -0500
commita310667bec105f71ba221fc7f5a36d1f095a4203 (patch)
treef1a6f2494ee7ed530a88a26a63e5294a79c8f437 /src/lib/ecore_wl2
parent551101b4cd74debcaa906fb73f7c60b7a26b550d (diff)
ecore_wl2: Add a purge option to surface flush
Summary: We need to be able to forcibly destroy all surface buffers to make session recovery work safely for software rendering. @betabreak Depends on D6278 Reviewers: devilhorns, zmike Reviewed By: zmike Subscribers: cedric, #committers, zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6279
Diffstat (limited to 'src/lib/ecore_wl2')
-rw-r--r--src/lib/ecore_wl2/Ecore_Wl2.h4
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_surface.c6
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_surface_module_dmabuf.c2
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_window.c2
4 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index eb434883cb..813fa042de 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -436,7 +436,7 @@ typedef struct _Ecore_Wl2_Surface_Interface
436 void *(*data_get)(Ecore_Wl2_Surface *surface, void *priv_data, int *w, int *h); 436 void *(*data_get)(Ecore_Wl2_Surface *surface, void *priv_data, int *w, int *h);
437 int (*assign)(Ecore_Wl2_Surface *surface, void *priv_data); 437 int (*assign)(Ecore_Wl2_Surface *surface, void *priv_data);
438 void (*post)(Ecore_Wl2_Surface *surface, void *priv_data, Eina_Rectangle *rects, unsigned int count); 438 void (*post)(Ecore_Wl2_Surface *surface, void *priv_data, Eina_Rectangle *rects, unsigned int count);
439 void (*flush)(Ecore_Wl2_Surface *surface, void *priv_data); 439 void (*flush)(Ecore_Wl2_Surface *surface, void *priv_data, Eina_Bool purge);
440} Ecore_Wl2_Surface_Interface; 440} Ecore_Wl2_Surface_Interface;
441 441
442/** 442/**
@@ -1990,7 +1990,7 @@ EAPI void ecore_wl2_surface_reconfigure(Ecore_Wl2_Surface *surface, int w, int h
1990EAPI void *ecore_wl2_surface_data_get(Ecore_Wl2_Surface *surface, int *w, int *h); 1990EAPI void *ecore_wl2_surface_data_get(Ecore_Wl2_Surface *surface, int *w, int *h);
1991EAPI int ecore_wl2_surface_assign(Ecore_Wl2_Surface *surface); 1991EAPI int ecore_wl2_surface_assign(Ecore_Wl2_Surface *surface);
1992EAPI void ecore_wl2_surface_post(Ecore_Wl2_Surface *surface, Eina_Rectangle *rects, unsigned int count); 1992EAPI void ecore_wl2_surface_post(Ecore_Wl2_Surface *surface, Eina_Rectangle *rects, unsigned int count);
1993EAPI void ecore_wl2_surface_flush(Ecore_Wl2_Surface *surface); 1993EAPI void ecore_wl2_surface_flush(Ecore_Wl2_Surface *surface, Eina_Bool purge);
1994EAPI void ecore_wl2_window_surface_flush(Ecore_Wl2_Window *window); 1994EAPI void ecore_wl2_window_surface_flush(Ecore_Wl2_Window *window);
1995EAPI Ecore_Wl2_Buffer *ecore_wl2_surface_buffer_create(Ecore_Wl2_Surface *surface); 1995EAPI Ecore_Wl2_Buffer *ecore_wl2_surface_buffer_create(Ecore_Wl2_Surface *surface);
1996EAPI int ecore_wl2_surface_manager_add(Ecore_Wl2_Surface_Interface *intf); 1996EAPI int ecore_wl2_surface_manager_add(Ecore_Wl2_Surface_Interface *intf);
diff --git a/src/lib/ecore_wl2/ecore_wl2_surface.c b/src/lib/ecore_wl2/ecore_wl2_surface.c
index 78cbc5943f..0f769b486b 100644
--- a/src/lib/ecore_wl2/ecore_wl2_surface.c
+++ b/src/lib/ecore_wl2/ecore_wl2_surface.c
@@ -63,11 +63,11 @@ ecore_wl2_surface_post(Ecore_Wl2_Surface *surface, Eina_Rectangle *rects, unsign
63} 63}
64 64
65EAPI void 65EAPI void
66ecore_wl2_surface_flush(Ecore_Wl2_Surface *surface) 66ecore_wl2_surface_flush(Ecore_Wl2_Surface *surface, Eina_Bool purge)
67{ 67{
68 EINA_SAFETY_ON_NULL_RETURN(surface); 68 EINA_SAFETY_ON_NULL_RETURN(surface);
69 69
70 surface->funcs->flush(surface, surface->private_data); 70 surface->funcs->flush(surface, surface->private_data, purge);
71} 71}
72 72
73static Eina_Bool 73static Eina_Bool
@@ -77,7 +77,7 @@ _ecore_wl2_surface_cb_offscreen(void *data, int type EINA_UNUSED, void *event)
77 Ecore_Wl2_Surface *surf = data; 77 Ecore_Wl2_Surface *surf = data;
78 78
79 if (surf->wl2_win->id == (int)ev->win) 79 if (surf->wl2_win->id == (int)ev->win)
80 ecore_wl2_surface_flush(surf); 80 ecore_wl2_surface_flush(surf, EINA_FALSE);
81 81
82 return ECORE_CALLBACK_RENEW; 82 return ECORE_CALLBACK_RENEW;
83} 83}
diff --git a/src/lib/ecore_wl2/ecore_wl2_surface_module_dmabuf.c b/src/lib/ecore_wl2/ecore_wl2_surface_module_dmabuf.c
index f8630367f2..04e513b576 100644
--- a/src/lib/ecore_wl2/ecore_wl2_surface_module_dmabuf.c
+++ b/src/lib/ecore_wl2/ecore_wl2_surface_module_dmabuf.c
@@ -217,7 +217,7 @@ _evas_dmabuf_surface_destroy(Ecore_Wl2_Surface *s EINA_UNUSED, void *priv_data)
217} 217}
218 218
219static void 219static void
220_evas_dmabuf_surface_flush(Ecore_Wl2_Surface *surface EINA_UNUSED, void *priv_data) 220_evas_dmabuf_surface_flush(Ecore_Wl2_Surface *surface EINA_UNUSED, void *priv_data, Eina_Bool purge EINA_UNUSED)
221{ 221{
222 Ecore_Wl2_Dmabuf_Private *p; 222 Ecore_Wl2_Dmabuf_Private *p;
223 Ecore_Wl2_Buffer *b; 223 Ecore_Wl2_Buffer *b;
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c
index 2d0f04351f..a889b3a56d 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -1769,5 +1769,5 @@ ecore_wl2_window_surface_flush(Ecore_Wl2_Window *window)
1769 EINA_SAFETY_ON_NULL_RETURN(window); 1769 EINA_SAFETY_ON_NULL_RETURN(window);
1770 1770
1771 if (!window->wl2_surface) return; 1771 if (!window->wl2_surface) return;
1772 ecore_wl2_surface_flush(window->wl2_surface); 1772 ecore_wl2_surface_flush(window->wl2_surface, EINA_FALSE);
1773} 1773}