Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir     : e17/libs/evas/src/modules/engines/xrender_x11


Modified Files:
        evas_engine_xrender.c 


Log Message:


doing some cleanups to xr engine

===================================================================
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/xrender_x11/evas_engine_xrender.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- evas_engine_xrender.c       5 Nov 2006 06:04:51 -0000       1.25
+++ evas_engine_xrender.c       5 Nov 2006 09:28:50 -0000       1.26
@@ -320,10 +320,10 @@
 static void
 set_xtransform_scale(XTransform *t, int sw, int sh, int w, int h)
 {
-   if ((sw > 1) && (w > 1))
-     { sw--;  w--; }
-   if ((sh > 1) && (h > 1))
-     { sh--;  h--; }
+//   if ((sw > 1) && (w > 1))
+//     { sw--;  w--; }
+//   if ((sh > 1) && (h > 1))
+//     { sh--;  h--; }
    t->matrix[0][0] = XDoubleToFixed((double)sw / (double)w);
    t->matrix[1][1] = XDoubleToFixed((double)sh / (double)h);
 }
@@ -355,15 +355,15 @@
        if (!srs->alpha) op = PictOpSrc;
      }
    else if (dc->render_op == _EVAS_RENDER_BLEND_REL)
-       op = PictOpAtop;
+     op = PictOpAtop;
    else if (dc->render_op == _EVAS_RENDER_MUL)
-       op = PictOpIn;
+     op = PictOpIn;
    else if (dc->render_op == _EVAS_RENDER_COPY)
-       op = PictOpSrc;
+     op = PictOpSrc;
    else if (dc->render_op == _EVAS_RENDER_COPY_REL)
-       op = PictOpIn;
+     op = PictOpIn;
    else if (dc->render_op == _EVAS_RENDER_MASK)
