Enlightenment CVS committal

Author  : doursse
Project : e17
Module  : libs/evas

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


Modified Files:
        evas_outbuf.c evas_xcb_buffer.c 


Log Message:
cleaning of the code. speed up the engine by moving the initialization of shm 
into the test prog, and by commenting some XCBSync (no problem with that, 
apparently)

===================================================================
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_xcb/evas_outbuf.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- evas_outbuf.c       2 May 2006 22:00:51 -0000       1.5
+++ evas_outbuf.c       4 May 2006 06:51:30 -0000       1.6
@@ -89,7 +89,7 @@
 #ifdef WORDS_BIGENDIAN
           if (evas_software_xcb_x_output_buffer_byte_order(xcbob) == 
XCBImageOrderLSBFirst)
             buf->priv.x.swap = 1;
-          if (evas_software_xcb_x_output_buffer_bit_order(xcbob) == 
XCBImageOrderLSBFirst)
+          if (evas_software_xcb_x_output_buffer_bit_order(xcbob) == 
XCBImageOrderMSBFirst)
             buf->priv.x.bit_swap = 1;
 #else
           if (evas_software_xcb_x_output_buffer_byte_order(xcbob) == 
XCBImageOrderMSBFirst)
@@ -1013,8 +1013,8 @@
 
    perf = evas_software_xcb_outbuf_perf_new_x(conn, draw, vis, cmap, x_depth);
 
-   mask = XCBCWBackPixmap | XCBCWBorderPixel |
-     XCBCWBitGravity | XCBCWBackingStore |
+   mask = XCBCWBackPixmap  | XCBCWBorderPixel |
+     XCBCWBitGravity       | XCBCWBackingStore |
      XCBCWOverrideRedirect | XCBCWEventMask | XCBCWColormap;
    value[0] = XCBBackPixmapNone;
    value[1] = 0;
@@ -1038,7 +1038,7 @@
    mask = XCBConfigWindowStackMode;
    value[0] = XCBStackModeAbove;
    XCBConfigureWindow (conn, win.window, mask, value2);
-/*    XCBMapWindow (conn, win.window); */
+   XCBMapWindow (conn, win.window);
 
    do_shm = evas_software_xcb_x_can_do_shm(conn);
 
===================================================================
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_xcb/evas_xcb_buffer.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- evas_xcb_buffer.c   2 May 2006 22:00:51 -0000       1.3
+++ evas_xcb_buffer.c   4 May 2006 06:51:30 -0000       1.4
@@ -121,53 +121,53 @@
 
    if (try_shm > 0)
      {
-            xcbob->shm_info = malloc(sizeof(XCBShmSegmentInfo));
-            if (xcbob->shm_info)
-              {
-                 xcbob->shm_info->shmseg = XCBShmSEGNew(c);
-                 xcbob->image = XCBImageSHMCreate(c, depth, 
XCBImageFormatZPixmap, NULL, w, h);
-                 if (xcbob->image)
-                   {
-                      xcbob->shm_info->shmid = shmget(IPC_PRIVATE,
-                                                      
xcbob->image->bytes_per_line *
-                                                      xcbob->image->height,
-                                                      IPC_CREAT | 0777);
-                      if (xcbob->shm_info->shmid >= 0)
-                        {
-                           xcbob->shm_info->shmaddr = xcbob->image->data =
-                             shmat(xcbob->shm_info->shmid, 0, 0);
-                           if (xcbob->shm_info->shmaddr != NULL)
+        xcbob->shm_info = malloc(sizeof(XCBShmSegmentInfo));
+        if (xcbob->shm_info)
+          {
+             xcbob->shm_info->shmseg = XCBShmSEGNew(c);
+             xcbob->image = XCBImageSHMCreate(c, depth, XCBImageFormatZPixmap, 
NULL, w, h);
+             if (xcbob->image)
+               {
+                  xcbob->shm_info->shmid = shmget(IPC_PRIVATE,
+                                                  xcbob->image->bytes_per_line 
*
+                                                  xcbob->image->height,
+                                                  IPC_CREAT | 0777);
+                  if (xcbob->shm_info->shmid >= 0)
+                    {
+                       xcbob->shm_info->shmaddr = xcbob->image->data =
+                         shmat(xcbob->shm_info->shmid, 0, 0);
+                       if (xcbob->shm_info->shmaddr != NULL)
+                         {
+                            /*
+                             * FIXME: no error mechanism
+                             */
+
+                           /* XErrorHandler ph; */
+                           /* EventHandlers eh; */
+
+/*                            XCBSync(c, 0); */
+                           _xcb_err = 0;
+                           /* ph = XSetErrorHandler((XErrorHandler) */
+                           /* x_output_tmp_x_err); */
+                           XCBShmAttach(c,
+                                        xcbob->shm_info->shmseg,
+                                        xcbob->shm_info->shmid, 0);
+/*                            XCBSync(c, 0); */
+                           /* XSetErrorHandler((XErrorHandler)ph); */
+                           if (!_xcb_err)
                              {
-                                /*
-                                 * FIXME: no error mechanism
-                                 */
-                               
-                                /*                         XErrorHandler ph; */
-                                /*                         EventHandlers eh; */
-                               
-                                XCBSync(c, 0);
-                                _xcb_err = 0;
-                                /*                         ph = 
XSetErrorHandler((XErrorHandler) */
-                                /*                                             
  x_output_tmp_x_err); */
-                                XCBShmAttach(c,
-                                             xcbob->shm_info->shmseg,
-                                             xcbob->shm_info->shmid, 0);
-                                XCBSync(c, 0);
-                                /*                         
XSetErrorHandler((XErrorHandler)ph); */
-                                if (!_xcb_err)
-                                  {
-                                     return xcbob;
-                                  }
+                                return xcbob;
                              }
-                           shmdt(xcbob->shm_info->shmaddr);
-                           shmctl(xcbob->shm_info->shmid, IPC_RMID, 0);
-                        }
-                      if (xcbob->image) XCBImageSHMDestroy(xcbob->image);
-                      xcbob->image = NULL;
-                   }
-                 if (xcbob->shm_info) free(xcbob->shm_info);
-                 xcbob->shm_info = NULL;
-              }
+                         }
+                       shmdt(xcbob->shm_info->shmaddr);
+                       shmctl(xcbob->shm_info->shmid, IPC_RMID, 0);
+                    }
+                  if (xcbob->image) XCBImageSHMDestroy(xcbob->image);
+                  xcbob->image = NULL;
+               }
+             if (xcbob->shm_info) free(xcbob->shm_info);
+             xcbob->shm_info = NULL;
+          }
      }
 
    if (try_shm > 1) return NULL;




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