Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas
Dir : e17/libs/evas/src/modules/engines/software_x11 Modified Files: evas_outbuf.c evas_x_buffer.c Log Message: been doing instrumentation. i'm cuttong down on startup time - a little here and there - noticing lots of excessive io and stat and what not junk. trimming out. =================================================================== RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_x11/evas_outbuf.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- evas_outbuf.c 30 Sep 2006 10:18:35 -0000 1.6 +++ evas_outbuf.c 21 Oct 2006 10:28:01 -0000 1.7 @@ -61,9 +61,9 @@ buf->priv.x.shm = evas_software_x11_x_can_do_shm(buf->priv.x.disp); xob = evas_software_x11_x_output_buffer_new(buf->priv.x.disp, - buf->priv.x.vis, - buf->priv.x.depth, - 1, 1, buf->priv.x.shm, NULL); + buf->priv.x.vis, + buf->priv.x.depth, + 1, 1, buf->priv.x.shm, NULL); conv_func = NULL; if (xob) @@ -136,6 +136,7 @@ else pm = PAL_MODE_MONO; } + /* FIXME: only alloc once per display+cmap */ buf->priv.pal = evas_software_x11_x_color_allocate(disp, cmap, vis, PAL_MODE_RGB666); if (!buf->priv.pal) @@ -673,6 +674,9 @@ perf->x.disp = disp; + perf->min_shm_image_pixel_count = 200 * 200; /* default hard-coded */ + +#if 0 root = DefaultRootWindow(disp); if (draw) { @@ -697,9 +701,7 @@ perf->x.release = VendorRelease(disp); perf->x.screen_count = ScreenCount(disp); perf->x.depth = x_depth; - - perf->min_shm_image_pixel_count = 200 * 200; /* default hard-coded */ - + if (!uname(&un)) { perf->os.name = strdup(un.sysname); @@ -763,9 +765,8 @@ } if (!perf->cpu.info) perf->cpu.info = strdup(""); +#endif return perf; - vis = NULL; - cmap = 0; } char * @@ -777,6 +778,8 @@ int sum1, sum2, i; char *p; + return NULL; +#if 0 sum1 = 0; sum2 = 0; snprintf(buf, sizeof(buf), @@ -796,6 +799,7 @@ } snprintf(buf, sizeof(buf), "%08x%08x", sum1, sum2); return strdup(buf); +#endif } void @@ -805,6 +809,8 @@ Atom type, format; char *str; + return; +#if 0 type = XInternAtom(perf->x.disp, "__EVAS_PERF_ENGINE_SOFTWARE", False); format = XA_STRING; str = evas_software_x11_outbuf_perf_serialize_x(perf); @@ -812,6 +818,7 @@ PropModeReplace, (unsigned char *)str, strlen(str)); XSync(perf->x.disp, False); free(str); +#endif } Outbuf_Perf * @@ -827,6 +834,8 @@ int format_ret; perf = evas_software_x11_outbuf_perf_new_x(disp, draw, vis, cmap, x_depth); + return perf; +#if 0 type = XInternAtom(disp, "__EVAS_PERF_ENGINE_SOFTWARE", False); format = XA_STRING; XGetWindowProperty(disp, perf->x.root, type, 0, 16384, False, format, @@ -843,20 +852,22 @@ } if (retval) XFree(retval); - return perf; +#endif } void evas_software_x11_outbuf_perf_free(Outbuf_Perf * perf) { /* free the perf struct */ +#if 0 free(perf->x.display); free(perf->x.vendor); free(perf->os.name); free(perf->os.version); free(perf->os.machine); free(perf->cpu.info); +#endif free(perf); } =================================================================== RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_x11/evas_x_buffer.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- evas_x_buffer.c 10 Mar 2006 19:12:57 -0000 1.3 +++ evas_x_buffer.c 21 Oct 2006 10:28:01 -0000 1.4 @@ -58,6 +58,11 @@ int evas_software_x11_x_can_do_shm(Display *d) { + static Display *cached_d = NULL; + static int cached_result = 0; + + if (d == cached_d) return cached_result; + cached_d = d; if (XShmQueryExtension(d)) { X_Output_Buffer *xob; @@ -65,10 +70,16 @@ xob = evas_software_x11_x_output_buffer_new (d, DefaultVisual(d, DefaultScreen(d)), DefaultDepth(d, DefaultScreen(d)), 16, 16, 2, NULL); - if (!xob) return 0; + if (!xob) + { + cached_result = 0; + return 0; + } evas_software_x11_x_output_buffer_free(xob, 1); + cached_result = 1; return 1; } + cached_result = 0; return 0; } ------------------------------------------------------------------------- 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