evas-gl-common: Fix invalid use of Texture
We cannot use the texture to find a valid format Before the texture is actually created. This is invalid, leads to "warning: tex is used uninitialized' message from the compiler, and just plain wrong. Instead, use the alpha property of the Evas_GL_Image to find the proper texture format, Then create the texture. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
8d3d12282b
commit
4ad176e481
|
@ -998,7 +998,7 @@ evas_gl_common_texture_dynamic_new(Evas_Engine_GL_Context *gc, Evas_GL_Image *im
|
|||
Evas_GL_Texture *tex;
|
||||
int lformat;
|
||||
|
||||
lformat = _evas_gl_texture_search_format(tex->alpha, gc->shared->info.bgra, EVAS_COLORSPACE_ARGB8888);
|
||||
lformat = _evas_gl_texture_search_format(im->alpha, gc->shared->info.bgra, EVAS_COLORSPACE_ARGB8888);
|
||||
if (lformat < 0) return NULL;
|
||||
|
||||
tex = evas_gl_common_texture_alloc(gc, im->w, im->h, im->alpha);
|
||||
|
|
Loading…
Reference in New Issue