Re: [E-devel] E CVS: libs/evas barbieri

2008-05-20 Thread Gustavo Sverzut Barbieri
to make clear: it COULD be -0, on intel at least it's -1 and thus
evaluates to TRUE, that's why it was unnoticed.

On Tue, May 20, 2008 at 5:56 PM, Enlightenment CVS
[EMAIL PROTECTED] wrote:
 Enlightenment CVS committal

 Author  : barbieri
 Project : e17
 Module  : libs/evas

 Dir : e17/libs/evas/src/lib/include


 Modified Files:
evas_common.h


 Log Message:
 Remove bugs with bitfield usage, make boolean usage clear.

 This patch fixes the problem with bitfield of signed types (ie: char),
 where the bit would be used for the signal, so 1 is considered -0 and
 thus 0.

 Move all the single bit fields to Evas_Bool, making it clear and also
 avoiding these problems since Evas_Bool is unsigned char.


 ===
 RCS file: /cvs/e/e17/libs/evas/src/lib/include/evas_common.h,v
 retrieving revision 1.97
 retrieving revision 1.98
 diff -u -3 -r1.97 -r1.98
 --- evas_common.h   19 May 2008 03:13:16 -  1.97
 +++ evas_common.h   20 May 2008 20:56:39 -  1.98
 @@ -283,12 +283,12 @@

   struct
   {
 -unsigned int loaded : 1;
 -unsigned int dirty  : 1;
 -unsigned int activ  : 1;
 -unsigned int need_data  : 1;
 -unsigned int lru_nodata : 1;
 -unsigned int cached : 1;
 +Evas_Boolloaded : 1;
 +Evas_Booldirty  : 1;
 +Evas_Boolactiv  : 1;
 +Evas_Boolneed_data  : 1;
 +Evas_Boollru_nodata : 1;
 +Evas_Boolcached : 1;
   } flags;

   intreferences;
 @@ -320,11 +320,11 @@

struct
{
 - unsigned intcached : 1;
 - unsigned intactiv : 1;
 - unsigned intdirty : 1;
 - unsigned intloaded : 1;
 - unsigned intneed_parent : 1;
 + Evas_Bool   cached : 1;
 + Evas_Bool   activ : 1;
 + Evas_Bool   dirty : 1;
 + Evas_Bool   loaded : 1;
 + Evas_Bool   need_parent : 1;
} flags;

int   references;
 @@ -347,7 +347,7 @@
  struct _RGBA_Draw_Context
  {
struct {
 -  char   use : 1;
 +  Evas_Bool use : 1;
   DATA32 col;
} mul;
struct {
 @@ -355,7 +355,7 @@
} col;
struct RGBA_Draw_Context_clip {
   intx, y, w, h;
 -  char   use : 1;
 +  Evas_Bool use : 1;
} clip;
Cutout_Rects cutout;
struct {
 @@ -373,7 +373,7 @@
   int y, h;
} sli;
intrender_op;
 -   unsigned char  anti_alias : 1;
 +   Evas_Bool anti_alias : 1;
  };

  struct _RGBA_Pipe_Op
 @@ -448,15 +448,15 @@
/* Colorspace stuff. */
struct {
   void  *data;
 -  unsigned int   no_free : 1;
 -  unsigned int   dirty : 1;
 +  Evas_Bool  no_free : 1;
 +  Evas_Bool  dirty : 1;
} cs;

/* RGBA stuff */
struct
{
   DATA32*data;
 -  unsigned int   no_free : 1;
 +  Evas_Bool  no_free : 1;
} image;
  };

 @@ -483,7 +483,7 @@
float  angle;
intdirection;
float  offset;
 -   unsigned char  has_alpha : 1;
 +   Evas_Bool  has_alpha : 1;
  } map;

struct {
 @@ -515,8 +515,8 @@

int references;

