evas gl: fix invalid image size.

Summary:
When we reset of texture for a valid object,
this object cache size become -1 x -1 with null texture.

Later, we reset a new texture of the object,
Its texture size could be -1 x -1.
That brings to incorrect result drawing.

Can't see any points of using cache size there.

This bug was introduced by 9e01cf2698

@fix

Reviewers: #committers, raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7077
This commit is contained in:
Hermet Park 2018-10-01 21:06:36 +09:00
parent 6f26da1d72
commit 431c8cc090
1 changed files with 2 additions and 6 deletions

View File

@ -763,12 +763,8 @@ evas_gl_common_image_update(Evas_Engine_GL_Context *gc, Evas_GL_Image *im)
if (!im->im) return;
ie = &im->im->cache_entry;
if (!im->tex)
{
if (ie->preload) return;
im->w = ie->w;
im->h = ie->h;
}
if (!im->tex && ie->preload) return;
evas_gl_common_image_alloc_ensure(im);
// alloc ensure can change im->im, so only get the local variable later.
ie = &im->im->cache_entry;