Hi, This is Hermet. 

After checked the evas source(by using a tool), I wonder about two parts of
evas source code. 

First, is here. 

//evas/src/lib/canvas/evas_font_dir.c
static int
evas_object_text_font_string_parse(char *buffer, char dest[14][256])
{
   char *p;
   int n, m, i;

   n = 0;
   m = 0;
   p = buffer;
   if (p[0] != '-') return 0;
   i = 1;
   while (p[i])
     {
   dest[n][m] = p[i];
   if ((p[i] == '-') || (m == 256))      // 256 ? 
     {
        dest[n][m] = 0;              // If the m is 256 then it will be out
of boundary. 
                                     // Or if the m will never be more than
256, then we don't need to compare "m == 256"
        n++;
        m = -1;
     }
   i++;
   m++;
   if (n == 14) return n;
     }
   dest[n][m] = 0;
   n++;
   return n;
}
----------------------------------------------------------------------------
------------------------------------------
Second is here. It's not critical but looks strange. 

//evas/src/lib/engines/evas_convert_colorspace.c 
static inline void *
evas_common_convert_argb8888_to_a8(void *data, int w, int h, int stride,
Eina_Bool has_alpha)
{
   uint32_t *src, *end;
   uint8_t *ret, *dst;

   src = data;
   end = src + (stride * h); 
   ret = malloc(w * h); 

   if (!has_alpha)
     {   
        return memset(ret,0xff, w * h); 
     }   

   for ( ; src < end ; src ++, dst ++)  // what does dst++ purpose for ?
      *dst = CONVERT_ARGB_8888_TO_A_8(*src);  //Ok, This can be done. 
   return ret;
}

Could somebody describe above the two part of the source code?

Thanks .



------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to