 -   unsigned char imported_data : 1;
 -   unsigned char has_alpha : 1;
 +   Evas_Bool imported_data : 1;
 +   Evas_Bool has_alpha : 1;
  };

  struct _RGBA_Gradient_Type
 @@ -698,12 +698,12 @@

  struct _Tilebuf_Tile
  {
 -   unsigned char redraw : 1;
 +   Evas_Bool redraw : 1;
  /* FIXME: need these flags later - but not now */
  /*
 -   int done   : 1;
 -   int edge   : 1;
 -   int from   : 1;
 +   Evas_Bool done   : 1;
 +   Evas_Bool edge   : 1;
 +   Evas_Bool from   : 1;

struct {
   int dx, dy;



 -
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2008.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
 ___
 enlightenment-cvs mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs




-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--
MSN: [EMAIL PROTECTED]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] E CVS: libs/evas barbieri

2008-05-20 Thread Kim Woelders
Gustavo Sverzut Barbieri wrote:
 to make clear: it COULD be -0, on intel at least it's -1 and thus
 evaluates to TRUE, that's why it was unnoticed.
 
 On Tue, May 20, 2008 at 5:56 PM, Enlightenment CVS
 [EMAIL PROTECTED] wrote:
 Enlightenment CVS committal

 Author  : barbieri
 Project : e17
 Module  : libs/evas

 Dir : e17/libs/evas/src/lib/include


 Modified Files:
evas_common.h


 Log Message:
 Remove bugs with bitfield usage, make boolean usage clear.

 This patch fixes the problem with bitfield of signed types (ie: char),
 where the bit would be used for the signal, so 1 is considered -0 and
 thus 0.

 Move all the single bit fields to Evas_Bool, making it clear and also
 avoiding these problems since Evas_Bool is unsigned char.

Compilers may complain about signed one bit bitfields, but it is 
severely broken if a signed one bit bitfield set to 1 evaluates to 0.

I would have thought that a signed one bit bitfield set to 1 normally 
evaluates to -1 which is != TRUE, assuming TRUE is 1.

Furthermore, you should not assume anything about the signedness of 
char. It depends on compiler configuration.

/Kim

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] E CVS: libs/evas barbieri

2008-05-20 Thread Gustavo Sverzut Barbieri
On Tue, May 20, 2008 at 6:46 PM, Kim Woelders [EMAIL PROTECTED] wrote:
 Gustavo Sverzut Barbieri wrote:

 to make clear: it COULD be -0, on intel at least it's -1 and thus
 evaluates to TRUE, that's why it was unnoticed.

 On Tue, May 20, 2008 at 5:56 PM, Enlightenment CVS
 [EMAIL PROTECTED] wrote:

 Enlightenment CVS committal

 Author  : barbieri
 Project : e17
 Module  : libs/evas

 Dir : e17/libs/evas/src/lib/include


 Modified Files:
   evas_common.h


 Log Message:
 Remove bugs with bitfield usage, make boolean usage clear.

 This patch fixes the problem with bitfield of signed types (ie: char),
 where the bit would be used for the signal, so 1 is considered -0 and
 thus 0.

 Move all the single bit fields to Evas_Bool, making it clear and also
 avoiding these problems since Evas_Bool is unsigned char.

 Compilers may complain about signed one bit bitfields, but it is severely
 broken if a signed one bit bitfield set to 1 evaluates to 0.

i see this fact somewhere.

 I would have thought that a signed one bit bitfield set to 1 normally
 evaluates to -1 which is != TRUE, assuming TRUE is 1.

exactly, forgot to say that.


 Furthermore, you should not assume anything about the signedness of char. It
 depends on compiler configuration.

exactly, that's why it's now forced to unsigned. on arm it's unsigned,
but on pc it's not.

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--
MSN: [EMAIL PROTECTED]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] E CVS: libs/evas barbieri

2008-05-20 Thread The Rasterman
On Tue, 20 May 2008 18:27:32 -0300 Gustavo Sverzut Barbieri
[EMAIL PROTECTED] babbled:

then u'd have a platform that does NOT do 2's compliment math. not compiler but
cpu... and i'd love to see that exist - NOT. :) everything is 2's compliment
and so a 1 bit signed bitfield when on is -1 which as you say - still is
true. it always will be :)

 to make clear: it COULD be -0, on intel at least it's -1 and thus
 evaluates to TRUE, that's why it was unnoticed.
 
 On Tue, May 20, 2008 at 5:56 PM, Enlightenment CVS
 [EMAIL PROTECTED] wrote:
  Enlightenment CVS committal
 
  Author  : barbieri
  Project : e17
  Module  : libs/evas
 
  Dir : e17/libs/evas/src/lib/include
 
 
  Modified Files:
 evas_common.h
 
 
  Log Message:
  Remove bugs with bitfield usage, make boolean usage clear.
 
  This patch fixes the problem with bitfield of signed types (ie: char),
  where the bit would be used for the signal, so 1 is considered -0 and
  thus 0.
 
  Move all the single bit fields to Evas_Bool, making it clear and also
  avoiding these problems since Evas_Bool is unsigned char.
 
 
  ===
  RCS file: /cvs/e/e17/libs/evas/src/lib/include/evas_common.h,v
  retrieving revision 1.97
  retrieving revision 1.98
  diff -u -3 -r1.97 -r1.98
  --- evas_common.h   19 May 2008 03:13:16 -  1.97
  +++ evas_common.h   20 May 2008 20:56:39 -  1.98
  @@ -283,12 +283,12 @@
 
struct
{
  -unsigned int loaded : 1;
  -unsigned int dirty  : 1;
  -unsigned int activ  : 1;
  -unsigned int need_data  : 1;
  -unsigned int lru_nodata : 1;
  -unsigned int cached : 1;
  +Evas_Boolloaded : 1;
  +Evas_Booldirty  : 1;
  +Evas_Boolactiv  : 1;
  +Evas_Boolneed_data  : 1;
  +Evas_Boollru_nodata : 1;
  +Evas_Boolcached : 1;
} flags;
 
intreferences;
  @@ -320,11 +320,11 @@
 
 struct
 {
  - unsigned intcached : 1;
  - unsigned intactiv : 1;
  - unsigned intdirty : 1;
  - unsigned intloaded : 1;
  - unsigned intneed_parent : 1;
  + Evas_Bool   cached : 1;
  + Evas_Bool   activ : 1;
  + Evas_Bool   dirty : 1;
  + Evas_Bool   loaded : 1;
  + Evas_Bool   need_parent : 1;
 } flags;
 
 int   references;
  @@ -347,7 +347,7 @@
   struct _RGBA_Draw_Context
   {
 struct {
  -  char   use : 1;
  +  Evas_Bool use : 1;
DATA32 col;
 } mul;
 struct {
  @@ -355,7 +355,7 @@
 } col;
 struct RGBA_Draw_Context_clip {
intx, y, w, h;
  -  char   use : 1;
  +  Evas_Bool use : 1;
 } clip;
 Cutout_Rects cutout;
 struct {
  @@ -373,7 +373,7 @@
int y, h;
 } sli;
 intrender_op;
  -   unsigned char  anti_alias : 1;
  +   Evas_Bool anti_alias : 1;
   };
 
   struct _RGBA_Pipe_Op
  @@ -448,15 +448,15 @@
 /* Colorspace stuff. */
 struct {
void  *data;
  -  unsigned int   no_free : 1;
  -  unsigned int   dirty : 1;
  +  Evas_Bool  no_free : 1;
  +  Evas_Bool  dirty : 1;
 } cs;
 
 /* RGBA stuff */
 struct
 {
DATA32*data;
  -  unsigned int   no_free : 1;
  +  Evas_Bool  no_free : 1;
 } image;
   };
 
  @@ -483,7 +483,7 @@
 float  angle;
 intdirection;
 float  offset;
  -   unsigned char  has_alpha : 1;
  +   Evas_Bool  has_alpha : 1;
   } map;
 
 struct {
  @@ -515,8 +515,8 @@
 
 int references;
 
  -   unsigned char imported_data : 1;
  -   unsigned char has_alpha : 1;
  +   Evas_Bool imported_data : 1;
  +   Evas_Bool has_alpha : 1;
   };
 
   struct _RGBA_Gradient_Type
  @@ -698,12 +698,12 @@
 
   struct _Tilebuf_Tile
   {
  -   unsigned char redraw : 1;
  +   Evas_Bool redraw : 1;
   /* FIXME: need these flags later - but not now */
   /*
  -   int done   : 1;
  -   int edge   : 1;
  -   int from   : 1;
  +   Evas_Bool done   : 1;
  +   Evas_Bool edge   : 1;
  +   Evas_Bool from   : 1;
 
 struct {
int dx, dy;
 
 
 
  -
  This SF.net email is sponsored by: Microsoft
  Defy all challenges. Microsoft(R) Visual Studio 2008.
  http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
  ___
  enlightenment-cvs mailing list
  [EMAIL PROTECTED]
  https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
 
 
 
 
 -- 
 Gustavo Sverzut Barbieri
 http://profusion.mobi embedded systems
 

Re: [E-devel] E CVS: libs/evas barbieri

2008-05-20 Thread Gustavo Sverzut Barbieri
On Tue, May 20, 2008 at 8:18 PM, The Rasterman Carsten Haitzler
[EMAIL PROTECTED] wrote:
 On Tue, 20 May 2008 18:27:32 -0300 Gustavo Sverzut Barbieri
 [EMAIL PROTECTED] babbled:

 then u'd have a platform that does NOT do 2's compliment math. not compiler 
 but
 cpu... and i'd love to see that exist - NOT. :) everything is 2's compliment
 and so a 1 bit signed bitfield when on is -1 which as you say

yes, this makes sense.


 - still is
 true. it always will be :)

but as kwo told, -1 != 1, so depends on how you check for true :-/
usually boolean operations will work, but direct comparison will
not but yes, i have not seen any == 1 or != 1 in e, so it's bit
pointless.

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--
MSN: [EMAIL PROTECTED]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] E CVS: libs/evas barbieri

2008-02-08 Thread Gustavo Sverzut Barbieri
On Feb 8, 2008 4:55 PM, Enlightenment CVS [EMAIL PROTECTED] wrote:
 Enlightenment CVS committal
 Log Message:
 Add const: evas_hash.c

 As agreed on IRC, evas_hash_foreach() now takes const, to make clear
 that hash shouldn't be changed. If one wants to change he must do a
 cast and return 0.  However this will require users to be updated in
 applications.

This already spotted a bug with xrender_{x11,xcb}: both use
evas_hash_modify() from inside evas_hash_foreach() and return 1, what
can cause corruption.

Could someone take a look at it?

-- 
Gustavo Sverzut Barbieri
--
Jabber: [EMAIL PROTECTED]
   MSN: [EMAIL PROTECTED]
  ICQ#: 17249123
 Skype: gsbarbieri
Mobile: +55 (81) 9927 0010

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] E CVS: libs/evas barbieri

2007-10-10 Thread Gustavo Sverzut Barbieri
Guys, could you please test it? You can run your applications within
Xephyr -screen WxHx16.

On 10/10/07, Enlightenment CVS [EMAIL PROTECTED] wrote:
 Enlightenment CVS committal

 Author  : barbieri
 Project : e17
 Module  : libs/evas

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


 Modified Files:
 evas_soft16.h evas_soft16_dither_mask.c evas_soft16_font.c
 evas_soft16_image_scaled_sampled.c
 evas_soft16_image_unscaled.c evas_soft16_rectangle.c
 evas_soft16_scanline_blend.c


 Log Message:
 Major rework of blit operations to use pre-multiplied colors.

 I wrote the first version thinking on regular, non-pre multiplied
 colors, but raster pointed out that all color data is pre-multiplied
 inside Evas. I was blaming 16bpp for low quality graphics, but it
 turned out that was an error with my usage.

 If you experienced grayish colors when using transparency, or white
 turning into black while fading out, then these should be fixed now.

 Now everything looks better, brighter! :-)  Expedite shows no
 performance regressions, but I'd like to see more tests on
 that. Please report any issue.

 ===
 RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16.h,v
 retrieving revision 1.8
 retrieving revision 1.9
 diff -u -3 -r1.8 -r1.9
 --- evas_soft16.h   3 Aug 2007 23:11:56 -   1.8
 +++ evas_soft16.h   10 Oct 2007 19:22:26 -  1.9
 @@ -12,6 +12,8 @@
rgb)  RGB_565_UNPACKED_MASK) |   \
 ((rgb)  RGB_565_UNPACKED_MASK)  16)  0x)
  #define RGB_565_UNPACKED_BLEND(a, b, alpha) \
 +   ((b) + (a) - b) * (alpha))  5)  RGB_565_UNPACKED_MASK))
 +#define RGB_565_UNPACKED_BLEND_UNMUL(a, b, alpha)   \
 ((b) + a) - (b)) * (alpha))  5))

  #define RGB_565_FROM_COMPONENTS(r, g, b)\
 ===
 RCS file: 
 /cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_dither_mask.c,v
 retrieving revision 1.2
 retrieving revision 1.3
 diff -u -3 -r1.2 -r1.3
 --- evas_soft16_dither_mask.c   20 Jul 2007 17:29:31 -  1.2
 +++ evas_soft16_dither_mask.c   10 Oct 2007 19:22:26 -  1.3
 @@ -142,29 +142,48 @@
  _soft16_convert_from_rgba_pt(const DATA32 *src, DATA16 *dst, DATA8 *alpha,
  const int x, const int y)
  {
 -   DATA8 orig_r, orig_g, orig_b, orig_a, r, g, b, a, dith5, dith6, dith;
 +   DATA8 orig_r, orig_g, orig_b, orig_a;

 orig_r = R_VAL(src);
 orig_g = G_VAL(src);
 orig_b = B_VAL(src);
 orig_a = A_VAL(src);

 -   r = orig_r  3;
 -   g = orig_g  2;
 -   b = orig_b  3;
 -   a = orig_a  3;
 -
 -   dith = dither_table[x  S16_DM_MSK][y  S16_DM_MSK];
 -   dith5 = dith  S16_DM_SHF(5);
 -   dith6 = dith  S16_DM_SHF(6);
 -
 -   if (((orig_r - (r  3)) = dith5)  (r  0x1f)) r++;
 -   if (((orig_g - (g  2)) = dith6)  (g  0x3f)) g++;
 -   if (((orig_b - (b  3)) = dith5)  (b  0x1f)) b++;
 -   if (((orig_a - (a  3)) = dith5)  (a  0x1f)) a++;
 +   if (orig_a == 255)
 + {
 +   DATA8 dith5, dith6, dith, r, g, b;

 -   *dst = (r  11) | (g  5) | b;
 -   *alpha = a;
 +   dith = dither_table[x  S16_DM_MSK][y  S16_DM_MSK];
 +   dith5 = dith  S16_DM_SHF(5);
 +   dith6 = dith  S16_DM_SHF(6);
 +
 +   r = orig_r  3;
 +   g = orig_g  2;
 +   b = orig_b  3;
 +
 +   if (((orig_r - (r  3)) = dith5)  (r  0x1f)) r++;
 +   if (((orig_g - (g  2)) = dith6)  (g  0x3f)) g++;
 +   if (((orig_b - (b  3)) = dith5)  (b  0x1f)) b++;
 +
 +   *dst = (r  11) | (g  5) | b;
 +   *alpha = 31;
 + }
 +   else if (orig_a == 0)
 + {
 +   *dst = 0;
 +   *alpha = 0;
 + }
 +   else
 + {
 +   DATA8 r, g, b, a;
 +   r = orig_r  3;
 +   g = orig_g  2;
 +   b = orig_b  3;
 +   a = (orig_a  3) + 1;
 +
 +   *dst = (r  11) | (g  5) | b;
 +   *alpha = a;
 + }
  }

  static inline void
 ===
 RCS file: 
 /cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_font.c,v
 retrieving revision 1.2
 retrieving revision 1.3
 diff -u -3 -r1.2 -r1.3
 --- evas_soft16_font.c  20 Jun 2007 19:10:15 -  1.2
 +++ evas_soft16_font.c  10 Oct 2007 19:22:26 -  1.3
 @@ -1,4 +1,5 @@
  #include evas_soft16.h
 +#include evas_soft16_scanline_blend.c

  static inline void
  _glyph_pt_mask_solid_solid(DATA16 *dst,
 @@ -6,15 +7,15 @@
const DATA32 rgb565_unpack,
const DATA8 *mask)
  {
 -   DATA8 alpha = *mask;
 +   DATA8 alpha = *mask  3;

 -   if (alpha == 255) *dst = rgb565;
 -   else if (alpha  8)
 +   if (alpha == 31) *dst = rgb565;
 +   else if (alpha  0)
   {
 DATA32 d;

 d = RGB_565_UNPACK(*dst);
 -   d = RGB_565_UNPACKED_BLEND(rgb565_unpack, 

Re: [E-devel] E CVS: libs/evas barbieri

2007-10-10 Thread Vincent Torri


On Wed, 10 Oct 2007, Gustavo Sverzut Barbieri wrote:

 Guys, could you please test it? You can run your applications within
 Xephyr -screen WxHx16.

I can test on windows :)

Vincent

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] E CVS: libs/evas barbieri

2007-06-27 Thread Nathan Ingersoll
Spotted a segv in the software_16 engine related to building the image
cache. I have an EWL engine setup to use software_16_x11, but EWL does
some aggressive evas object caching. In order to be certain edje
properties get reset, we set the file and key on the edje object to
NULL. As you can see in the function below, file is not checked to be
certain it's non-NULL before being used. Also, calling functions could
shortcut this key generation when the file is NULL.

On 6/18/07, Enlightenment CVS [EMAIL PROTECTED] wrote:

 +static void
 +soft16_image_cache_key(const Evas_Image_Load_Opts *lo, const char *key,
 +  const char *file, char *buf, unsigned bufsize)
 +{
 +   if ((!lo) ||
 +   ((lo-scale_down_by == 0)  (lo-dpi == 0.0) 
 +   ((lo-w == 0) || (lo-h == 0
 + {
 +   if (key) snprintf(buf, bufsize, %s//://%s, file, key);
 +   else strncpy(buf, file, bufsize);
 + }
 +   else
 + {
 +   if (key)
 +  snprintf(buf, bufsize, //@/%i/%1.5f/%ix%i//%s//://%s,
 +   lo-scale_down_by, lo-dpi, lo-w, lo-h,
 +   file, key);
 +   else
 +  snprintf(buf, bufsize, //@/%i/%1.5f/%ix%i//%s,
 +   lo-scale_down_by, lo-dpi, lo-w, lo-h,
 +   file);
 + }
 +}

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] E CVS: libs/evas barbieri

2007-06-27 Thread Gustavo Sverzut Barbieri
On 6/27/07, Nathan Ingersoll [EMAIL PROTECTED] wrote:
 Spotted a segv in the software_16 engine related to building the image
 cache. I have an EWL engine setup to use software_16_x11, but EWL does
 some aggressive evas object caching. In order to be certain edje
 properties get reset, we set the file and key on the edje object to
 NULL. As you can see in the function below, file is not checked to be
 certain it's non-NULL before being used. Also, calling functions could
 shortcut this key generation when the file is NULL.

Thanks for spotting that, I'll fix ASAP (I'm in a hotel right now).


 On 6/18/07, Enlightenment CVS [EMAIL PROTECTED] wrote:
 
  +static void
  +soft16_image_cache_key(const Evas_Image_Load_Opts *lo, const char *key,
  +  const char *file, char *buf, unsigned bufsize)
  +{
  +   if ((!lo) ||
  +   ((lo-scale_down_by == 0)  (lo-dpi == 0.0) 
  +   ((lo-w == 0) || (lo-h == 0
  + {
  +   if (key) snprintf(buf, bufsize, %s//://%s, file, key);
  +   else strncpy(buf, file, bufsize);
  + }
  +   else
  + {
  +   if (key)
  +  snprintf(buf, bufsize, //@/%i/%1.5f/%ix%i//%s//://%s,
  +   lo-scale_down_by, lo-dpi, lo-w, lo-h,
  +   file, key);
  +   else
  +  snprintf(buf, bufsize, //@/%i/%1.5f/%ix%i//%s,
  +   lo-scale_down_by, lo-dpi, lo-w, lo-h,
  +   file);
  + }
  +}

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel



-- 
Gustavo Sverzut Barbieri
--
Jabber: [EMAIL PROTECTED]
   MSN: [EMAIL PROTECTED]
  ICQ#: 17249123
 Skype: gsbarbieri
Mobile: +55 (81) 9927 0010

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] E CVS: libs/evas barbieri

2007-06-27 Thread Nathan Ingersoll
On 6/27/07, Gustavo Sverzut Barbieri [EMAIL PROTECTED] wrote:

 Thanks for spotting that, I'll fix ASAP (I'm in a hotel right now).

No problem. I put in a fix that prevents the segv, it's just a two
liner so hopefully it doesn't conflict with any outstanding changes
you have.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel