forked from enlightenment/efl
ecore_wl2: Add API for setting buffer busy status and use it
Since surfaces will be managed by plug-ins, we need to make sure they don't rely on internal structures.
This commit is contained in:
parent
e3a3e02042
commit
ebcce5aefa
|
@ -2008,6 +2008,7 @@ EAPI void ecore_wl2_buffer_discard(Ecore_Wl2_Buffer *buf);
|
|||
EAPI void ecore_wl2_buffer_unlock(Ecore_Wl2_Buffer *b);
|
||||
EAPI void ecore_wl2_buffer_destroy(Ecore_Wl2_Buffer *b);
|
||||
EAPI Eina_Bool ecore_wl2_buffer_busy_get(Ecore_Wl2_Buffer *buffer);
|
||||
EAPI void ecore_wl2_buffer_busy_set(Ecore_Wl2_Buffer *buffer);
|
||||
|
||||
EAPI Ecore_Wl2_Surface *ecore_wl2_surface_create(Ecore_Wl2_Window *win, Eina_Bool alpha);
|
||||
EAPI void ecore_wl2_surface_destroy(Ecore_Wl2_Surface *surface);
|
||||
|
|
|
@ -680,6 +680,14 @@ ecore_wl2_buffer_busy_get(Ecore_Wl2_Buffer *buffer)
|
|||
return (buffer->locked) || (buffer->busy);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_wl2_buffer_busy_set(Ecore_Wl2_Buffer *buffer)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN(buffer);
|
||||
|
||||
buffer->busy = EINA_TRUE;
|
||||
}
|
||||
|
||||
static Ecore_Wl2_Buffer *
|
||||
_ecore_wl2_buffer_partial_create(int w, int h, Eina_Bool alpha)
|
||||
{
|
||||
|
|
|
@ -146,7 +146,7 @@ _evas_dmabuf_surface_post(Ecore_Wl2_Surface *s, Eina_Rectangle *rects, unsigned
|
|||
ecore_wl2_buffer_unlock(b);
|
||||
|
||||
s->current = NULL;
|
||||
b->busy = EINA_TRUE;
|
||||
ecore_wl2_buffer_busy_set(b);
|
||||
b->age = 0;
|
||||
|
||||
ecore_wl2_window_buffer_attach(s->wl2_win, b->wl_buffer, 0, 0, EINA_FALSE);
|
||||
|
|
Loading…
Reference in New Issue