Enlightenment CVS committal Author : cedric Project : e17 Module : libs/evas
Dir : e17/libs/evas/src/modules/engines/gl_common Modified Files: evas_gl_image.c evas_gl_texture.c Log Message: * Make RGBA_IMAGE_HAS_ALPHA and RGBA_IMAGE_ALPHA_SPARSE part of Image_Entry flag structure. This fix a bug with 16 bpp software engine. * Change image loader module API to take any Image_Entry. Same goes for evas_common_image_premul and evas_common_image_set_alpha_sparse. * Use new eet API: eet_data_image_read_to_surface. =================================================================== RCS file: /cvs/e/e17/libs/evas/src/modules/engines/gl_common/evas_gl_image.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- evas_gl_image.c 12 Apr 2008 00:32:26 -0000 1.11 +++ evas_gl_image.c 3 Jun 2008 09:09:37 -0000 1.12 @@ -148,10 +148,7 @@ } im->gc = gc; im->cs.space = cspace; - if (alpha) - im->im->flags |= RGBA_IMAGE_HAS_ALPHA; - else - im->im->flags &= ~RGBA_IMAGE_HAS_ALPHA; + im->im->cache_entry.flags.alpha = alpha ? 1 : 0; evas_cache_image_colorspace(&im->im->cache_entry, cspace); im->im = (RGBA_Image *) evas_cache_image_size_set(&im->im->cache_entry, w, h); switch (cspace) @@ -311,7 +308,7 @@ // evas_gl_common_texture_mipmaps_build(im->tex, im->im, smooth); evas_gl_common_context_color_set(gc, r, g, b, a); - if ((a < 255) || (im->im->flags & RGBA_IMAGE_HAS_ALPHA)) + if ((a < 255) || im->im->cache_entry.flags.alpha) evas_gl_common_context_blend_set(gc, 1); else evas_gl_common_context_blend_set(gc, 0); if (dc->clip.use) =================================================================== RCS file: /cvs/e/e17/libs/evas/src/modules/engines/gl_common/evas_gl_texture.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -3 -r1.12 -r1.13 --- evas_gl_texture.c 12 Apr 2008 00:32:26 -0000 1.12 +++ evas_gl_texture.c 3 Jun 2008 09:09:37 -0000 1.13 @@ -47,7 +47,7 @@ gc->change.texture = 1; tex->references++; - if (im->flags & RGBA_IMAGE_HAS_ALPHA) texfmt = GL_RGBA8; + if (im->cache_entry.flags.alpha) texfmt = GL_RGBA8; else texfmt = GL_RGB8; pixfmt = NATIVE_PIX_FORMAT; @@ -94,7 +94,7 @@ im_w = im->cache_entry.w; im_h = im->cache_entry.h; - if (im->flags & RGBA_IMAGE_HAS_ALPHA) texfmt = GL_RGBA8; + if (im->cache_entry.flags.alpha) texfmt = GL_RGBA8; else texfmt = GL_RGB8; pixfmt = NATIVE_PIX_FORMAT; @@ -187,7 +187,7 @@ tex->gc->change.texture = 1; tex->references++; - if (im->flags & RGBA_IMAGE_HAS_ALPHA) texfmt = GL_RGBA8; + if (im->cache_entry.flags.alpha) texfmt = GL_RGBA8; else texfmt = GL_RGB8; pixfmt = NATIVE_PIX_FORMAT; @@ -249,7 +249,7 @@ im_w = im->cache_entry.w; im_h = im->cache_entry.h; - if (im->flags & RGBA_IMAGE_HAS_ALPHA) texfmt = GL_RGBA8; + if (im->cache_entry.flags.alpha) texfmt = GL_RGBA8; else texfmt = GL_RGB8; pixfmt = NATIVE_PIX_FORMAT; @@ -342,7 +342,7 @@ if (tex) tex->references++; } - if (im->flags & RGBA_IMAGE_HAS_ALPHA) texfmt = GL_RGBA8; + if (im->cache_entry.flags.alpha) texfmt = GL_RGBA8; else texfmt = GL_RGB8; pixfmt = NATIVE_PIX_FORMAT; @@ -377,7 +377,7 @@ else #endif { - if (im->flags & RGBA_IMAGE_HAS_ALPHA) + if (im->cache_entry.flags.alpha) evas_common_scale_rgba_mipmap_down_2x2_c(im1->image.data, im2->image.data, pw, ph); ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs