From: Cedric BAIL Date: Fri, 25 Aug 2017 17:50:45 +0000 (-0700) Subject: evas: add infrastructure to find a gl_context from a GL_Engine. X-Git-Tag: submit/sandbox/upgrade/efl120/20180319.053334~2979 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b6296c6fb4a59bc9e48bac07f6414f0d8fcf1050;p=platform%2Fupstream%2Fefl.git evas: add infrastructure to find a gl_context from a GL_Engine. --- 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);