summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wl2/ecore_wl2_buffer.c
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2018-01-26 13:30:31 -0600
committerDerek Foreman <derekf@osg.samsung.com>2018-01-26 15:54:00 -0600
commit288b693ac4ae132b7493d2081692c851c37c2038 (patch)
treeae69786f84b6ac73b77a70df0014bbde17e12864 /src/lib/ecore_wl2/ecore_wl2_buffer.c
parent0fc4fa71565a466ce006a08b3d2f9099f074d0cc (diff)
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.
Diffstat (limited to 'src/lib/ecore_wl2/ecore_wl2_buffer.c')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_buffer.c6
1 files changed, 3 insertions, 3 deletions
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
616} 616}
617 617
618EAPI struct wl_buffer * 618EAPI struct wl_buffer *
619ecore_wl2_buffer_wl_buffer_get(Ecore_Wl2_Display *ewd, Ecore_Wl2_Buffer *buf) 619ecore_wl2_buffer_wl_buffer_get(Ecore_Wl2_Buffer *buf)
620{ 620{
621 return buffer_manager->to_buffer(ewd, buf); 621 return buf->wl_buffer;
622} 622}
623 623
624EAPI void * 624EAPI void *
@@ -777,7 +777,7 @@ ecore_wl2_buffer_create(Ecore_Wl2_Display *ewd, int w, int h, Eina_Bool alpha)
777 out = _ecore_wl2_buffer_partial_create(w, h, alpha); 777 out = _ecore_wl2_buffer_partial_create(w, h, alpha);
778 if (!out) return NULL; 778 if (!out) return NULL;
779 779
780 out->wl_buffer = ecore_wl2_buffer_wl_buffer_get(ewd, out); 780 out->wl_buffer = buffer_manager->to_buffer(ewd, out);
781 781
782 return out; 782 return out;
783} 783}