forked from enlightenment/efl
evas/gl : Do not re-preload image data if texture is successfully uploaded with image data.
Summary: 'cached' flag is not enough to check whethere data is loaded and texture is uploaded. so check more options for prevent re-preload image data on gl-backend. Test Plan: Local Test (elementary_test : elm images) Reviewers: jpeg, eunue Reviewed By: jpeg Subscribers: cedric, jiin.moon, wonsik, spacegrapher Differential Revision: https://phab.enlightenment.org/D3446
This commit is contained in:
parent
1921055644
commit
25ebd91555
|
@ -1268,7 +1268,7 @@ evas_cache_image_preload_data(Image_Entry *im, const Eo *target,
|
|||
{
|
||||
RGBA_Image *img = (RGBA_Image *)im;
|
||||
|
||||
if (((im->flags.loaded) && (img->image.data)) || im->flags.cached)
|
||||
if (((im->flags.loaded) && (img->image.data)) || (im->flags.textured && !im->flags.updated_data))
|
||||
{
|
||||
evas_object_inform_call_image_preloaded((Evas_Object*)target);
|
||||
return;
|
||||
|
|
|
@ -567,6 +567,7 @@ struct _Image_Entry_Flags
|
|||
|
||||
Eina_Bool updated_data : 1;
|
||||
Eina_Bool flipped : 1;
|
||||
Eina_Bool textured : 1;
|
||||
};
|
||||
|
||||
struct _Image_Entry_Frame
|
||||
|
|
|
@ -1427,6 +1427,7 @@ evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im)
|
|||
}
|
||||
|
||||
evas_gl_common_texture_upload(tex, im, bytes_count);
|
||||
im->cache_entry.flags.textured = 1;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1484,6 +1485,12 @@ evas_gl_common_texture_free(Evas_GL_Texture *tex, Eina_Bool force EINA_UNUSED)
|
|||
tex->ptv2 = NULL;
|
||||
tex->ptuv = NULL;
|
||||
|
||||
if (tex->im)
|
||||
{
|
||||
tex->im->tex = NULL;
|
||||
if (tex->im->im) tex->im->im->cache_entry.flags.textured = 0;
|
||||
}
|
||||
|
||||
evas_gl_common_texture_light_free(tex);
|
||||
}
|
||||
|
||||
|
|
|
@ -1076,6 +1076,8 @@ eng_image_data_preload_request(void *data, void *image, const Eo *target)
|
|||
re->window_use(re->software.ob);
|
||||
gl_context = re->window_gl_context_get(re->software.ob);
|
||||
gim->tex = evas_gl_common_texture_new(gl_context, gim->im, EINA_FALSE);
|
||||
EINA_SAFETY_ON_NULL_RETURN(gim->tex);
|
||||
gim->tex->im = gim;
|
||||
im->cache_entry.flags.updated_data = 1;
|
||||
}
|
||||
evas_gl_preload_target_register(gim->tex, (Eo*) target);
|
||||
|
|
Loading…
Reference in New Issue