derekf pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=288b693ac4ae132b7493d2081692c851c37c2038

commit 288b693ac4ae132b7493d2081692c851c37c2038
Author: Derek Foreman <[email protected]>
Date:   Fri Jan 26 13:30:31 2018 -0600

    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.
---
 src/lib/ecore_wl2/Ecore_Wl2.h        | 2 +-
 src/lib/ecore_wl2/ecore_wl2_buffer.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index d03537f2a6..4207bf40cf 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -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);
diff --git a/src/lib/ecore_wl2/ecore_wl2_buffer.c 
b/src/lib/ecore_wl2/ecore_wl2_buffer.c
index 3bb56748cd..50dca1b35a 100644
--- a/src/lib/ecore_wl2/ecore_wl2_buffer.c
+++ b/src/lib/ecore_wl2/ecore_wl2_buffer.c
@@ -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;
 }

-- 


Reply via email to