When evas gl surface is destroyed, not only the current surface for the current context
should be set to NULL, but current surface for all contexts should be reset.
evgl_surface_destroy(void *eng_data, EVGL_Surface *sfc)
{
EVGL_Resource *rsc;
+ Eina_List *l;
+ EVGL_Context *ctx;
Eina_Bool dbg;
// Check input parameter
evgl_engine->surfaces = eina_list_remove(evgl_engine->surfaces, sfc);
LKU(evgl_engine->resource_lock);
+ EINA_LIST_FOREACH(evgl_engine->contexts, l, ctx)
+ {
+ if (ctx->current_sfc == sfc)
+ ctx->current_sfc = NULL;
+ }
+
free(sfc);
_surface_context_list_print();