From: raster Date: Fri, 11 Nov 2011 07:36:15 +0000 (+0000) Subject: handle refcounting of dyn img data to allow for get, get, set, set X-Git-Tag: 2.0_alpha~170^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cf1b5e2f13ed3eb21fa8abafd6f07411f45ec4e6;p=framework%2Fuifw%2Fevas.git handle refcounting of dyn img data to allow for get, get, set, set pairs. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@65051 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/modules/engines/gl_common/evas_gl_common.h b/src/modules/engines/gl_common/evas_gl_common.h index 6155f1e..a088748 100644 --- a/src/modules/engines/gl_common/evas_gl_common.h +++ b/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/src/modules/engines/gl_common/evas_gl_texture.c b/src/modules/engines/gl_common/evas_gl_texture.c index 47b29b8..40ef3cf 100644 --- a/src/modules/engines/gl_common/evas_gl_texture.c +++ b/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