[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [E-devel] E CVS: libs/evas tilman



On Mon, 11 Sep 2006 10:42:39 -0400 (EDT) Enlightenment CVS
<noreply@fitx-00.ewr.caosity.org> babbled:

did this change anything with your xrender output? i would expect not (simply
changing how the matrix is initted - content should be the same)

> Enlightenment CVS committal
> 
> Author  : tilman
> Project : e17
> Module  : libs/evas
> 
> Dir     : e17/libs/evas/src/modules/engines/xrender_x11
> 
> 
> Modified Files:
> 	evas_engine_xrender.c 
> 
> 
> Log Message:
> cleaned up the transformation matrix code. use the proper x macro to convert
> a double into a matrix component instead of hardcoding the bitshift. added
> init_transform() which will initialize a matrix to the identity transform.
> 
> ===================================================================
> RCS
> file: /cvs/e/e17/libs/evas/src/modules/engines/xrender_x11/evas_engine_xrender.c,v
> retrieving revision 1.12 retrieving revision 1.13
> diff -u -3 -r1.12 -r1.13
> --- evas_engine_xrender.c	7 Jun 2006 23:30:15 -0000	1.12
> +++ evas_engine_xrender.c	11 Sep 2006 14:42:39 -0000	1.13
> @@ -1,3 +1,6 @@
> +/*
> + * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
> + */
>  #include "evas_common.h"
>  #include "evas_macros.h"
>  #include "evas_private.h"
> @@ -330,6 +333,17 @@
>     free(rect);
>  }
>  
> +/* initialized the transform to the identity */
> +static void init_transform (XTransform *t)
> +{
> +   int i, j;
> +
> +   for (i = 0; i < 3; i++)
> +     for (j = 0; j < 3; j++)
> +       t->matrix[i][j] = XDoubleToFixed((i == j) ? 1 : 0);
> +}
> +
> +
>  // when color multiplier is used want: instead
>  // CA src IN mask SRC temp; non-CA temp OVER dst. - i think. need to check.
>  void
> @@ -352,17 +366,7 @@
>     XRenderChangePicture(srs->xinf->disp, srs->pic, CPClipMask, &att);
>     XRenderChangePicture(srs->xinf->disp, drs->pic, CPClipMask, &att);
>     
> -   id.matrix[0][0] = 1 << 16;
> -   id.matrix[0][1] = 0;
> -   id.matrix[0][2] = 0;
> - 
> -   id.matrix[1][0] = 0;
> -   id.matrix[1][1] = 1 << 16;
> -   id.matrix[1][2] = 0;
> - 
> -   id.matrix[2][0] = 0;
> -   id.matrix[2][1] = 0;
> -   id.matrix[2][2] = 1 << 16;
> +   init_transform(&id);
>  
>     op = PictOpSrc;
>     if (srs->alpha) op = PictOpOver;
> @@ -423,17 +427,9 @@
>  	  }
>       }
>  
> -   xf.matrix[0][0] = (sw << 16) / w;
> -   xf.matrix[0][1] = 0;
> -   xf.matrix[0][2] = 0;
> -
> -   xf.matrix[1][0] = 0;
> -   xf.matrix[1][1] = (sh << 16) / h;
> -   xf.matrix[1][2] = 0;
> -
> -   xf.matrix[2][0] = 0;
> -   xf.matrix[2][1] = 0;
> -   xf.matrix[2][2] = 1 << 16;
> +   xf = id;
> +   xf.matrix[0][0] = XDoubleToFixed(sw) / w;
> +   xf.matrix[1][1] = XDoubleToFixed(sh) / h;
>  
>     _xr_render_surface_clips_set(drs, dc, x, y, w, h);
>     if (trs)
> @@ -497,25 +493,19 @@
>  {
>     XTransform xf;
>     XRenderPictureAttributes att;
> -   int ident;
>     
>     if ((w <= 0) || (h <= 0) || (!srs) || (!drs)) return;
> -   ident = 1 << 16;
> +
> +   init_transform(&xf);
> +
>     /* FIXME: why do we need to change the identity matrix ifthe src surface
>      * is 1 bit deep?
>      */
> -   if (srs->depth == 1) ident = 1;
> -   xf.matrix[0][0] = ident;
> -   xf.matrix[0][1] = 0;
> -   xf.matrix[0][2] = 0;
> -   
> -   xf.matrix[1][0] = 0;
> -   xf.matrix[1][1] = ident;
> -   xf.matrix[1][2] = 0;
> -   
> -   xf.matrix[2][0] = 0;
> -   xf.matrix[2][1] = 0;
> -   xf.matrix[2][2] = ident;
> +   if (srs->depth == 1)
> +     {
> +	xf.matrix[0][0] = xf.matrix[1][1] = xf.matrix[2][2] = 1;
> +     }
> +
>     
>     XRenderSetPictureTransform(srs->xinf->disp, srs->pic, &xf);
>     att.clip_mask = None;
> 
> 
> 
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> enlightenment-cvs mailing list
> enlightenment-cvs@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    raster@rasterman.com
裸好多
Tokyo, Japan (東京 日本)