aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@samsung.com>2013-06-14 15:51:18 +0900
committerCedric Bail <cedric.bail@samsung.com>2013-06-14 16:38:18 +0900
commit1403b3a9adb7677a05bd5c532c776090fe175e29 (patch)
tree637cd6c2f00b7fb0acca1c33fde5371bef8108eb
parentevas: change cache API to forward Eo object. (diff)
downloadefl-1403b3a9adb7677a05bd5c532c776090fe175e29.tar.gz
evas: preliminary work on texture destruction for async preload of texture.
-rw-r--r--src/modules/evas/engines/gl_cocoa/evas_engine.c4
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_common.h2
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_context.c2
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_font.c2
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_image.c18
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_texture.c2
-rw-r--r--src/modules/evas/engines/gl_sdl/evas_engine.c4
-rw-r--r--src/modules/evas/engines/gl_x11/evas_engine.c4
-rw-r--r--src/modules/evas/engines/wayland_egl/evas_engine.c4
9 files changed, 21 insertions, 21 deletions
diff --git a/src/modules/evas/engines/gl_cocoa/evas_engine.c b/src/modules/evas/engines/gl_cocoa/evas_engine.c
index 5daef4e1e1..bdc0b2cd95 100644
--- a/src/modules/evas/engines/gl_cocoa/evas_engine.c
+++ b/src/modules/evas/engines/gl_cocoa/evas_engine.c
@@ -536,7 +536,7 @@ eng_image_colorspace_set(void *data, void *image, int cspace)
break;
case EVAS_COLORSPACE_YCBCR422P601_PL:
case EVAS_COLORSPACE_YCBCR422P709_PL:
- if (im->tex) evas_gl_common_texture_free(im->tex);
+ if (im->tex) evas_gl_common_texture_free(im->tex, EINA_TRUE);
im->tex = NULL;
if (im->cs.data)
{
@@ -657,7 +657,7 @@ eng_image_size_set(void *data, void *image, int w, int h)
eng_window_use(re->win);
if ((im->tex) && (im->tex->pt->dyn.img))
{
- evas_gl_common_texture_free(im->tex);
+ evas_gl_common_texture_free(im->tex, EINA_TRUE);
im->tex = NULL;
im->w = w;
im->h = h;
diff --git a/src/modules/evas/engines/gl_common/evas_gl_common.h b/src/modules/evas/engines/gl_common/evas_gl_common.h
index 0da409beb9..4bc219683c 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_common.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_common.h
@@ -684,7 +684,7 @@ Evas_GL_Texture *evas_gl_common_texture_native_new(Evas_Engine_GL_Context *gc,
Evas_GL_Texture *evas_gl_common_texture_render_new(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, int alpha);
Evas_GL_Texture *evas_gl_common_texture_dynamic_new(Evas_Engine_GL_Context *gc, Evas_GL_Image *im);
void evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im);
-void evas_gl_common_texture_free(Evas_GL_Texture *tex);
+void evas_gl_common_texture_free(Evas_GL_Texture *tex, Eina_Bool force);
Evas_GL_Texture *evas_gl_common_texture_alpha_new(Evas_Engine_GL_Context *gc, DATA8 *pixels, unsigned int w, unsigned int h, int fh);
void evas_gl_common_texture_alpha_update(Evas_GL_Texture *tex, DATA8 *pixels, unsigned int w, unsigned int h, int fh);
Evas_GL_Texture *evas_gl_common_texture_yuv_new(Evas_Engine_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h);
diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c b/src/modules/evas/engines/gl_common/evas_gl_context.c
index 0308d90523..f99be54c10 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_context.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_context.c
@@ -867,7 +867,7 @@ evas_gl_common_context_free(Evas_Engine_GL_Context *gc)
}
while (gc->font_glyph_textures)
- evas_gl_common_texture_free(gc->font_glyph_textures->data);
+ evas_gl_common_texture_free(gc->font_glyph_textures->data, EINA_TRUE);
if ((gc->shared) && (gc->shared->references == 0))
{
diff --git a/src/modules/evas/engines/gl_common/evas_gl_font.c b/src/modules/evas/engines/gl_common/evas_gl_font.c
index 2aaa86ac17..d71c55b87a 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_font.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_font.c
@@ -96,7 +96,7 @@ void
evas_gl_font_texture_free(void *tex)
{
if (!tex) return;
- evas_gl_common_texture_free(tex);
+ evas_gl_common_texture_free(tex, EINA_TRUE);
}
void
diff --git a/src/modules/evas/engines/gl_common/evas_gl_image.c b/src/modules/evas/engines/gl_common/evas_gl_image.c
index a8036ad874..f8cdd111f8 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_image.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_image.c
@@ -13,7 +13,7 @@ evas_gl_common_image_all_unload(Evas_Engine_GL_Context *gc)
{
if (!im->tex->pt->dyn.img)
{
- evas_gl_common_texture_free(im->tex);
+ evas_gl_common_texture_free(im->tex, EINA_TRUE);
im->tex = NULL;
}
}
@@ -218,7 +218,7 @@ evas_gl_common_image_new_from_data(Evas_Engine_GL_Context *gc, unsigned int w, u
break;
case EVAS_COLORSPACE_YCBCR422P601_PL:
case EVAS_COLORSPACE_YCBCR422P709_PL:
- if (im->tex) evas_gl_common_texture_free(im->tex);
+ if (im->tex) evas_gl_common_texture_free(im->tex, EINA_TRUE);
im->tex = NULL;
im->cs.data = data;
im->cs.no_free = 1;
@@ -260,7 +260,7 @@ evas_gl_common_image_new_from_copied_data(Evas_Engine_GL_Context *gc, unsigned i
break;
case EVAS_COLORSPACE_YCBCR422P601_PL:
case EVAS_COLORSPACE_YCBCR422P709_PL:
- if (im->tex) evas_gl_common_texture_free(im->tex);
+ if (im->tex) evas_gl_common_texture_free(im->tex, EINA_TRUE);
im->tex = NULL;
im->cs.no_free = 0;
if (im->im->cache_entry.h > 0)
@@ -335,7 +335,7 @@ evas_gl_common_image_alpha_set(Evas_GL_Image *im, int alpha)
evas_cache_image_load_data(&im->im->cache_entry);
im->im->cache_entry.flags.alpha = alpha ? 1 : 0;
- if (im->tex) evas_gl_common_texture_free(im->tex);
+ if (im->tex) evas_gl_common_texture_free(im->tex, EINA_TRUE);
if (im->tex_only)
{
im->tex = evas_gl_common_texture_native_new(im->gc, im->w, im->h,
@@ -372,7 +372,7 @@ evas_gl_common_image_native_enable(Evas_GL_Image *im)
}
if (im->tex)
{
- evas_gl_common_texture_free(im->tex);
+ evas_gl_common_texture_free(im->tex, EINA_TRUE);
im->tex = NULL;
}
@@ -391,7 +391,7 @@ evas_gl_common_image_native_disable(Evas_GL_Image *im)
}
if (im->tex)
{
- evas_gl_common_texture_free(im->tex);
+ evas_gl_common_texture_free(im->tex, EINA_TRUE);
im->tex = NULL;
}
im->tex_only = 0;
@@ -446,7 +446,7 @@ evas_gl_common_image_content_hint_set(Evas_GL_Image *im, int hint)
}
if (im->tex)
{
- evas_gl_common_texture_free(im->tex);
+ evas_gl_common_texture_free(im->tex, EINA_TRUE);
im->tex = NULL;
}
im->tex = evas_gl_common_texture_dynamic_new(im->gc, im);
@@ -461,7 +461,7 @@ evas_gl_common_image_content_hint_set(Evas_GL_Image *im, int hint)
}
if (im->tex)
{
- evas_gl_common_texture_free(im->tex);
+ evas_gl_common_texture_free(im->tex, EINA_TRUE);
im->tex = NULL;
}
im->tex_only = 0;
@@ -501,7 +501,7 @@ evas_gl_common_image_free(Evas_GL_Image *im)
if (_evas_gl_image_cache_add(im)) return;
}
if (im->im) evas_cache_image_drop(&im->im->cache_entry);
- if (im->tex) evas_gl_common_texture_free(im->tex);
+ if (im->tex) evas_gl_common_texture_free(im->tex, EINA_TRUE);
free(im);
}
diff --git a/src/modules/evas/engines/gl_common/evas_gl_texture.c b/src/modules/evas/engines/gl_common/evas_gl_texture.c
index 1e6a8d67de..247add48ea 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_texture.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_texture.c
@@ -933,7 +933,7 @@ evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im)
}
void
-evas_gl_common_texture_free(Evas_GL_Texture *tex)
+evas_gl_common_texture_free(Evas_GL_Texture *tex, Eina_Bool force EINA_UNUSED)
{
if (!tex) return;
tex->references--;
diff --git a/src/modules/evas/engines/gl_sdl/evas_engine.c b/src/modules/evas/engines/gl_sdl/evas_engine.c
index ceb70c5f56..daf1d26850 100644
--- a/src/modules/evas/engines/gl_sdl/evas_engine.c
+++ b/src/modules/evas/engines/gl_sdl/evas_engine.c
@@ -430,7 +430,7 @@ eng_image_colorspace_set(void *data EINA_UNUSED, void *image, int cspace)
case EVAS_COLORSPACE_YCBCR422601_PL:
case EVAS_COLORSPACE_YCBCR420NV12601_PL:
case EVAS_COLORSPACE_YCBCR420TM12601_PL:
- if (im->tex) evas_gl_common_texture_free(im->tex);
+ if (im->tex) evas_gl_common_texture_free(im->tex, EINA_TRUE);
im->tex = NULL;
if (im->cs.data)
{
@@ -546,7 +546,7 @@ eng_image_size_set(void *data, void *image, int w, int h)
}
if ((im->tex) && (im->tex->pt->dyn.img))
{
- evas_gl_common_texture_free(im->tex);
+ evas_gl_common_texture_free(im->tex, EINA_TRUE);
im->tex = NULL;
im->w = w;
im->h = h;
diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c b/src/modules/evas/engines/gl_x11/evas_engine.c
index a7a0361d55..ee05576a01 100644
--- a/src/modules/evas/engines/gl_x11/evas_engine.c
+++ b/src/modules/evas/engines/gl_x11/evas_engine.c
@@ -1810,7 +1810,7 @@ eng_image_colorspace_set(void *data, void *image, int cspace)
case EVAS_COLORSPACE_YCBCR422601_PL:
case EVAS_COLORSPACE_YCBCR420NV12601_PL:
case EVAS_COLORSPACE_YCBCR420TM12601_PL:
- if (im->tex) evas_gl_common_texture_free(im->tex);
+ if (im->tex) evas_gl_common_texture_free(im->tex, EINA_TRUE);
im->tex = NULL;
if (im->cs.data)
{
@@ -2519,7 +2519,7 @@ eng_image_size_set(void *data, void *image, int w, int h)
eng_window_use(re->win);
if ((im->tex) && (im->tex->pt->dyn.img))
{
- evas_gl_common_texture_free(im->tex);
+ evas_gl_common_texture_free(im->tex, EINA_TRUE);
im->tex = NULL;
im->w = w;
im->h = h;
diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c b/src/modules/evas/engines/wayland_egl/evas_engine.c
index 884e469995..1e1c49b16c 100644
--- a/src/modules/evas/engines/wayland_egl/evas_engine.c
+++ b/src/modules/evas/engines/wayland_egl/evas_engine.c
@@ -1561,7 +1561,7 @@ eng_image_size_set(void *data, void *image, int w, int h)
eng_window_use(re->win);
if ((im->tex) && (im->tex->pt->dyn.img))
{
- evas_gl_common_texture_free(im->tex);
+ evas_gl_common_texture_free(im->tex, EINA_TRUE);
im->tex = NULL;
im->w = w;
im->h = h;
@@ -1965,7 +1965,7 @@ eng_image_colorspace_set(void *data, void *image, int cspace)
case EVAS_COLORSPACE_YCBCR422601_PL:
case EVAS_COLORSPACE_YCBCR420NV12601_PL:
case EVAS_COLORSPACE_YCBCR420TM12601_PL:
- if (im->tex) evas_gl_common_texture_free(im->tex);
+ if (im->tex) evas_gl_common_texture_free(im->tex, EINA_TRUE);
im->tex = NULL;
if (im->cs.data)
{