wayland_shm: Add dmabuf to engine info

Get the dmabuf protocol object from ecore_wl2 and store it in engine info
This commit is contained in:
Derek Foreman 2016-04-11 16:10:33 -05:00 committed by Mike Blumenkrantz
parent f7cbb12fd4
commit 34e539a3c1
4 changed files with 5 additions and 0 deletions

View 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 = \

View 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;

View 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;

View 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"