Hi,

Attached there is a patch to fix evas software 16 engine build and to
add the missing image_data_get method

BR
Andrunko
Index: src/modules/engines/software_16/evas_engine.c
===================================================================
RCS file: /var/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_engine.c,v
retrieving revision 1.4
diff -u -r1.4 evas_engine.c
--- src/modules/engines/software_16/evas_engine.c	19 Jun 2007 22:52:12 -0000	1.4
+++ src/modules/engines/software_16/evas_engine.c	10 Jul 2007 14:43:28 -0000
@@ -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-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to