forked from enlightenment/efl
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.
This commit is contained in:
parent
c48ca81026
commit
7658fc101f
|
@ -2004,6 +2004,7 @@ EAPI void *ecore_wl2_surface_data_get(Ecore_Wl2_Surface *surface, int *w, int *h
|
|||
EAPI int ecore_wl2_surface_assign(Ecore_Wl2_Surface *surface);
|
||||
EAPI void ecore_wl2_surface_post(Ecore_Wl2_Surface *surface, Eina_Rectangle *rects, unsigned int count);
|
||||
EAPI void ecore_wl2_surface_flush(Ecore_Wl2_Surface *surface);
|
||||
EAPI void ecore_wl2_window_surface_flush(Ecore_Wl2_Window *window);
|
||||
|
||||
# endif
|
||||
|
||||
|
|
|
@ -1643,3 +1643,12 @@ ecore_wl2_window_damage(Ecore_Wl2_Window *window, Eina_Rectangle *rects, unsigne
|
|||
else
|
||||
damage(window->surface, 0, 0, INT_MAX, INT_MAX);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_wl2_window_surface_flush(Ecore_Wl2_Window *window)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN(window);
|
||||
|
||||
if (!window->wl2_surface) return;
|
||||
ecore_wl2_surface_flush(window->wl2_surface);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue