diff --git a/legacy/evas/src/modules/engines/gl_common/evas_gl_common.h b/legacy/evas/src/modules/engines/gl_common/evas_gl_common.h index 6155f1e8db..a088748887 100644 --- a/legacy/evas/src/modules/engines/gl_common/evas_gl_common.h +++ b/legacy/evas/src/modules/engines/gl_common/evas_gl_common.h @@ -360,6 +360,7 @@ struct _Evas_GL_Texture_Pool unsigned int *data; int w, h; int stride; + int checked_out; } dyn; Eina_List *allocations; Eina_Bool whole : 1; diff --git a/legacy/evas/src/modules/engines/gl_common/evas_gl_texture.c b/legacy/evas/src/modules/engines/gl_common/evas_gl_texture.c index 47b29b892b..40ef3cfc73 100644 --- a/legacy/evas/src/modules/engines/gl_common/evas_gl_texture.c +++ b/legacy/evas/src/modules/engines/gl_common/evas_gl_texture.c @@ -647,12 +647,15 @@ evas_gl_texture_pool_empty(Evas_GL_Texture_Pool *pt) #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) if (pt->dyn.img) { + if (im->tex->pt->dyn.checked_out > 0) + glsym_eglUnmapImageSEC(pt->gc->egldisp, pt->dyn.img); secsym_eglDestroyImage(pt->gc->egldisp, pt->dyn.img); pt->dyn.img = NULL; pt->dyn.data = NULL; pt->dyn.w = 0; pt->dyn.h = 0; pt->dyn.stride = 0; + pt->dyn.checked_out = 0; } #endif