discomfitor pushed a commit to branch master.

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

commit d6e5bdf4289bdb1d594145ad8cc704368df6e518
Author: Derek Foreman <der...@osg.samsung.com>
Date:   Fri Apr 8 15:17:00 2016 -0500

    ecore_wl2: Bind dmabuf global if available
    
    Bind the dmabuf global so we can make use of it later.
---
 src/lib/ecore_wl2/ecore_wl2_display.c | 17 +++++++++++++++++
 src/lib/ecore_wl2/ecore_wl2_private.h |  1 +
 2 files changed, 18 insertions(+)

diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c 
b/src/lib/ecore_wl2/ecore_wl2_display.c
index d141250..42ea79d 100644
--- a/src/lib/ecore_wl2/ecore_wl2_display.c
+++ b/src/lib/ecore_wl2/ecore_wl2_display.c
@@ -6,6 +6,7 @@
 
 /* for MIN() */
 #include <sys/param.h>
+#include "linux-dmabuf-unstable-v1-client-protocol.h"
 
 static Eina_Bool _fatal_error = EINA_FALSE;
 static Eina_Hash *_server_displays = NULL;
@@ -35,6 +36,16 @@ static const struct xdg_shell_listener _xdg_shell_listener =
 };
 
 static void
+_dmabuf_cb_format(void *data EINA_UNUSED, struct zwp_linux_dmabuf_v1 *dmabuf 
EINA_UNUSED, uint32_t format EINA_UNUSED)
+{
+   /* It would be awfully nice if this actually happened */
+};
+
+static const struct zwp_linux_dmabuf_v1_listener _dmabuf_listener = {
+        _dmabuf_cb_format
+};
+
+static void
 _cb_global_event_free(void *data EINA_UNUSED, void *event)
 {
    Ecore_Wl2_Event_Global *ev;
@@ -96,6 +107,12 @@ _cb_global_add(void *data, struct wl_registry *registry, 
unsigned int id, const
         ewd->wl.shm =
           wl_registry_bind(registry, id, &wl_shm_interface, 1);
      }
+   else if (!strcmp(interface, "zwp_linux_dmabuf_v1"))
+     {
+        ewd->wl.dmabuf =
+          wl_registry_bind(registry, id, &zwp_linux_dmabuf_v1_interface, 1);
+        zwp_linux_dmabuf_v1_add_listener(ewd->wl.dmabuf, &_dmabuf_listener, 
ewd);
+     }
    else if (!strcmp(interface, "wl_data_device_manager"))
      {
         ewd->wl.data_device_manager =
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h 
b/src/lib/ecore_wl2/ecore_wl2_private.h
index d3a00de..91074a7 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -75,6 +75,7 @@ struct _Ecore_Wl2_Display
         struct wl_subcompositor *subcompositor;
         struct wl_data_device_manager *data_device_manager;
         struct wl_shm *shm;
+        struct zwp_linux_dmabuf_v1 *dmabuf;
         struct wl_shell *wl_shell;
         struct xdg_shell *xdg_shell;
         struct www *www;

-- 


Reply via email to