Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas
Dir : e17/libs/evas/src/modules/engines/buffer Modified Files: evas_engine.c evas_engine.h evas_outbuf.c Log Message: support all advertised formats =================================================================== RCS file: /cvs/e/e17/libs/evas/src/modules/engines/buffer/evas_engine.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- evas_engine.c 2 Mar 2006 09:16:45 -0000 1.6 +++ evas_engine.c 2 Apr 2006 07:47:31 -0000 1.7 @@ -80,7 +80,7 @@ else if (depth_type == EVAS_ENGINE_BUFFER_DEPTH_RGB32) dep = OUTBUF_DEPTH_RGB_32BPP_888_8888; else if (depth_type == EVAS_ENGINE_BUFFER_DEPTH_BGRA32) - dep = OUTBUF_DEPTH_BGR_32BPP_888_8888; + dep = OUTBUF_DEPTH_BGRA_32BPP_8888_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) @@ -345,4 +345,4 @@ EVAS_MODULE_TYPE_ENGINE, "buffer", "none" -}; \ No newline at end of file +}; =================================================================== RCS file: /cvs/e/e17/libs/evas/src/modules/engines/buffer/evas_engine.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- evas_engine.h 23 Jan 2006 07:57:30 -0000 1.2 +++ evas_engine.h 2 Apr 2006 07:47:31 -0000 1.3 @@ -9,6 +9,7 @@ { OUTBUF_DEPTH_NONE, OUTBUF_DEPTH_ARGB_32BPP_8888_8888, + OUTBUF_DEPTH_BGRA_32BPP_8888_8888, OUTBUF_DEPTH_RGB_32BPP_888_8888, OUTBUF_DEPTH_BGR_32BPP_888_8888, OUTBUF_DEPTH_RGB_24BPP_888_888, =================================================================== RCS file: /cvs/e/e17/libs/evas/src/modules/engines/buffer/evas_outbuf.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- evas_outbuf.c 2 Apr 2006 07:25:03 -0000 1.4 +++ evas_outbuf.c 2 Apr 2006 07:47:31 -0000 1.5 @@ -107,7 +107,9 @@ im = evas_common_image_create(w, h); if (im) { - if ((buf->depth == OUTBUF_DEPTH_ARGB_32BPP_8888_8888)) + printf("bleh\n"); + if (((buf->depth == OUTBUF_DEPTH_ARGB_32BPP_8888_8888)) || + ((buf->depth == OUTBUF_DEPTH_BGRA_32BPP_8888_8888))) { im->flags |= RGBA_IMAGE_HAS_ALPHA; memset(im->image->data, 0, w * h * sizeof(DATA32)); @@ -264,22 +266,63 @@ break; case OUTBUF_DEPTH_BGR_32BPP_888_8888: { - DATA32 *src; + DATA32 *src, *dst; DATA8 *dest; - int yy, row_bytes; - Gfx_Func_Blend_Src_Dst func; + int xx, yy, row_bytes; row_bytes = buf->dest_row_bytes; dest = (DATA8 *)(buf->dest) + (y * row_bytes) + (x * 4); - func = evas_common_draw_func_copy_get(w, 0); - if (func) + if (buf->func.new_update_region) { - for (yy = 0; yy < h; yy++) + dest = buf->func.new_update_region(x, y, w, h, &row_bytes); + } + for (yy = 0; yy < h; yy++) + { + dst = dest + (yy * row_bytes); + src = update->image->data + (yy * update->image->w); + for (xx = 0; xx < w; xx++) { - src = update->image->data + (yy * update->image->w); - func(src, dest, w); - dest += row_bytes; + A_VAL(dst) = B_VAL(src); + R_VAL(dst) = G_VAL(src); + G_VAL(dst) = R_VAL(src); + dst++; + src++; + } + } + if (buf->func.free_update_region) + { + buf->func.free_update_region(x, y, w, h, dest); + } + } + break; + case OUTBUF_DEPTH_BGRA_32BPP_8888_8888: + { + DATA32 *src, *dst; + DATA8 *dest; + int xx, yy, row_bytes; + + row_bytes = buf->dest_row_bytes; + dest = (DATA8 *)(buf->dest) + (y * row_bytes) + (x * 4); + if (buf->func.new_update_region) + { + dest = buf->func.new_update_region(x, y, w, h, &row_bytes); + } + for (yy = 0; yy < h; yy++) + { + dst = dest + (yy * row_bytes); + src = update->image->data + (yy * update->image->w); + for (xx = 0; xx < w; xx++) + { + A_VAL(dst) = B_VAL(src); + R_VAL(dst) = G_VAL(src); + G_VAL(dst) = R_VAL(src); + dst++; + src++; } + } + if (buf->func.free_update_region) + { + buf->func.free_update_region(x, y, w, h, dest); } } break; ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs