Enlightenment CVS committal Author : barbieri Project : e17 Module : libs/evas
Dir : e17/libs/evas/src/modules/engines/software_16 Modified Files: evas_engine.c Log Message: fix evas software 16 engine build and to add the missing image_data_get method. By Andre Magalhaes <andrunko/gmail.com> =================================================================== RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_engine.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- evas_engine.c 19 Jun 2007 22:52:12 -0000 1.4 +++ evas_engine.c 10 Jul 2007 15:01:52 -0000 1.5 @@ -320,12 +320,7 @@ static int eng_image_colorspace_get(void *data, void *image) { - Soft16_Image *im; - - if (!image) return EVAS_COLORSPACE_RGB565; - im = image; - if (im->have_alpha) return EVAS_COLORSPACE_RGB565_A5P; - return EVAS_COLORSPACE_RGB565; + return EVAS_COLORSPACE_RGB565_A5P; } static void * @@ -431,8 +426,31 @@ static void * eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data) { - // FIXME: implement - *image_data = NULL; + Soft16_Image *im; + + if (!image) + { + *image_data = NULL; + return NULL; + } + + im = image; + + if (to_write) + { + if (im->references > 1) + { + Soft16_Image *im_new; + + im_new = soft16_image_new(im->w, im->h, im->stride, im->have_alpha, im->pixels, 1); + if (!im_new) return im; + soft16_image_free(im); + im = im_new; + } + } + + if (image_data) *image_data = (DATA32 *) im->pixels; + return image; } ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs