summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/gl_common/evas_gl_core.c
diff options
context:
space:
mode:
authorDongyeon Kim <dy5.kim@samsung.com>2016-01-11 10:11:58 +0900
committerDongyeon Kim <dy5.kim@samsung.com>2016-01-13 09:05:56 +0900
commitd7c2acfa7a2d804a060fb860ca8228852f720f42 (patch)
tree01c0f7b0fe127edb2d74e9b738a58482b8612a19 /src/modules/evas/engines/gl_common/evas_gl_core.c
parent43dc5c87fc1894c3cfca4b9320b284b3b76f67b1 (diff)
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.
Diffstat (limited to '')
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_core.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/modules/evas/engines/gl_common/evas_gl_core.c b/src/modules/evas/engines/gl_common/evas_gl_core.c
index ba3496a99e..f851d560cc 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_core.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_core.c
@@ -2081,6 +2081,8 @@ int
2081evgl_surface_destroy(void *eng_data, EVGL_Surface *sfc) 2081evgl_surface_destroy(void *eng_data, EVGL_Surface *sfc)
2082{ 2082{
2083 EVGL_Resource *rsc; 2083 EVGL_Resource *rsc;
2084 Eina_List *l;
2085 EVGL_Context *ctx;
2084 Eina_Bool dbg; 2086 Eina_Bool dbg;
2085 2087
2086 // Check input parameter 2088 // Check input parameter
@@ -2183,6 +2185,12 @@ evgl_surface_destroy(void *eng_data, EVGL_Surface *sfc)
2183 evgl_engine->surfaces = eina_list_remove(evgl_engine->surfaces, sfc); 2185 evgl_engine->surfaces = eina_list_remove(evgl_engine->surfaces, sfc);
2184 LKU(evgl_engine->resource_lock); 2186 LKU(evgl_engine->resource_lock);
2185 2187
2188 EINA_LIST_FOREACH(evgl_engine->contexts, l, ctx)
2189 {
2190 if (ctx->current_sfc == sfc)
2191 ctx->current_sfc = NULL;
2192 }
2193
2186 free(sfc); 2194 free(sfc);
2187 2195
2188 _surface_context_list_print(); 2196 _surface_context_list_print();