Enlightenment CVS committal
Author : barbieri
Project : e17
Module : libs/evas
Dir : e17/libs/evas/src/modules/engines/software_16
Modified Files:
Makefile.am evas_soft16.h evas_soft16_main.c
Added Files:
evas_soft16_dither_mask.c
Log Message:
Use dither mask when importing images.
===================================================================
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_16/Makefile.am,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- Makefile.am 21 Jun 2007 19:57:56 -0000 1.4
+++ Makefile.am 20 Jul 2007 00:18:07 -0000 1.5
@@ -12,6 +12,7 @@
module_la_SOURCES = \
evas_engine.c \
evas_soft16.h \
+evas_soft16_dither_mask.c \
evas_soft16_main.c \
evas_soft16_image_unscaled.c \
evas_soft16_image_scaled_sampled.c \
@@ -27,6 +28,7 @@
EXTRA_DIST = \
evas_engine.c \
evas_soft16.h \
+evas_soft16_dither_mask.c \
evas_soft16_main.c \
evas_soft16_image_unscaled.c \
evas_soft16_image_scaled_sampled.c \
===================================================================
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- evas_soft16.h 13 Jul 2007 15:19:08 -0000 1.6
+++ evas_soft16.h 20 Jul 2007 00:18:07 -0000 1.7
@@ -90,6 +90,10 @@
void soft16_image_draw_unscaled(Soft16_Image *src, Soft16_Image *dst,
RGBA_Draw_Context *dc, const Evas_Rectangle sr, const Evas_Rectangle dr, const
Evas_Rectangle cr);
void soft16_image_draw_scaled_sampled(Soft16_Image *src, Soft16_Image *dst,
RGBA_Draw_Context *dc, const Evas_Rectangle sr, const Evas_Rectangle dr, const
Evas_Rectangle cr);
+/* convert/dither functions */
+void soft16_image_convert_from_rgb(Soft16_Image *im, const DATA32 *src);
+void soft16_image_convert_from_rgba(Soft16_Image *im, const DATA32 *src);
+
/**
* Rectangle (evas_soft16_rectangle.c)
===================================================================
RCS file:
/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_main.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- evas_soft16_main.c 16 Jul 2007 07:25:34 -0000 1.12
+++ evas_soft16_main.c 20 Jul 2007 00:18:07 -0000 1.13
@@ -203,51 +203,12 @@
DATA32 *sp;
DATA16 *dpl;
- /* FIXME: dither and optimize */
sp = src;
dpl = im->pixels;
if (im->alpha)
- {
- DATA8 *dal;
- dal = im->alpha;
- int y;
-
- for (y = 0; y < im->h; y++)
- {
- DATA16 *dp, *dp_end;
- DATA8 *da;
-
- dp = dpl;
- dp_end = dp + im->w;
- da = dal;
-
- for (; dp < dp_end; da++, dp++, sp++)
- {
- *da = A_VAL(sp) >> 3;
- *dp = RGB_565_FROM_COMPONENTS(R_VAL(sp), G_VAL(sp),
B_VAL(sp));
- }
-
- dpl += im->stride;
- dal += im->stride;
- }
- }
+ soft16_image_convert_from_rgba(im, src);
else
- {
- int y;
-
- for (y = 0; y < im->h; y++)
- {
- DATA16 *dp, *dp_end;
-
- dp = dpl;
- dp_end = dp + im->w;
-
- for (; dp < dp_end; dp++, sp++)
- *dp = RGB_565_FROM_COMPONENTS(R_VAL(sp), G_VAL(sp), B_VAL(sp));
-
- dpl += im->stride;
- }
- }
+ soft16_image_convert_from_rgb(im, src);
}
void
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs