diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2017-11-30 15:33:38 -0600 |
---|---|---|
committer | Derek Foreman <derekf@osg.samsung.com> | 2017-12-01 10:59:51 -0600 |
commit | 7658fc101f59a27a4cd18c8fb51c9ea38d9f2b4b (patch) | |
tree | 832046672e9cd5c1c282cbe50450bb45dd5e9c26 | |
parent | c48ca81026b3c8f5b3a832419099696d0931f0f6 (diff) |
ecore_wl2: Add API ecore_wl2_window_surface_flush
This allows something that only has the Ecore_Wl2_Window (ie: something
that isn't engine code) to force dropping of all the buffers.
This should be safe to call at any time as the buffer handling logic
will properly cleanup the buffers when async render is done with them
or the compositor releases them.
This will eventually be used when a wayland client receives a
wl_output.leave events to indicate it isn't displayed on any outputs.
Diffstat (limited to '')
-rw-r--r-- | src/lib/ecore_wl2/Ecore_Wl2.h | 1 | ||||
-rw-r--r-- | src/lib/ecore_wl2/ecore_wl2_window.c | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index a348357b25..97f53d5ab8 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h | |||
@@ -2004,6 +2004,7 @@ EAPI void *ecore_wl2_surface_data_get(Ecore_Wl2_Surface *surface, int *w, int *h | |||
2004 | EAPI int ecore_wl2_surface_assign(Ecore_Wl2_Surface *surface); | 2004 | EAPI int ecore_wl2_surface_assign(Ecore_Wl2_Surface *surface); |
2005 | EAPI void ecore_wl2_surface_post(Ecore_Wl2_Surface *surface, Eina_Rectangle *rects, unsigned int count); | 2005 | EAPI void ecore_wl2_surface_post(Ecore_Wl2_Surface *surface, Eina_Rectangle *rects, unsigned int count); |
2006 | EAPI void ecore_wl2_surface_flush(Ecore_Wl2_Surface *surface); | 2006 | EAPI void ecore_wl2_surface_flush(Ecore_Wl2_Surface *surface); |
2007 | EAPI void ecore_wl2_window_surface_flush(Ecore_Wl2_Window *window); | ||
2007 | 2008 | ||
2008 | # endif | 2009 | # endif |
2009 | 2010 | ||
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index b23fb252b6..8f6a579a4a 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c | |||
@@ -1643,3 +1643,12 @@ ecore_wl2_window_damage(Ecore_Wl2_Window *window, Eina_Rectangle *rects, unsigne | |||
1643 | else | 1643 | else |
1644 | damage(window->surface, 0, 0, INT_MAX, INT_MAX); | 1644 | damage(window->surface, 0, 0, INT_MAX, INT_MAX); |
1645 | } | 1645 | } |
1646 | |||
1647 | EAPI void | ||
1648 | ecore_wl2_window_surface_flush(Ecore_Wl2_Window *window) | ||
1649 | { | ||
1650 | EINA_SAFETY_ON_NULL_RETURN(window); | ||
1651 | |||
1652 | if (!window->wl2_surface) return; | ||
1653 | ecore_wl2_surface_flush(window->wl2_surface); | ||
1654 | } | ||