forked from enlightenment/efl
ecore_wl2: fix ecore_wl2_buffer_wl_buffer_get
It was currently only used internally and had the side effect of creating a new buffer instead of just returning the existing one. Now it's useful to external callers, as it only returns the existing wl_buffer and has no freaky side effects.
This commit is contained in:
parent
0fc4fa7156
commit
288b693ac4
|
@ -2006,7 +2006,7 @@ EAPI void ecore_wl2_window_damage(Ecore_Wl2_Window *window, Eina_Rectangle *rect
|
|||
EAPI Eina_Bool ecore_wl2_buffer_init(Ecore_Wl2_Display *ewd, Ecore_Wl2_Buffer_Type types);
|
||||
EAPI Ecore_Wl2_Buffer *ecore_wl2_buffer_create(Ecore_Wl2_Display *ewd, int w, int h, Eina_Bool alpha);
|
||||
EAPI void ecore_wl2_buffer_destroy(Ecore_Wl2_Buffer *b);
|
||||
EAPI struct wl_buffer *ecore_wl2_buffer_wl_buffer_get(Ecore_Wl2_Display *ewd, Ecore_Wl2_Buffer *buf);
|
||||
EAPI struct wl_buffer *ecore_wl2_buffer_wl_buffer_get(Ecore_Wl2_Buffer *buf);
|
||||
EAPI void *ecore_wl2_buffer_map(Ecore_Wl2_Buffer *buf, int *w, int *h, int *stride);
|
||||
EAPI void ecore_wl2_buffer_unmap(Ecore_Wl2_Buffer *buf);
|
||||
EAPI void ecore_wl2_buffer_discard(Ecore_Wl2_Buffer *buf);
|
||||
|
|
|
@ -616,9 +616,9 @@ _buffer_manager_alloc(const char *name, int w, int h, unsigned long *stride, int
|
|||
}
|
||||
|
||||
EAPI struct wl_buffer *
|
||||
ecore_wl2_buffer_wl_buffer_get(Ecore_Wl2_Display *ewd, Ecore_Wl2_Buffer *buf)
|
||||
ecore_wl2_buffer_wl_buffer_get(Ecore_Wl2_Buffer *buf)
|
||||
{
|
||||
return buffer_manager->to_buffer(ewd, buf);
|
||||
return buf->wl_buffer;
|
||||
}
|
||||
|
||||
EAPI void *
|
||||
|
@ -777,7 +777,7 @@ ecore_wl2_buffer_create(Ecore_Wl2_Display *ewd, int w, int h, Eina_Bool alpha)
|
|||
out = _ecore_wl2_buffer_partial_create(w, h, alpha);
|
||||
if (!out) return NULL;
|
||||
|
||||
out->wl_buffer = ecore_wl2_buffer_wl_buffer_get(ewd, out);
|
||||
out->wl_buffer = buffer_manager->to_buffer(ewd, out);
|
||||
|
||||
return out;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue