evas/gl_common - simpler code

SVN revision: 76289
This commit is contained in:
ChunEon Park 2012-09-07 08:31:19 +00:00
parent 921b861f6f
commit 74f1f5eed1
1 changed files with 8 additions and 12 deletions

View File

@ -316,21 +316,17 @@ evas_gl_common_image_alpha_set(Evas_GL_Image *im, int alpha)
if (!im->im) return im;
evas_cache_image_load_data(&im->im->cache_entry);
im->im->cache_entry.flags.alpha = alpha ? 1 : 0;
if (im->tex)
if (im->tex) evas_gl_common_texture_free(im->tex);
if (im->tex_only)
{
evas_gl_common_texture_free(im->tex);
im->tex = NULL;
im->tex = evas_gl_common_texture_native_new(im->gc, im->w, im->h,
im->alpha, im);
}
if (!im->tex)
else
{
if (im->tex_only)
im->tex = evas_gl_common_texture_native_new(im->gc, im->w, im->h,
im->alpha, im);
else
{
im->tex = evas_gl_common_texture_new(im->gc, im->im);
evas_gl_common_texture_update(im->tex, im->im);
}
im->tex = evas_gl_common_texture_new(im->gc, im->im);
evas_gl_common_texture_update(im->tex, im->im);
}
return im;
}