Evas GL: Reset current surface for all contexts to null when surface is destroyed

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.
This commit is contained in:
Dongyeon Kim 2016-01-11 10:11:58 +09:00
parent 43dc5c87fc
commit d7c2acfa7a
1 changed files with 8 additions and 0 deletions

View File

@ -2081,6 +2081,8 @@ int
evgl_surface_destroy(void *eng_data, EVGL_Surface *sfc)
{
EVGL_Resource *rsc;
Eina_List *l;
EVGL_Context *ctx;
Eina_Bool dbg;
// Check input parameter
@ -2183,6 +2185,12 @@ evgl_surface_destroy(void *eng_data, EVGL_Surface *sfc)
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();