summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wl2/ecore_wl2_buffer.c
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-11-14 16:09:26 -0600
committerDerek Foreman <derekf@osg.samsung.com>2017-11-15 11:54:37 -0600
commit3ac556f2e1674f988efaada9c6dc6a41807254d9 (patch)
tree89b0ba0e976a11e8281168096ae65d916e13dfe3 /src/lib/ecore_wl2/ecore_wl2_buffer.c
parent04cebba6231e737457a36a81c643439c43571724 (diff)
ecore_wl2: factor out part of buffer creation
So we can use it to make a non-immediate mode buffer test.
Diffstat (limited to 'src/lib/ecore_wl2/ecore_wl2_buffer.c')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_buffer.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_buffer.c b/src/lib/ecore_wl2/ecore_wl2_buffer.c
index 6fd725240c..a9e911bab1 100644
--- a/src/lib/ecore_wl2/ecore_wl2_buffer.c
+++ b/src/lib/ecore_wl2/ecore_wl2_buffer.c
@@ -533,8 +533,8 @@ ecore_wl2_buffer_destroy(Ecore_Wl2_Buffer *b)
533 free(b); 533 free(b);
534} 534}
535 535
536EAPI Ecore_Wl2_Buffer * 536static Ecore_Wl2_Buffer *
537ecore_wl2_buffer_create(Ecore_Wl2_Display *ewd, int w, int h, Eina_Bool alpha) 537_ecore_wl2_buffer_partial_create(int w, int h, Eina_Bool alpha)
538{ 538{
539 Ecore_Wl2_Buffer *out; 539 Ecore_Wl2_Buffer *out;
540 540
@@ -553,6 +553,17 @@ ecore_wl2_buffer_create(Ecore_Wl2_Display *ewd, int w, int h, Eina_Bool alpha)
553 out->h = h; 553 out->h = h;
554 out->size = out->stride * h; 554 out->size = out->stride * h;
555 555
556 return out;
557}
558
559EAPI Ecore_Wl2_Buffer *
560ecore_wl2_buffer_create(Ecore_Wl2_Display *ewd, int w, int h, Eina_Bool alpha)
561{
562 Ecore_Wl2_Buffer *out;
563
564 out = _ecore_wl2_buffer_partial_create(w, h, alpha);
565 if (!out) return NULL;
566
556 out->wl_buffer = ecore_wl2_buffer_wl_buffer_get(ewd, out); 567 out->wl_buffer = ecore_wl2_buffer_wl_buffer_get(ewd, out);
557 568
558 return out; 569 return out;