From 6d1d47d50d4b7d2cf5c86f3e339dd2e9c9482132 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Fri, 25 Aug 2017 15:44:19 -0700 Subject: [PATCH] evas: fix build with egl. --- src/modules/evas/engines/gl_generic/evas_engine.c | 21 ++++++++++++++++++--- src/modules/evas/engines/wayland_egl/evas_engine.c | 4 ++-- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c index 6872fe4..dab1738 100644 --- a/src/modules/evas/engines/gl_generic/evas_engine.c +++ b/src/modules/evas/engines/gl_generic/evas_engine.c @@ -137,6 +137,21 @@ _context_stored_reset(void *data EINA_UNUSED, void *surface) #define CONTEXT_STORE(data, surface, context) _context_store(data, surface, context) #define CONTEXT_STORED_RESET(data, surface) _context_stored_reset(data, surface) +#ifdef GL_GLES +static void * +egl_display_get(Render_Engine_GL_Generic *engine) +{ + Render_Output_GL_Generic *output; + Eina_List *l; + + EINA_LIST_FOREACH(engine->software.outputs, l, output) + if (output->software.ob) + return output->window_egl_display_get(output->software.ob); + + return NULL; +} +#endif + static void * eng_engine_new(void) { @@ -796,7 +811,7 @@ eng_image_data_get(void *engine, void *image, int to_write, DATA32 **image_data, } else if ((im->gc->shared->info.sec_image_map) && (secsym_eglMapImageSEC)) { - void *disp = re->window_egl_display_get(re->software.ob); + void *disp = egl_display_get(engine); *image_data = im->tex->pt->dyn.data = secsym_eglMapImageSEC(disp, im->tex->pt->dyn.img, EGL_MAP_GL_TEXTURE_DEVICE_CPU_SEC, @@ -1000,7 +1015,7 @@ eng_image_data_put(void *engine, void *image, DATA32 *image_data) } else if (im->gc->shared->info.sec_image_map) { - void *disp = disp = re->window_egl_display_get(re->software.ob); + void *disp = disp = egl_display_get(engine); secsym_eglUnmapImageSEC(disp, im->tex->pt->dyn.img, EGL_MAP_GL_TEXTURE_DEVICE_CPU_SEC); } } @@ -1869,7 +1884,7 @@ eng_gl_surface_query(void *eng, void *surface, int attr, void *value) Eina_Bool ok; void *disp; - disp = re->window_egl_display_get(re->software.ob); + disp = egl_display_get(engine); ok = eglQuerySurface(disp, sfc->pbuffer.native_surface, attr, &val); if (!ok) return EINA_FALSE; switch (attr) diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c b/src/modules/evas/engines/wayland_egl/evas_engine.c index be50952..c640f6c 100644 --- a/src/modules/evas/engines/wayland_egl/evas_engine.c +++ b/src/modules/evas/engines/wayland_egl/evas_engine.c @@ -505,9 +505,9 @@ static const EVGL_Interface evgl_funcs = static void eng_output_info_setup(void *info) { - Evas_Engine_Info_Wayland *info = info; + Evas_Engine_Info_Wayland *in = info; - info->render_mode = EVAS_RENDER_MODE_BLOCKING; + in->render_mode = EVAS_RENDER_MODE_BLOCKING; } static Render_Output_Swap_Mode -- 2.7.4