-       op = PictOpInReverse;
+     op = PictOpInReverse;
 
    if ((dc) && (dc->mul.use))
      {
@@ -403,7 +403,7 @@
                    trs = _xr_render_surface_new(srs->xinf, sw + e, sh + e,
                                                 srs->fmt, srs->alpha);
                  if (!trs) return;
-
+                 
                  att.component_alpha = 1;
                  XRenderChangePicture(srs->xinf->disp, mask, CPComponentAlpha, 
&att);
                  XRenderSetPictureTransform(srs->xinf->disp, srs->pic, &xf);
@@ -445,54 +445,54 @@
      {
        if (srs->bordered && is_scaling)
          {
-           trs = _xr_render_surface_new(srs->xinf, sw + 1, sh + 1,
-                                        srs->fmt, srs->alpha);
-           if (!trs) return;
-
-           att.component_alpha = 0;
-           XRenderChangePicture(srs->xinf->disp, srs->pic, CPComponentAlpha, 
&att);
-           XRenderSetPictureTransform(srs->xinf->disp, srs->pic, &xf);
-           XRenderComposite(srs->xinf->disp, PictOpSrc, srs->pic, None,
-                            trs->pic, sx, sy, 0, 0, 0, 0, sw, sh);
-
-           XRenderComposite(srs->xinf->disp, PictOpSrc, srs->pic, None,
-                            trs->pic, sx + sw - 1, sy, 0, 0, sw, 0, 1, sh);
-           XRenderComposite(srs->xinf->disp, PictOpSrc, srs->pic, None,
-                            trs->pic, sx, sy + sh - 1, 0, 0, 0, sh, sw, 1);
-           XRenderComposite(srs->xinf->disp, PictOpSrc, srs->pic, None,
+            trs = _xr_render_surface_new(srs->xinf, sw + 1, sh + 1,
+                                         srs->fmt, srs->alpha);
+            if (!trs) return;
+            
+            att.component_alpha = 0;
+            XRenderChangePicture(srs->xinf->disp, srs->pic, CPComponentAlpha, 
&att);
+            XRenderSetPictureTransform(srs->xinf->disp, srs->pic, &xf);
+            XRenderComposite(srs->xinf->disp, PictOpSrc, srs->pic, None,
+                             trs->pic, sx, sy, 0, 0, 0, 0, sw, sh);
+            
+            XRenderComposite(srs->xinf->disp, PictOpSrc, srs->pic, None,
+                             trs->pic, sx + sw - 1, sy, 0, 0, sw, 0, 1, sh);
+            XRenderComposite(srs->xinf->disp, PictOpSrc, srs->pic, None,
+                             trs->pic, sx, sy + sh - 1, 0, 0, 0, sh, sw, 1);
+            XRenderComposite(srs->xinf->disp, PictOpSrc, srs->pic, None,
                             trs->pic, sx + sw - 1, sy + sh - 1, 0, 0, sw, sh, 
1, 1);
-
-           XRenderSetPictureFilter(trs->xinf->disp, trs->pic, 
get_filter(smooth), NULL, 0);
-
-           set_xtransform_scale(&xf, sw, sh, w, h);
-           XRenderSetPictureTransform(trs->xinf->disp, trs->pic, &xf);
-
-           if (dc->render_op == _EVAS_RENDER_MUL)
-             {
-               att.component_alpha = 1;
-               XRenderChangePicture(trs->xinf->disp, trs->pic, 
CPComponentAlpha, &att);
-             }
-
-           XRenderComposite(trs->xinf->disp, op, trs->pic, mask, drs->pic,
-                            0, 0, 0, 0, x, y, w, h);
-           _xr_render_surface_free(trs);
+            
+            XRenderSetPictureFilter(trs->xinf->disp, trs->pic, 
get_filter(smooth), NULL, 0);
+            
+            set_xtransform_scale(&xf, sw, sh, w, h);
+            XRenderSetPictureTransform(trs->xinf->disp, trs->pic, &xf);
+            
+            if (dc->render_op == _EVAS_RENDER_MUL)
+              {
+                 att.component_alpha = 1;
+                 XRenderChangePicture(trs->xinf->disp, trs->pic, 
CPComponentAlpha, &att);
+              }
+            
+            XRenderComposite(trs->xinf->disp, op, trs->pic, mask, drs->pic,
+                             0, 0, 0, 0, x, y, w, h);
+            _xr_render_surface_free(trs);
          }
        else
          {
-           XRenderSetPictureFilter(srs->xinf->disp, srs->pic, 
get_filter(smooth), NULL, 0);
-
-           set_xtransform_scale(&xf, sw, sh, w, h);
-           XRenderSetPictureTransform(srs->xinf->disp, srs->pic, &xf);
-
-           att.component_alpha = 0;
-           if (dc->render_op == _EVAS_RENDER_MUL)
-               att.component_alpha = 1;
-           XRenderChangePicture(srs->xinf->disp, srs->pic, CPComponentAlpha, 
&att);
-
-           XRenderComposite(srs->xinf->disp, op, srs->pic, mask, drs->pic,
-                            ((sx * w) + (sw / 2)) / sw, 
-                            ((sy * h) + (sh / 2)) / sh,
-                            0, 0, x, y, w, h);
+            XRenderSetPictureFilter(srs->xinf->disp, srs->pic, 
get_filter(smooth), NULL, 0);
+            
+            set_xtransform_scale(&xf, sw, sh, w, h);
+            XRenderSetPictureTransform(srs->xinf->disp, srs->pic, &xf);
+            
+            att.component_alpha = 0;
+            if (dc->render_op == _EVAS_RENDER_MUL)
+              att.component_alpha = 1;
+            XRenderChangePicture(srs->xinf->disp, srs->pic, CPComponentAlpha, 
&att);
+            
+            XRenderComposite(srs->xinf->disp, op, srs->pic, mask, drs->pic,
+                             ((sx * w) + (sw / 2)) / sw, 
+                             ((sy * h) + (sh / 2)) / sh,
+                             0, 0, x, y, w, h);
          }
      }
 }



-------------------------------------------------------------------------
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

Reply via email to