Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas
Dir : e17/libs/evas/src/lib/engines/common Modified Files: evas_image_load.c evas_image_main.c Log Message: useless data files removed... making room for improvements in the engine. chnaged some images. need to update evas_*_test at some point to not be ugly and be able to test everything. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/engines/common/evas_image_load.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -3 -r1.15 -r1.16 --- evas_image_load.c 21 Sep 2004 07:45:13 -0000 1.15 +++ evas_image_load.c 26 Jan 2005 07:49:56 -0000 1.16 @@ -83,7 +83,7 @@ (png_uint_32 *) (&h32), &bit_depth, &color_type, &interlace_type, NULL, NULL); if (!im->image) - im->image = evas_common_image_surface_new(); + im->image = evas_common_image_surface_new(im); if (!im->image) { png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp) NULL); @@ -299,7 +299,7 @@ /* head decoding */ if (!im->image) - im->image = evas_common_image_surface_new(); + im->image = evas_common_image_surface_new(im); if (!im->image) { jpeg_destroy_decompress(&cinfo); @@ -586,7 +586,7 @@ } if (alpha) im->flags |= RGBA_IMAGE_HAS_ALPHA; if (!im->image) - im->image = evas_common_image_surface_new(); + im->image = evas_common_image_surface_new(im); if (!im->image) { free(body); @@ -626,7 +626,7 @@ } if (alpha) im->flags |= RGBA_IMAGE_HAS_ALPHA; if (!im->image) - im->image = evas_common_image_surface_new(); + im->image = evas_common_image_surface_new(im); if (!im->image) { eet_close(ef); @@ -696,7 +696,7 @@ } if (alpha) im->flags |= RGBA_IMAGE_HAS_ALPHA; if (!im->image) - im->image = evas_common_image_surface_new(); + im->image = evas_common_image_surface_new(im); if (!im->image) { free(ret); @@ -767,7 +767,7 @@ } if (alpha) im->flags |= RGBA_IMAGE_HAS_ALPHA; if (!im->image) - im->image = evas_common_image_surface_new(); + im->image = evas_common_image_surface_new(im); if (!im->image) { free(ret); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/engines/common/evas_image_main.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -3 -r1.13 -r1.14 --- evas_image_main.c 2 May 2004 08:41:11 -0000 1.13 +++ evas_image_main.c 26 Jan 2005 07:49:56 -0000 1.14 @@ -77,11 +77,12 @@ } RGBA_Surface * -evas_common_image_surface_new(void) +evas_common_image_surface_new(RGBA_Image *im) { RGBA_Surface *is; is = calloc(1, sizeof(RGBA_Surface)); + is->im = im; return is; } @@ -95,7 +96,7 @@ void evas_common_image_surface_alloc(RGBA_Surface *is) { - size_t siz = is->w * is->h * sizeof(DATA32); + size_t siz = 0; static int on_valgrind; /* init data when we're under Valgrind's control */ @@ -108,7 +109,11 @@ init = 1; } #endif - + if (is->im->flags & RGBA_IMAGE_ALPHA_ONLY) + siz = is->w * is->h * sizeof(DATA8); + else + siz = is->w * is->h * sizeof(DATA32); + is->data = on_valgrind ? calloc(1, siz) : malloc(siz); } @@ -129,7 +134,7 @@ im = evas_common_image_new(); if (!im) return NULL; - im->image = evas_common_image_surface_new(); + im->image = evas_common_image_surface_new(im); if (!im->image) { evas_common_image_free(im); ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs