fix image alpha set bug.

SVN revision: 76277
This commit is contained in:
Carsten Haitzler 2012-09-07 05:57:22 +00:00
parent f4cc630f3a
commit ee49da7665
8 changed files with 26 additions and 1 deletions

View File

@ -1029,3 +1029,8 @@
* Fix EGL/GLES bug when setting up rgba dest alpha windows where they
cease to be rendered to. use a shared context and it works.
2012-09-07 Carsten Haitzler (The Rasterman)
* Fix image alpha set bug if the image data has not been loaded
yet from disk. Fixes across software and gl engines needed.

View File

@ -16,6 +16,7 @@ Fixes:
* Fix segmentation fault with the esvg loader.
* Fix EGL/GLES dest alpha rendering bug (no rendering).
* Fix evas_object_image_alpha_set when image data not loaded yet.
Evas 1.7.0

View File

@ -446,6 +446,8 @@ eng_image_alpha_set(void *data, void *image, int has_alpha)
{
Evas_GL_Image *im_new;
if (!im->im->image.data)
evas_cache_image_load_data(&im->im->cache_entry);
im_new = evas_gl_common_image_new_from_copied_data
(im->gc, im->im->cache_entry.w, im->im->cache_entry.h,
im->im->image.data,

View File

@ -314,6 +314,7 @@ evas_gl_common_image_alpha_set(Evas_GL_Image *im, int alpha)
if (im->alpha == alpha) return im;
im->alpha = 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)
{
@ -321,7 +322,16 @@ evas_gl_common_image_alpha_set(Evas_GL_Image *im, int alpha)
im->tex = NULL;
}
if (!im->tex)
im->tex = evas_gl_common_texture_new(im->gc, im->im);
{
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);
}
}
return im;
}

View File

@ -390,6 +390,8 @@ eng_image_alpha_set(void *data, void *image, int has_alpha)
{
Evas_GL_Image *im_new;
if (!im->im->image.data)
evas_cache_image_load_data(&im->im->cache_entry);
im_new = evas_gl_common_image_new_from_copied_data(im->gc, im->im->cache_entry.w, im->im->cache_entry.h, im->im->image.data,
eng_image_alpha_get(data, image),
eng_image_colorspace_get(data, image));

View File

@ -1741,6 +1741,8 @@ eng_image_alpha_set(void *data, void *image, int has_alpha)
{
Evas_GL_Image *im_new;
if (!im->im->image.data)
evas_cache_image_load_data(&im->im->cache_entry);
im_new = evas_gl_common_image_new_from_copied_data
(im->gc, im->im->cache_entry.w, im->im->cache_entry.h,
im->im->image.data,

View File

@ -569,6 +569,7 @@ eng_image_alpha_set(void *data __UNUSED__, void *image, int has_alpha)
im->cache_entry.flags.alpha = 0;
return im;
}
if (!im->image.data) evas_cache_image_load_data(&im->cache_entry);
im = (RGBA_Image *) evas_cache_image_alone(&im->cache_entry);
im->cache_entry.flags.alpha = has_alpha ? 1 : 0;
evas_common_image_colorspace_dirty(im);

View File

@ -1265,6 +1265,8 @@ eng_image_alpha_set(void *data, void *image, int has_alpha)
{
Evas_GL_Image *im_new;
if (!im->im->image.data)
evas_cache_image_load_data(&im->im->cache_entry);
im_new = evas_gl_common_image_new_from_copied_data
(im->gc, im->im->cache_entry.w, im->im->cache_entry.h,
im->im->image.data,