From b6296c6fb4a59bc9e48bac07f6414f0d8fcf1050 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Fri, 25 Aug 2017 10:50:45 -0700 Subject: [PATCH] evas: add infrastructure to find a gl_context from a GL_Engine. --- src/modules/evas/engines/gl_generic/evas_engine.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c index bba3c26..b437999 100644 --- a/src/modules/evas/engines/gl_generic/evas_engine.c +++ b/src/modules/evas/engines/gl_generic/evas_engine.c @@ -66,6 +66,22 @@ gl_generic_window_use(void *engine) re->window_use(re->software.ob); } +static Evas_Engine_GL_Context * +gl_generic_context_find(Render_Engine_GL_Generic *engine) +{ + Render_Output_GL_Generic *output; + Evas_Engine_GL_Context *r = NULL; + Eina_List *l; + + EINA_LIST_FOREACH(engine->software.outputs, l, output) + { + r = gl_generic_context_get(output); + if (r) return r; + } + + return r; +} + static int eng_gl_image_direct_get(void *data, void *image); static int eng_gl_surface_destroy(void *data, void *surface); static Eina_Bool eng_gl_surface_lock(void *data, void *surface); -- 2.7.4