On Thu, Oct 25, 2012 at 6:02 AM, Enlightenment SVN
<[email protected]> wrote:
> Log:
> evas: give a Warp 10 engine to XPM loader !
>
>   NOTE: If anyone know the moron who did think it was a
>   great idea to make XPM the Freedesktop recommanded
>   choice for icons, please give him a huge SPANK for me !
>
>   NOTE: There is in fact no reason why CServe2 and default
>   loader code are not shared. The number of different line
>   is small. I highly advise we make the effort to merge
>   them back soon.
>
>
>
> Author:       cedric
> Date:         2012-10-25 01:02:31 -0700 (Thu, 25 Oct 2012)
> New Revision: 78424
> Trac:         http://trac.enlightenment.org/e/changeset/78424
>
> Modified:
>   trunk/evas/ChangeLog trunk/evas/NEWS 
> trunk/evas/src/bin/loaders/xpm/evas_image_load_xpm.c 
> trunk/evas/src/modules/loaders/xpm/evas_image_load_xpm.c
>
> Modified: trunk/evas/ChangeLog
> ===================================================================
> --- trunk/evas/ChangeLog        2012-10-25 07:54:51 UTC (rev 78423)
> +++ trunk/evas/ChangeLog        2012-10-25 08:02:31 UTC (rev 78424)
> @@ -1124,3 +1124,6 @@
>
>         * Added Proxy'source events set APIs
>
> +2012-10-25  Cedric Bail
> +
> +       * Make XPM loader faster.
>
> Modified: trunk/evas/NEWS
> ===================================================================
> --- trunk/evas/NEWS     2012-10-25 07:54:51 UTC (rev 78423)
> +++ trunk/evas/NEWS     2012-10-25 08:02:31 UTC (rev 78424)
> @@ -19,6 +19,7 @@
>     * EVAS_GL_NO_BLACKLIST env var to turn off blacklisted drivers in gl
>     * Evas gl engine can do partial swaps now.
>     * evas_object_del() now takes NULL parameters
> +   * make xpm loader faster (from O(N) to O(log(N))).
>
>  Fixes:
>     * Fix segmentation fault with the esvg loader.
>
> Modified: trunk/evas/src/bin/loaders/xpm/evas_image_load_xpm.c
> ===================================================================
> --- trunk/evas/src/bin/loaders/xpm/evas_image_load_xpm.c        2012-10-25 
> 07:54:51 UTC (rev 78423)
> +++ trunk/evas/src/bin/loaders/xpm/evas_image_load_xpm.c        2012-10-25 
> 08:02:31 UTC (rev 78424)
> @@ -6,6 +6,8 @@
>  # include <Evil.h>
>  #endif
>
> +#include <ctype.h>
> +
>  #include "evas_macros.h"
>
>  #include "evas_cserve2.h"
> @@ -14,6 +16,23 @@
>  static Eina_File *rgb_txt;
>  static void *rgb_txt_map;
>
> +static int
> +_xpm_hexa_int(const char *s, int len)
> +{
> +   const char *hexa = "0123456789abcdef";
> +   const char *lookup;
> +   int i, c, r;
> +
> +   for (r = 0, i = 0; i < len; i++)
> +     {
> +        c = s[i];
> +        lookup = strchr(hexa, tolower(c));
> +        r = (r << 4) | (lookup ? lookup - hexa : 0);
> +     }
> +
> +   return r;
> +}

why not strtol / strtoul?


Lucas De Marchi

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to