Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas
Dir : e17/libs/evas/src/modules/engines/software_x11 Modified Files: evas_engine.c evas_outbuf.c Log Message: ARGB targets for sw engine supported =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/modules/engines/software_x11/evas_engine.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- evas_engine.c 8 Mar 2006 15:35:05 -0000 1.6 +++ evas_engine.c 9 Mar 2006 03:51:27 -0000 1.7 @@ -216,6 +216,27 @@ info->info.mask, info->info.shape_dither, info->info.destination_alpha); + else + { + re = e->engine.data.output; + evas_software_x11_outbuf_free(re->ob); + re->ob = evas_software_x11_outbuf_setup_x(e->output.w, + e->output.h, + info->info.rotation, + OUTBUF_DEPTH_INHERIT, + info->info.display, + info->info.drawable, + info->info.visual, + info->info.colormap, + info->info.depth, + evas_software_x11_outbuf_perf_restore_x(info->info.display, info->info.drawable, info->info.visual, info->info.colormap, info->info.depth), + info->info.alloc_grayscale, + info->info.alloc_colors_max, + info->info.mask, + info->info.shape_dither, + info->info.destination_alpha); + evas_software_x11_outbuf_debug_set(re->ob, info->info.debug); + } if (!e->engine.data.output) return; if (!e->engine.data.context) e->engine.data.context = =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/modules/engines/software_x11/evas_outbuf.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- evas_outbuf.c 8 Mar 2006 15:35:05 -0000 1.2 +++ evas_outbuf.c 9 Mar 2006 03:51:27 -0000 1.3 @@ -449,6 +449,27 @@ bpl / ((evas_software_x11_x_output_buffer_depth(obr->xob) / 8)) - obr->w, obr->w, obr->h, x, y, NULL); + /* FIXME: this is evil - but it makes ARGB targets look correct */ + if ((buf->priv.destination_alpha) && (!obr->mxob) && + (evas_software_x11_x_output_buffer_depth(obr->xob) == 32)) + { + int i; + DATA32 a; + + for (i = 0; i < obr->h; i++) + { + s = ((DATA32 *)data) + ((bpl * i) / sizeof(DATA32)); + e = s + obr->w; + while (s < e) + { + a = A_VAL(s) + 1; + R_VAL(s) = (R_VAL(s) * a) >> 8; + G_VAL(s) = (G_VAL(s) * a) >> 8; + B_VAL(s) = (B_VAL(s) * a) >> 8; + s++; + } + } + } } if (obr->mxob) { @@ -461,7 +482,7 @@ void evas_software_x11_outbuf_reconfigure(Outbuf * buf, int w, int h, int rot, - Outbuf_Depth depth) + Outbuf_Depth depth) { if ((w == buf->w) && (h == buf->h) && ------------------------------------------------------- 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