evas gl: skip twice texture upload.

Summary:
While debugging a problem,
found a hole that upload texture twice unnecessary.

Here is the scenario.

Set up two objects with same image resource plus both preloading - obj1, obj2;

After image preloading,
_evas_cache_image_async_end() will be triggered.
=> ie->flags.update_data = true;

then first obj1 is gonna drawing,
Since it doesn't have any texture uploaded yet,
it will create a texture and upload texture data as well.
along with below sequence.
=> else if (!im->tex && !ie->load_error)

After it, second obj2 is gonna drawing.
But actually its texture is already readied after obj1,
it doesn't need to upload texture agin.

But still ie->flag.update_data == true, it will do dumbly.

Reviewers: #committers, devilhorns, raster

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6902
This commit is contained in:
Hermet Park 2018-08-30 13:14:13 +09:00
parent b41d3752bb
commit 43d8c853aa
1 changed files with 1 additions and 1 deletions

View File

@ -921,7 +921,6 @@ evas_gl_common_image_update(Evas_Engine_GL_Context *gc, Evas_GL_Image *im)
evas_gl_common_texture_update(im->tex, im->im);
evas_cache_image_unload_data(ie);
}
ie->flags.updated_data = 0;
}
else if (!im->tex && !ie->load_error)
{
@ -940,6 +939,7 @@ evas_gl_common_image_update(Evas_Engine_GL_Context *gc, Evas_GL_Image *im)
evas_cache_image_unload_data(ie);
}
}
ie->flags.updated_data = EINA_FALSE;
im->dirty = 0;
break;
case EVAS_COLORSPACE_ETC1_ALPHA: