forked from enlightenment/efl
evas: preliminary work on texture destruction for async preload of texture.
This commit is contained in:
parent
1073084807
commit
1403b3a9ad
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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))
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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--;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue