Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/evas
Dir : e17/libs/evas/src/lib/engines/buffer
Modified Files:
evas_engine.c evas_engine.h evas_outbuf.c
Log Message:
buffer engine seems to be wroking for an rgb buffer with color keying...
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/engines/buffer/evas_engine.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- evas_engine.c 2 Apr 2003 04:28:26 -0000 1.1
+++ evas_engine.c 2 Apr 2003 08:00:32 -0000 1.2
@@ -251,11 +251,15 @@
Outbuf_Depth dep;
DATA32 color_key;
- dep = OUTBUF_DEPTH_RGB_24BPP_888_888;
- if (depth_type == EVAS_ENGINE_BUFFER_DEPTH_RGBA32)
+ dep = OUTBUF_DEPTH_BGR_24BPP_888_888;
+ if (depth_type == EVAS_ENGINE_BUFFER_DEPTH_ARGB32)
dep = OUTBUF_DEPTH_RGB_32BPP_888_8888;
+ else if (depth_type == EVAS_ENGINE_BUFFER_DEPTH_BGRA32)
+ dep = OUTBUF_DEPTH_BGR_32BPP_888_8888;
else if (depth_type == EVAS_ENGINE_BUFFER_DEPTH_RGB24)
dep = OUTBUF_DEPTH_RGB_24BPP_888_888;
+ else if (depth_type == EVAS_ENGINE_BUFFER_DEPTH_BGR24)
+ dep = OUTBUF_DEPTH_BGR_24BPP_888_888;
R_VAL(&color_key) = color_key_r;
G_VAL(&color_key) = color_key_g;
B_VAL(&color_key) = color_key_b;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/engines/buffer/evas_engine.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- evas_engine.h 2 Apr 2003 04:28:26 -0000 1.1
+++ evas_engine.h 2 Apr 2003 08:00:33 -0000 1.2
@@ -8,8 +8,10 @@
enum _Outbuf_Depth
{
OUTBUF_DEPTH_NONE,
- OUTBUF_DEPTH_RGB_24BPP_888_888,
OUTBUF_DEPTH_RGB_32BPP_888_8888,
+ OUTBUF_DEPTH_BGR_32BPP_888_8888,
+ OUTBUF_DEPTH_RGB_24BPP_888_888,
+ OUTBUF_DEPTH_BGR_24BPP_888_888,
OUTBUF_DEPTH_LAST
};
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/engines/buffer/evas_outbuf.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- evas_outbuf.c 2 Apr 2003 04:28:26 -0000 1.1
+++ evas_outbuf.c 2 Apr 2003 08:00:34 -0000 1.2
@@ -115,7 +115,63 @@
}
}
break;
+ case OUTBUF_DEPTH_BGR_24BPP_888_888:
+ /* copy & pack into 24bpp - if colorkey is enabled... etc. */
+ {
+ DATA8 thresh;
+ int xx, yy;
+ DATA32 colorkey;
+ DATA32 *src;
+ DATA8 *dst;
+
+ colorkey = buf->color_key;
+ thresh = buf->alpha_level;
+ if (buf->use_color_key)
+ {
+ for (yy = 0; yy < h; yy++)
+ {
+ dst = buf->dest + ((y + yy) * buf->dest_row_bytes);
+ src = update->image->data + (yy * update->image->w);
+ for (xx = 0; xx < w; xx++)
+ {
+ if (A_VAL(src) > thresh)
+ {
+ *dst++ = B_VAL(src);
+ *dst++ = G_VAL(src);
+ *dst++ = R_VAL(src);
+ }
+ else
+ {
+ *dst++ = B_VAL(&colorkey);
+ *dst++ = G_VAL(&colorkey);
+ *dst++ = R_VAL(&colorkey);
+ }
+ src++;
+ }
+ }
+ }
+ else
+ {
+ for (yy = 0; yy < h; yy++)
+ {
+ dst = buf->dest + ((y + yy) * buf->dest_row_bytes);
+ src = update->image->data + (yy * update->image->w);
+ for (xx = 0; xx < w; xx++)
+ {
+ *dst++ = B_VAL(src);
+ *dst++ = G_VAL(src);
+ *dst++ = R_VAL(src);
+ src++;
+ }
+ }
+ }
+ }
+ break;
case OUTBUF_DEPTH_RGB_32BPP_888_8888:
+ /* simple memcpy */
+ /* FIXME: write this */
+ break;
+ case OUTBUF_DEPTH_BGR_32BPP_888_8888:
/* simple memcpy */
/* FIXME: write this */
break;
-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs