Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/evas
Dir : e17/libs/evas/src/modules/engines/software_x11
Modified Files:
Evas_Engine_Software_X11.h evas_engine.c evas_engine.h
evas_outbuf.c
Log Message:
add a dst alpha flag
===================================================================
RCS file:
/cvsroot/enlightenment/e17/libs/evas/src/modules/engines/software_x11/Evas_Engine_Software_X11.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- Evas_Engine_Software_X11.h 2 Mar 2006 08:06:10 -0000 1.1
+++ Evas_Engine_Software_X11.h 8 Mar 2006 15:35:05 -0000 1.2
@@ -24,6 +24,7 @@
int alloc_grayscale : 1;
int debug : 1;
int shape_dither : 1;
+ int destination_alpha : 1;
int alloc_colors_max;
} info;
===================================================================
RCS file:
/cvsroot/enlightenment/e17/libs/evas/src/modules/engines/software_x11/evas_engine.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- evas_engine.c 2 Mar 2006 09:16:46 -0000 1.5
+++ evas_engine.c 8 Mar 2006 15:35:05 -0000 1.6
@@ -19,7 +19,7 @@
};
/* prototypes we will use here */
-static void *_output_setup(int w, int h, int rot, Display *disp, Drawable
draw, Visual *vis, Colormap cmap, int depth, int debug, int grayscale, int
max_colors, Pixmap mask, int shape_dither);
+static void *_output_setup(int w, int h, int rot, Display *disp, Drawable
draw, Visual *vis, Colormap cmap, int depth, int debug, int grayscale, int
max_colors, Pixmap mask, int shape_dither, int destination_alpha);
static Visual *_best_visual_get(Display *disp, int screen);
static Colormap _best_colormap_get(Display *disp, int screen);
static int _best_depth_get(Display *disp, int screen);
@@ -46,7 +46,7 @@
/* internal engine routines */
static void *
-_output_setup(int w, int h, int rot, Display *disp, Drawable draw, Visual
*vis, Colormap cmap, int depth, int debug, int grayscale, int max_colors,
Pixmap mask, int shape_dither)
+_output_setup(int w, int h, int rot, Display *disp, Drawable draw, Visual
*vis, Colormap cmap, int depth, int debug, int grayscale, int max_colors,
Pixmap mask, int shape_dither, int destination_alpha)
{
Render_Engine *re;
Outbuf_Perf *perf;
@@ -73,7 +73,7 @@
/* get any stored performance metrics from device (xserver) */
perf = evas_software_x11_outbuf_perf_restore_x(disp, draw, vis, cmap,
depth);
- re->ob = evas_software_x11_outbuf_setup_x(w, h, rot, OUTBUF_DEPTH_INHERIT,
disp, draw, vis, cmap, depth, perf, grayscale, max_colors, mask, shape_dither);
+ re->ob = evas_software_x11_outbuf_setup_x(w, h, rot, OUTBUF_DEPTH_INHERIT,
disp, draw, vis, cmap, depth, perf, grayscale, max_colors, mask, shape_dither,
destination_alpha);
if (!re->ob)
{
evas_software_x11_outbuf_perf_free(perf);
@@ -214,7 +214,8 @@
info->info.alloc_grayscale,
info->info.alloc_colors_max,
info->info.mask,
- info->info.shape_dither);
+ info->info.shape_dither,
+ info->info.destination_alpha);
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_engine.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- evas_engine.h 14 Jan 2006 12:13:37 -0000 1.1
+++ evas_engine.h 8 Mar 2006 15:35:05 -0000 1.2
@@ -63,6 +63,7 @@
Evas_List *pending_writes;
int mask_dither : 1;
+ int destination_alpha : 1;
int debug : 1;
} priv;
@@ -130,7 +131,7 @@
void evas_software_x11_outbuf_init (void);
void evas_software_x11_outbuf_free (Outbuf *buf);
-Outbuf *evas_software_x11_outbuf_setup_x (int w, int
h, int rot, Outbuf_Depth depth, Display *disp, Drawable draw, Visual *vis,
Colormap cmap, int x_depth, Outbuf_Perf *perf, int grayscale, int max_colors,
Pixmap mask, int shape_dither);
+Outbuf *evas_software_x11_outbuf_setup_x (int w, int
h, int rot, Outbuf_Depth depth, Display *disp, Drawable draw, Visual *vis,
Colormap cmap, int x_depth, Outbuf_Perf *perf, int grayscale, int max_colors,
Pixmap mask, int shape_dither, int destination_alpha);
char *evas_software_x11_outbuf_perf_serialize_x (Outbuf_Perf
*perf);
void evas_software_x11_outbuf_perf_deserialize_x (Outbuf_Perf
*perf, const char *data);
===================================================================
RCS file:
/cvsroot/enlightenment/e17/libs/evas/src/modules/engines/software_x11/evas_outbuf.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- evas_outbuf.c 14 Jan 2006 12:13:37 -0000 1.1
+++ evas_outbuf.c 8 Mar 2006 15:35:05 -0000 1.2
@@ -31,10 +31,10 @@
Outbuf *
evas_software_x11_outbuf_setup_x(int w, int h, int rot, Outbuf_Depth depth,
- Display * disp, Drawable draw,
Visual * vis,
- Colormap cmap, int x_depth,
Outbuf_Perf * perf,
- int grayscale, int max_colors,
Pixmap mask,
- int shape_dither)
+ Display * disp, Drawable draw, Visual * vis,
+ Colormap cmap, int x_depth, Outbuf_Perf * perf,
+ int grayscale, int max_colors, Pixmap mask,
+ int shape_dither, int destination_alpha)
{
Outbuf *buf;
@@ -56,6 +56,7 @@
buf->priv.x.depth = x_depth;
buf->priv.mask_dither = shape_dither;
+ buf->priv.destination_alpha = destination_alpha;
{
Gfx_Func_Convert conv_func;
@@ -136,7 +137,7 @@
pm = PAL_MODE_MONO;
}
buf->priv.pal = evas_software_x11_x_color_allocate(disp, cmap,
vis,
- PAL_MODE_RGB666);
+
PAL_MODE_RGB666);
if (!buf->priv.pal)
{
free(buf);
@@ -146,53 +147,53 @@
if (buf->priv.pal)
{
if (buf->rot == 0)
- conv_func = evas_common_convert_func_get(0, buf->w, buf->h,
-
evas_software_x11_x_output_buffer_depth
- (xob), buf->priv.mask.r,
- buf->priv.mask.g,
- buf->priv.mask.b,
- buf->priv.pal->colors,
- buf->rot);
+ conv_func = evas_common_convert_func_get(0, buf->w, buf->h,
+
evas_software_x11_x_output_buffer_depth
+ (xob),
buf->priv.mask.r,
+ buf->priv.mask.g,
+ buf->priv.mask.b,
+
buf->priv.pal->colors,
+ buf->rot);
else if (buf->rot == 270)
- conv_func = evas_common_convert_func_get(0, buf->h, buf->w,
-
evas_software_x11_x_output_buffer_depth
- (xob), buf->priv.mask.r,
- buf->priv.mask.g,
- buf->priv.mask.b,
- buf->priv.pal->colors,
- buf->rot);
+ conv_func = evas_common_convert_func_get(0, buf->h, buf->w,
+
evas_software_x11_x_output_buffer_depth
+ (xob),
buf->priv.mask.r,
+ buf->priv.mask.g,
+ buf->priv.mask.b,
+
buf->priv.pal->colors,
+ buf->rot);
else if (buf->rot == 90)
- conv_func = evas_common_convert_func_get(0, buf->h, buf->w,
-
evas_software_x11_x_output_buffer_depth
- (xob), buf->priv.mask.r,
- buf->priv.mask.g,
- buf->priv.mask.b,
- buf->priv.pal->colors,
- buf->rot);
+ conv_func = evas_common_convert_func_get(0, buf->h, buf->w,
+
evas_software_x11_x_output_buffer_depth
+ (xob),
buf->priv.mask.r,
+ buf->priv.mask.g,
+ buf->priv.mask.b,
+
buf->priv.pal->colors,
+ buf->rot);
}
else
{
if (buf->rot == 0)
- conv_func = evas_common_convert_func_get(0, buf->w, buf->h,
-
evas_software_x11_x_output_buffer_depth
- (xob), buf->priv.mask.r,
- buf->priv.mask.g,
+ conv_func = evas_common_convert_func_get(0, buf->w, buf->h,
+
evas_software_x11_x_output_buffer_depth
+ (xob),
buf->priv.mask.r,
+ buf->priv.mask.g,
buf->priv.mask.b, PAL_MODE_NONE,
- buf->rot);
+ buf->rot);
else if (buf->rot == 270)
- conv_func = evas_common_convert_func_get(0, buf->h, buf->w,
-
evas_software_x11_x_output_buffer_depth
- (xob), buf->priv.mask.r,
- buf->priv.mask.g,
- buf->priv.mask.b, PAL_MODE_NONE,
- buf->rot);
+ conv_func = evas_common_convert_func_get(0, buf->h, buf->w,
+
evas_software_x11_x_output_buffer_depth
+ (xob),
buf->priv.mask.r,
+ buf->priv.mask.g,
+ buf->priv.mask.b,
PAL_MODE_NONE,
+ buf->rot);
else if (buf->rot == 90)
- conv_func = evas_common_convert_func_get(0, buf->h, buf->w,
-
evas_software_x11_x_output_buffer_depth
- (xob), buf->priv.mask.r,
- buf->priv.mask.g,
- buf->priv.mask.b, PAL_MODE_NONE,
- buf->rot);
+ conv_func = evas_common_convert_func_get(0, buf->h, buf->w,
+
evas_software_x11_x_output_buffer_depth
+ (xob),
buf->priv.mask.r,
+ buf->priv.mask.g,
+ buf->priv.mask.b,
PAL_MODE_NONE,
+ buf->rot);
}
evas_software_x11_x_output_buffer_free(xob, 1);
if (!conv_func)
@@ -245,7 +246,6 @@
{
if ((w * h) < (200 * 200)) use_shm = 0;
}
-
if ((buf->rot == 0) &&
(buf->priv.mask.r == 0xff0000) &&
(buf->priv.mask.g == 0x00ff00) &&
@@ -297,7 +297,7 @@
use_shm,
NULL);
}
- if (buf->priv.x.mask)
+ if ((buf->priv.x.mask) || (buf->priv.destination_alpha))
{
im->flags |= RGBA_IMAGE_HAS_ALPHA;
/* FIXME: faster memset! */
@@ -441,6 +441,8 @@
}
else
{
+ DATA32 *s, *e;
+
if (data != src_data)
conv_func(src_data, data,
0,
-------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs