wayland_shm: Add dmabuf to engine info
authorDerek Foreman <derekf@osg.samsung.com>
Mon, 11 Apr 2016 21:10:33 +0000 (16:10 -0500)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Tue, 19 Apr 2016 19:11:09 +0000 (15:11 -0400)
Get the dmabuf protocol object from ecore_wl2 and store it in engine info

src/Makefile_Evas.am
src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
src/modules/evas/engines/wayland_shm/Evas_Engine_Wayland_Shm.h
src/modules/evas/engines/wayland_shm/evas_engine.h

index c0f5a9c..8ad7567 100644 (file)
@@ -1256,6 +1256,7 @@ modules_evas_engines_wayland_shm_module_la_SOURCES = $(WAYLAND_SHM_SOURCES)
 modules_evas_engines_wayland_shm_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
 -I$(top_srcdir)/src/lib/evas/include \
 -I$(top_srcdir)/src/lib/evas/cserve2 \
+-I$(top_srcdir)/src/lib/ecore_wl2 \
 @EVAS_CFLAGS@ \
 @evas_engine_wayland_shm_cflags@
 modules_evas_engines_wayland_shm_module_la_LIBADD = \
index 1afa86d..d97ce8b 100644 (file)
@@ -132,6 +132,7 @@ _ee_cb_sync_done(void *data, int type EINA_UNUSED, void *event EINA_UNUSED)
    if ((einfo = (Evas_Engine_Info_Wayland_Shm *)evas_engine_info_get(ee->evas)))
      {
         einfo->info.wl_disp = ecore_wl2_display_get(wdata->display);
+        einfo->info.wl_dmabuf = ecore_wl2_display_dmabuf_get(wdata->display);
         einfo->info.wl_shm = ecore_wl2_display_shm_get(wdata->display);
         einfo->info.compositor_version = ecore_wl2_display_compositor_version_get(wdata->display);
         einfo->info.destination_alpha = EINA_TRUE;
@@ -329,6 +330,7 @@ ecore_evas_wayland_shm_new_internal(const char *disp_name, unsigned int parent,
         if ((einfo = (Evas_Engine_Info_Wayland_Shm *)evas_engine_info_get(ee->evas)))
           {
              einfo->info.wl_disp = ecore_wl2_display_get(ewd);
+             einfo->info.wl_dmabuf = ecore_wl2_display_dmabuf_get(ewd);
              einfo->info.wl_shm = ecore_wl2_display_shm_get(ewd);
              einfo->info.destination_alpha = EINA_TRUE;
              einfo->info.rotation = ee->rotation;
index c7c6873..d25eb04 100644 (file)
@@ -14,6 +14,7 @@ struct _Evas_Engine_Info_Wayland_Shm
      {
         /* the wayland shm object used to create new shm pool */
         struct wl_shm *wl_shm;
+        struct zwp_linux_dmabuf_v1 *wl_dmabuf;
         struct wl_surface *wl_surface;
 
         unsigned int rotation, depth;
index 14c2f42..c00d14d 100644 (file)
@@ -66,6 +66,7 @@ extern int _evas_engine_way_shm_log_dom;
 # define CRI(...) EINA_LOG_DOM_CRIT(_evas_engine_way_shm_log_dom, __VA_ARGS__)
 
 # include <wayland-client.h>
+# include "linux-dmabuf-unstable-v1-client-protocol.h"
 # include "../software_generic/Evas_Engine_Software_Generic.h"
 # include "Evas_Engine_Wayland_Shm.h"