E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Added Files:
evas_common_soft16.h 


Log Message:


missed this. add.




-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/engines/common_16


Added Files:
.cvsignore Makefile.am evas_soft16_dither_mask.c 
evas_soft16_font.c evas_soft16_image_scaled_sampled.c 
evas_soft16_image_unscaled.c evas_soft16_line.c 
evas_soft16_main.c evas_soft16_polygon.c 
evas_soft16_rectangle.c evas_soft16_scanline_blend.c 
evas_soft16_scanline_fill.c 


Log Message:
add missing files.






-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Added Files:
.cvsignore Evas_Engine_SDL_16.h Makefile.am evas_engine.c 
evas_engine.h 


Log Message:
add missing files.






-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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




Log Message:
Directory /cvs/e/e17/libs/evas/src/modules/engines/software_16_sdl added to the 
repository




-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/engines/common_16




Log Message:
Directory /cvs/e/e17/libs/evas/src/lib/engines/common_16 added to the repository




-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/loaders/png


Modified Files:
evas_image_load_png.c 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/modules/loaders/png/evas_image_load_png.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- evas_image_load_png.c   28 Oct 2007 10:35:13 -  1.8
+++ evas_image_load_png.c   12 Apr 2008 00:32:29 -  1.9
@@ -80,16 +80,8 @@
fclose(f);
return 0;
  }
-   if (!im->image)
- im->image = evas_common_image_surface_new(im);
-   if (!im->image)
- {
-   png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp) NULL);
-   fclose(f);
-   return 0;
- }
-   im->image->w = (int) w32;
-   im->image->h = (int) h32;
+   im->cache_entry.w = (int) w32;
+   im->cache_entry.h = (int) h32;
if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) hasa = 1;
if (color_type == PNG_COLOR_TYPE_RGB_ALPHA) hasa = 1;
if (color_type == PNG_COLOR_TYPE_GRAY_ALPHA) hasa = 1;
@@ -151,7 +143,14 @@
png_get_IHDR(png_ptr, info_ptr, (png_uint_32 *) (&w32),
(png_uint_32 *) (&h32), &bit_depth, &color_type,
&interlace_type, NULL, NULL);
-   if ((w32 != im->image->w) || (h32 != im->image->h))
+   evas_cache_image_surface_alloc(&im->cache_entry, w32, h32);
+   if (!im->image.data)
+ {
+   png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp) NULL);
+   fclose(f);
+   return 0;
+ }
+   if ((w32 != im->cache_entry.w) || (h32 != im->cache_entry.h))
  {
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp) NULL);
fclose(f);
@@ -179,9 +178,9 @@
if (bit_depth > 8) png_set_strip_16(png_ptr);
/* pack all pixels to byte boundaries */
png_set_packing(png_ptr);
-   
-   w = im->image->w;
-   h = im->image->h;
+
+   w = im->cache_entry.w;
+   h = im->cache_entry.h;
/* we want ARGB */
 #ifdef WORDS_BIGENDIAN
png_set_swap_alpha(png_ptr);
@@ -190,23 +189,16 @@
png_set_bgr(png_ptr);
if (!hasa) png_set_filler(png_ptr, 0xff, PNG_FILLER_AFTER);
 #endif
-   evas_common_image_surface_alloc(im->image);
-   if (!im->image->data)
- {
-   evas_common_image_surface_free(im->image);
-   png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp) NULL);
-   fclose(f);
-   return 0;
- }
lines = (unsigned char **) alloca(h * sizeof(unsigned char *));
 
for (i = 0; i < h; i++)
- lines[i] = ((unsigned char *)(im->image->data)) + (i * w * 
sizeof(DATA32));
+ lines[i] = ((unsigned char *)(im->image.data)) + (i * w * sizeof(DATA32));
png_read_image(png_ptr, lines);
png_read_end(png_ptr, info_ptr);
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp) NULL);
fclose(f);
evas_common_image_premul(im);
+
return 1;
key = 0;
 }



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/savers/eet


Modified Files:
evas_image_save_eet.c 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/modules/savers/eet/evas_image_save_eet.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- evas_image_save_eet.c   14 Mar 2008 16:49:49 -  1.7
+++ evas_image_save_eet.c   12 Apr 2008 00:32:30 -  1.8
@@ -21,7 +21,7 @@
int alpha = 0, lossy = 0, ok = 0;
DATA32   *data;
 
-   if (!im || !im->image || !im->image->data || !file)
+   if (!im || !im->image.data || !file)
   return 0;
 
ef = eet_open((char *)file, EET_FILE_MODE_READ_WRITE);
@@ -41,9 +41,9 @@
 //   evas_common_convert_argb_unpremul(data, im->image->w * im->image->h);
 // }
 //   else
-   data = im->image->data;
+   data = im->image.data;
ok = eet_data_image_write(ef, (char *)key, data,
-im->image->w, im->image->h, alpha, compress,
+im->cache_entry.w, im->cache_entry.h, alpha, 
compress,
 quality, lossy);
 //   if (alpha)
 // free(data);



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/loaders/xpm


Modified Files:
evas_image_load_xpm.c 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/modules/loaders/xpm/evas_image_load_xpm.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- evas_image_load_xpm.c   28 Oct 2007 10:08:32 -  1.13
+++ evas_image_load_xpm.c   12 Apr 2008 00:32:30 -  1.14
@@ -249,20 +249,8 @@
 return 0;
   }
  }
-   if (!im->image)
- {
-im->image = evas_common_image_surface_new(im);
-if (!im->image)
-  {
-free(cmap);
-free(line);
-fclose(f);
-xpm_parse_done();
-return 0;
-  }
- }
-   im->image->w = w;
-   im->image->h = h;
+   im->cache_entry.w = w;
+   im->cache_entry.h = h;
 
j = 0;
context++;
@@ -376,22 +364,16 @@
   
if (load_data)
  {
-   if (im->image->data)
- evas_common_image_surface_dealloc(im->image);
-   im->image->w = w;
-   im->image->h = h;
-evas_common_image_surface_alloc(im->image);
-if (!im->image->data)
+evas_cache_image_surface_alloc(&im->cache_entry, 
w, h);
+if (!im->image.data)
   {
- evas_common_image_surface_free(im->image);
-im->image = NULL;
  free(cmap);
  free(line);
  fclose(f);
  xpm_parse_done();
  return 0;
   }
-ptr = im->image->data;
+ptr = im->image.data;
 end = ptr + (w * h);
 pixels = w * h;
  }
@@ -612,7 +594,7 @@
  if (!tl) break;
 line = tl;
   }
-if (((ptr) && ((ptr - im->image->data) >= (w * h * sizeof(DATA32 ||
+if (((ptr) && ((ptr - im->image.data) >= (w * h * sizeof(DATA32 ||
 ((context > 1) && (count >= pixels)))
  break;
  }



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Modified Files:
Evas_Engine_SDL.h evas_engine.c evas_engine.h 


Log Message:


cedric's cache changes patch

===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_sdl/Evas_Engine_SDL.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- Evas_Engine_SDL.h   16 Jul 2007 07:25:34 -  1.1
+++ Evas_Engine_SDL.h   12 Apr 2008 00:32:28 -  1.2
@@ -12,11 +12,11 @@
Evas_Engine_Info magic;
 
struct {
-  SDL_Surface  *surface;
-  int  fullscreen : 1;
-  int   hwsurface : 1;
-  int  noframe : 1;
-  int   alpha : 1;
+ introtation;
+ int   fullscreen : 1;
+ inthwsurface : 1;
+ int   noframe : 1;
+ intalpha : 1;
} info;
 };
 #endif
===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_sdl/evas_engine.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- evas_engine.c   5 Oct 2007 14:35:39 -   1.8
+++ evas_engine.c   12 Apr 2008 00:32:28 -  1.9
@@ -9,51 +9,53 @@
 
 /* #define DEBUG_SDL */
 
-extern Evas_List*  evas_modules;
-
 static Evas_Func   func = {};
 static Evas_Func   pfunc = {};
 
-static void*   _sdl_output_setup   (int w, int h, int 
fullscreen, int noframe, int alpha, int hwsurface);
-static void_sdl_stretch_blit   (const 
RGBA_Engine_Image* from, RGBA_Engine_Image* to, int w, int h);
+static void* _sdl_output_setup (int w, int h, int 
fullscreen, int noframe, int alpha, int hwsurface);
+
+static Engine_Image_Entry   *_sdl_image_alloc   (void);
+static void  _sdl_image_delete  (Engine_Image_Entry 
*eim);
 
-static int  _sdl_image_constructor  (RGBA_Engine_Image*, 
void* data);
-static void _sdl_image_destructor   (RGBA_Engine_Image 
*eim);
+static int   _sdl_image_constructor (Engine_Image_Entry*, 
void* data);
+static void  _sdl_image_destructor  (Engine_Image_Entry 
*eim);
 
-static void _sdl_image_dirty_region (RGBA_Engine_Image 
*eim, int x, int y, int w, int h);
+static void  _sdl_image_dirty_region(Engine_Image_Entry 
*eim, int x, int y, int w, int h);
 
-static int  _sdl_image_dirty(RGBA_Engine_Image 
*dst, const RGBA_Engine_Image *src);
+static int   _sdl_image_dirty   (Engine_Image_Entry 
*dst, const Engine_Image_Entry *src);
 
-static int  _sdl_image_size_set (RGBA_Engine_Image 
*dst, const RGBA_Engine_Image *src);
+static int   _sdl_image_size_set(Engine_Image_Entry 
*dst, const Engine_Image_Entry *src);
 
-static int  _sdl_image_update_data  (RGBA_Engine_Image* 
dst, void* engine_data);
+static int   _sdl_image_update_data (Engine_Image_Entry* 
dst, void* engine_data);
 
-static void _sdl_image_load (RGBA_Engine_Image 
*eim, const RGBA_Image* im);
-static int  _sdl_image_mem_size_get (RGBA_Engine_Image 
*eim);
+static void  _sdl_image_load(Engine_Image_Entry 
*eim, const Image_Entry* im);
+static int   _sdl_image_mem_size_get(Engine_Image_Entry 
*eim);
 
 #ifdef DEBUG_SDL
-static void _sdl_image_debug(const char* context, 
RGBA_Engine_Image* im);
+static void  _sdl_image_debug   (const char* context, 
Engine_Image_Entry* im);
 #endif
 
 static const Evas_Cache_Engine_Image_Func   _sdl_cache_engine_image_cb = {
-   .key = NULL,
-   .constructor = _sdl_image_constructor,
-   .destructor = _sdl_image_destructor,
-   .dirty_region = _sdl_image_dirty_region,
-   .dirty = _sdl_image_dirty,
-   .size_set = _sdl_image_size_set,
-   .update_data = _sdl_image_update_data,
-   .load = _sdl_image_load,
-   .mem_size_get = _sdl_image_mem_size_get,
-#ifdef DEBUG_SDL
-   .debug = _sdl_image_debug
+  NULL /* key */,
+  _sdl_image_alloc /* alloc */,
+  _sdl_image_delete /* dealloc */,
+  _sdl_image_constructor /* constructor */,
+  _sdl_image_destructor /* destructor */,
+  _sdl_image_dirty_region /* dirty_region */,
+  _sdl_image_dirty /* dirty */,
+  _sdl_image_size_set /* size_set */,
+  _sdl_image_update_data /* update_data */,
+  _sdl_image_load /* load */,
+  _sdl_image_mem_size_get /* mem_size_get */,
+#ifdef DEBUG_SDL  /* debug */
+  _sdl_image_debug
 #else
-   .debug = NULL
+  N

E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/loaders/pmaps


Modified Files:
evas_image_load_pmaps.c 


Log Message:


cedric's cache changes patch

===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/loaders/pmaps/evas_image_load_pmaps.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- evas_image_load_pmaps.c 1 Mar 2008 15:27:20 -   1.1
+++ evas_image_load_pmaps.c 12 Apr 2008 00:32:29 -  1.2
@@ -80,16 +80,8 @@
return 0;
  }
 
-   if (!im->image)
-  im->image = evas_common_image_surface_new(im);
-   if (!im->image)
- {
-   pmaps_buffer_close(&b);
-   return 0;
- }
-
-   im->image->w = b.w;
-   im->image->h = b.h;
+   im->cache_entry.w = b.w;
+   im->cache_entry.h = b.h;
 
pmaps_buffer_close(&b);
return 1;
@@ -122,23 +114,14 @@
 
pixels = b.w * b.h;
 
-   if (!im->image)
-  im->image = evas_common_image_surface_new(im);
-   if (!im->image)
- {
-   pmaps_buffer_close(&b);
-   return 0;
- }
-
-   evas_common_image_surface_alloc(im->image);
-   if (!im->image->data)
+   evas_cache_image_surface_alloc(&im->cache_entry, b.w, b.h);
+   if (!im->image.data)
  {
-   evas_common_image_surface_free(im->image);
pmaps_buffer_close(&b);
return 0;
  }
 
-   ptr = im->image->data;
+   ptr = im->image.data;
 
if (b.type[1] != '4')
  {



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/savers/png


Modified Files:
evas_image_save_png.c 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/modules/savers/png/evas_image_save_png.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- evas_image_save_png.c   28 Oct 2006 03:02:23 -  1.6
+++ evas_image_save_png.c   12 Apr 2008 00:32:30 -  1.7
@@ -27,7 +27,7 @@
png_color_8 sig_bit;
int num_passes = 1, pass;
 
-   if (!im || !im->image || !im->image->data || !file)
+   if (!im || !im->image.data || !file)
   return 0;

f = fopen(file, "wb");
@@ -64,7 +64,7 @@

if (im->flags & RGBA_IMAGE_HAS_ALPHA)
  {
-   data = malloc(im->image->w * im->image->h * sizeof(DATA32));
+   data = malloc(im->cache_entry.w * im->cache_entry.h * sizeof(DATA32));
if (!data)
  {
fclose(f);
@@ -72,10 +72,10 @@
png_destroy_info_struct(png_ptr, (png_infopp) & info_ptr);
return 0;
  }
-   memcpy(data, im->image->data, im->image->w * im->image->h * 
sizeof(DATA32));
-   evas_common_convert_argb_unpremul(data, im->image->w * im->image->h);
+   memcpy(data, im->image.data, im->cache_entry.w * im->cache_entry.h * 
sizeof(DATA32));
+   evas_common_convert_argb_unpremul(data, im->cache_entry.w * 
im->cache_entry.h);
png_init_io(png_ptr, f);
-png_set_IHDR(png_ptr, info_ptr, im->image->w, im->image->h, 8,
+png_set_IHDR(png_ptr, info_ptr, im->cache_entry.w, im->cache_entry.h, 
8,
 PNG_COLOR_TYPE_RGB_ALPHA, png_ptr->interlaced,
 PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
 #ifdef WORDS_BIGENDIAN
@@ -86,12 +86,12 @@
  }
else
  {
-   data = im->image->data;
+   data = im->image.data;
png_init_io(png_ptr, f);
-   png_set_IHDR(png_ptr, info_ptr, im->image->w, im->image->h, 8,
+   png_set_IHDR(png_ptr, info_ptr, im->cache_entry.w, im->cache_entry.h, 8,
 PNG_COLOR_TYPE_RGB, png_ptr->interlaced,
 PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
-   png_data = alloca(im->image->w * 3 * sizeof(char));
+   png_data = alloca(im->cache_entry.w * 3 * sizeof(char));
  }
sig_bit.red = 8;
sig_bit.green = 8;
@@ -108,13 +108,13 @@
  {
ptr = data;

-   for (y = 0; y < im->image->h; y++)
+   for (y = 0; y < im->cache_entry.h; y++)
  {
 if (im->flags & RGBA_IMAGE_HAS_ALPHA)
   row_ptr = (png_bytep) ptr;
 else
   {
- for (j = 0, x = 0; x < im->image->w; x++)
+ for (j = 0, x = 0; x < im->cache_entry.w; x++)
{
   png_data[j++] = (ptr[x] >> 16) & 0xff;
   png_data[j++] = (ptr[x] >> 8) & 0xff;
@@ -123,7 +123,7 @@
  row_ptr = (png_bytep) png_data;
   }
 png_write_rows(png_ptr, &row_ptr, 1);
-ptr += im->image->w;
+ptr += im->cache_entry.w;
  }
  }
png_write_end(png_ptr, info_ptr);



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/savers/jpeg


Modified Files:
evas_image_save_jpeg.c 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/modules/savers/jpeg/evas_image_save_jpeg.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- evas_image_save_jpeg.c  28 Oct 2006 03:02:23 -  1.4
+++ evas_image_save_jpeg.c  12 Apr 2008 00:32:30 -  1.5
@@ -63,10 +63,10 @@
int y = 0;
int i, j;
 
-   if (!im || !im->image || !im->image->data || !file)
+   if (!im || !im->image.data || !file)
   return 0;

-   buf = alloca(im->image->w * 3 * sizeof(DATA8));
+   buf = alloca(im->cache_entry.w * 3 * sizeof(DATA8));
f = fopen(file, "wb");
if (!f)
  {
@@ -84,17 +84,17 @@
  }
jpeg_create_compress(&cinfo);
jpeg_stdio_dest(&cinfo, f);
-   cinfo.image_width = im->image->w;
-   cinfo.image_height = im->image->h;
+   cinfo.image_width = im->cache_entry.w;
+   cinfo.image_height = im->cache_entry.h;
cinfo.input_components = 3;
cinfo.in_color_space = JCS_RGB;
jpeg_set_defaults(&cinfo);
jpeg_set_quality(&cinfo, quality, TRUE);
jpeg_start_compress(&cinfo, TRUE);
-   ptr = im->image->data;
+   ptr = im->image.data;
while (cinfo.next_scanline < cinfo.image_height)
  {
-   for (j = 0, i = 0; i < im->image->w; i++)
+   for (j = 0, i = 0; i < im->cache_entry.w; i++)
  {
 buf[j++] = ((*ptr) >> 16) & 0xff;
 buf[j++] = ((*ptr) >> 8) & 0xff;



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/loaders/jpeg


Modified Files:
evas_image_load_jpeg.c 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/modules/loaders/jpeg/evas_image_load_jpeg.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- evas_image_load_jpeg.c  5 Nov 2006 05:07:52 -   1.6
+++ evas_image_load_jpeg.c  12 Apr 2008 00:32:29 -  1.7
@@ -89,16 +89,11 @@
jpeg_read_header(&cinfo, TRUE);
cinfo.do_fancy_upsampling = FALSE;
cinfo.do_block_smoothing = FALSE;
+   cinfo.dct_method = JDCT_IFAST;
+   cinfo.dither_mode = JDITHER_ORDERED;
jpeg_start_decompress(&cinfo);
 
 /* head decoding */
-   if (!im->image)
- im->image = evas_common_image_surface_new(im);
-   if (!im->image)
- {
-   jpeg_destroy_decompress(&cinfo);
-   return 0;
- }
w = cinfo.output_width;
h = cinfo.output_height;
if ((w < 1) || (h < 1) || (w > 8192) || (h > 8192))
@@ -106,27 +101,27 @@
 jpeg_destroy_decompress(&cinfo);
return 0;
  }
-   if (im->load_opts.scale_down_by > 1)
+   if (im->cache_entry.load_opts.scale_down_by > 1)
  {
-   w /= im->load_opts.scale_down_by;
-   h /= im->load_opts.scale_down_by;
+   w /= im->cache_entry.load_opts.scale_down_by;
+   h /= im->cache_entry.load_opts.scale_down_by;
  }
-   else if (im->load_opts.dpi > 0.0)
+   else if (im->cache_entry.load_opts.dpi > 0.0)
  {
-   w = (w * im->load_opts.dpi) / 90.0;
-   h = (h * im->load_opts.dpi) / 90.0;
+   w = (w * im->cache_entry.load_opts.dpi) / 90.0;
+   h = (h * im->cache_entry.load_opts.dpi) / 90.0;
  }
-   else if ((im->load_opts.w > 0) &&
-   (im->load_opts.h > 0))
+   else if ((im->cache_entry.load_opts.w > 0) &&
+   (im->cache_entry.load_opts.h > 0))
  {
int w2, h2;

-   w2 = im->load_opts.w;
-   h2 = (im->load_opts.w * h) / w;
-   if (h2 > im->load_opts.h)
+   w2 = im->cache_entry.load_opts.w;
+   h2 = (im->cache_entry.load_opts.w * h) / w;
+   if (h2 > im->cache_entry.load_opts.h)
  {
-h2 = im->load_opts.h;
-w2 = (im->load_opts.h * w) / h;
+h2 = im->cache_entry.load_opts.h;
+w2 = (im->cache_entry.load_opts.h * w) / h;
  }
w = w2;
h = h2;
@@ -139,19 +134,19 @@
scalew = cinfo.output_width / w;
scaleh = cinfo.output_height / h;

-   im->scale = scalew;
-   if (scaleh < scalew) im->scale = scaleh;
+   im->cache_entry.scale = scalew;
+   if (scaleh < scalew) im->cache_entry.scale = scaleh;

-   if  (im->scale > 8) im->scale = 8;
-   else if (im->scale < 1) im->scale = 1;
+   if  (im->cache_entry.scale > 8) im->cache_entry.scale = 8;
+   else if (im->cache_entry.scale < 1) im->cache_entry.scale = 1;

-   if  (im->scale == 3) im->scale = 2;
-   else if (im->scale == 5) im->scale = 4;
-   else if (im->scale == 6) im->scale = 4;
-   else if (im->scale == 7) im->scale = 4;
+   if  (im->cache_entry.scale == 3) im->cache_entry.scale = 2;
+   else if (im->cache_entry.scale == 5) im->cache_entry.scale = 4;
+   else if (im->cache_entry.scale == 6) im->cache_entry.scale = 4;
+   else if (im->cache_entry.scale == 7) im->cache_entry.scale = 4;
  }
 
-   if (im->scale > 1)
+   if (im->cache_entry.scale > 1)
  {
jpeg_destroy_decompress(&cinfo);

@@ -162,13 +157,13 @@
cinfo.do_fancy_upsampling = FALSE;
cinfo.do_block_smoothing = FALSE;
cinfo.scale_num = 1;
-   cinfo.scale_denom = im->scale;
+   cinfo.scale_denom = im->cache_entry.scale;
jpeg_calc_output_dimensions(&(cinfo));
jpeg_start_decompress(&cinfo);
  }

-   im->image->w = cinfo.output_width;
-   im->image->h = cinfo.output_height;
+   im->cache_entry.w = cinfo.output_width;
+   im->cache_entry.h = cinfo.output_height;
 /* end head decoding */
 
jpeg_destroy_decompress(&cinfo);
@@ -201,11 +196,12 @@
cinfo.do_fancy_upsampling = FALSE;
cinfo.do_block_smoothing = FALSE;
cinfo.dct_method = JDCT_IFAST;
-   
-   if (im->scale > 1)
+   cinfo.dither_mode = JDITHER_ORDERED;
+
+   if (im->cache_entry.scale > 1)
  {
cinfo.scale_num = 1;
-   cinfo.scale_denom = im->scale;
+   cinfo.scale_denom = im->cache_entry.scale;
  }

 /* head decoding */
@@ -215,7 +211,7 @@
w = cinfo.output_width;
h = cinfo.output_height;

-   if ((w != im->image->w) || (h != im->image->h))
+   if ((w != im->cache_entry.w) || (h != im->cache_entry.h))
  {
jpeg_destroy_decompress(&cinfo);
return 0;
@@ -229,13 +225,13 @@
return 0;
  }
data = alloca(w * 16 * 3);
-   evas_common_image_surface_all

E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/loaders/svg


Modified Files:
evas_image_load_svg.c 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/modules/loaders/svg/evas_image_load_svg.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- evas_image_load_svg.c   5 Mar 2007 18:19:49 -   1.13
+++ evas_image_load_svg.c   12 Apr 2008 00:32:29 -  1.14
@@ -50,7 +50,7 @@
/* ignore all files not called .svg or .svg.gz - because rsvg has a leak
 * where closing the handle doesn't free mem */
ext = strrchr(file, '.');
-   if (!ext) return;
+   if (!ext) return 0;
if (!strcasecmp(ext, ".gz"))
  {
if (p > file)
@@ -81,61 +81,47 @@
chdir(pcwd);
return 0;
  }
-   if (!im->image)
- {
-   im->image = evas_common_image_surface_new(im);
-   if (!im->image)
- {
-//  rsvg_handle_close(rsvg, NULL);
-g_object_unref(rsvg);
-//  rsvg_handle_free(rsvg);
-chdir(pcwd);
-return 0;
- }
- }
 
rsvg_handle_get_dimensions(rsvg, &dim);
w = dim.width;
h = dim.height;
if ((w < 1) || (h < 1) || (w > 8192) || (h > 8192))
  {
-   evas_common_image_surface_free(im->image);
-   im->image = NULL;
 // rsvg_handle_close(rsvg, NULL);
g_object_unref(rsvg);
 // rsvg_handle_free(rsvg);
chdir(pcwd);
return 0;
  }
-   if (im->load_opts.scale_down_by > 1)
+   if (im->cache_entry.load_opts.scale_down_by > 1)
  {
-   w /= im->load_opts.scale_down_by;
-   h /= im->load_opts.scale_down_by;
+   w /= im->cache_entry.load_opts.scale_down_by;
+   h /= im->cache_entry.load_opts.scale_down_by;
  }
-   else if (im->load_opts.dpi > 0.0)
+   else if (im->cache_entry.load_opts.dpi > 0.0)
  {
-   w = (w * im->load_opts.dpi) / 90.0;
-   h = (h * im->load_opts.dpi) / 90.0;
+   w = (w * im->cache_entry.load_opts.dpi) / 90.0;
+   h = (h * im->cache_entry.load_opts.dpi) / 90.0;
  }
-   else if ((im->load_opts.w > 0) &&
-   (im->load_opts.h > 0))
+   else if ((im->cache_entry.load_opts.w > 0) &&
+   (im->cache_entry.load_opts.h > 0))
  {
int w2, h2;

-   w2 = im->load_opts.w;
-   h2 = (im->load_opts.w * h) / w;
-   if (h2 > im->load_opts.h)
+   w2 = im->cache_entry.load_opts.w;
+   h2 = (im->cache_entry.load_opts.w * h) / w;
+   if (h2 > im->cache_entry.load_opts.h)
  {
-h2 = im->load_opts.h;
-w2 = (im->load_opts.h * w) / h;
+h2 = im->cache_entry.load_opts.h;
+w2 = (im->cache_entry.load_opts.h * w) / h;
  }
w = w2;
h = h2;
  }
if (w < 1) w = 1;
if (h < 1) h = 1;
-   im->image->w = w;
-   im->image->h = h;
+   im->cache_entry.w = w;
+   im->cache_entry.h = h;
im->flags |= RGBA_IMAGE_HAS_ALPHA;
 //   rsvg_handle_close(rsvg, NULL);
g_object_unref(rsvg);
@@ -157,12 +143,11 @@
char   *ext;
 
if (!file) return 0;
-   if (!im->image) return 0;
 
/* ignore all files not called .svg or .svg.gz - because rsvg has a leak
 * where closing the handle doesn't free mem */
ext = strrchr(file, '.');
-   if (!ext) return;
+   if (!ext) return 0;
if (!strcasecmp(ext, ".gz"))
  {
if (p > file)
@@ -190,8 +175,6 @@
rsvg = rsvg_handle_new_from_file(file, NULL);
if (!rsvg)
  {
-   evas_common_image_surface_free(im->image);
-   im->image = NULL;
chdir(pcwd);
return 0;
  }
@@ -201,49 +184,43 @@
h = dim.height;
if ((w < 1) || (h < 1) || (w > 8192) || (h > 8192))
  {
-   evas_common_image_surface_free(im->image);
-   im->image = NULL;
 // rsvg_handle_close(rsvg, NULL);
g_object_unref(rsvg);
 // rsvg_handle_free(rsvg);
chdir(pcwd);
return 0;
  }
-   if (im->load_opts.scale_down_by > 1)
+   if (im->cache_entry.load_opts.scale_down_by > 1)
  {
-   w /= im->load_opts.scale_down_by;
-   h /= im->load_opts.scale_down_by;
+   w /= im->cache_entry.load_opts.scale_down_by;
+   h /= im->cache_entry.load_opts.scale_down_by;
  }
-   else if (im->load_opts.dpi > 0.0)
+   else if (im->cache_entry.load_opts.dpi > 0.0)
  {
-   w = (w * im->load_opts.dpi) / 90.0;
-   h = (h * im->load_opts.dpi) / 90.0;
+   w = (w * im->cache_entry.load_opts.dpi) / 90.0;
+   h = (h * im->cache_entry.load_opts.dpi) / 90.0;
  }
-   else if ((im->load_opts.w > 0) &&
-   (im->load_opts.h > 0))
+   else if ((im->cache_entry.load_opts.w > 0) &&
+   (im->cache_entry.load_opts.h > 0))
  {
int w2, h2;

-   w2 = im->load_opts.w;
-   h2 = (im->load_opts.w * h) / w;
-   if (h2 > im->load

E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/loaders/tiff


Modified Files:
evas_image_load_tiff.c 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/modules/loaders/tiff/evas_image_load_tiff.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- evas_image_load_tiff.c  5 Feb 2008 12:00:19 -   1.9
+++ evas_image_load_tiff.c  12 Apr 2008 00:32:29 -  1.10
@@ -69,11 +69,11 @@
int image_width, image_height;
uint32 *pixel, pixel_value;
int i, j, dy, rast_offset;
-   DATA32 *buffer_pixel, *buffer = img->image->image->data;
+   DATA32 *buffer_pixel, *buffer = img->image->image.data;
int alpha_premult;
 
-   image_width = img->image->image->w;
-   image_height = img->image->image->h;
+   image_width = img->image->cache_entry.w;
+   image_height = img->image->cache_entry.h;
 
dy = h > y ? -1 : y - h;
 
@@ -163,13 +163,6 @@
 return 0;
  }
 
-   if (!im->image)
- im->image = evas_common_image_surface_new(im);
-   if (!im->image)
- {
-TIFFClose(tif);
-   return 0;
- }
if (tiff_image.alpha != EXTRASAMPLE_UNSPECIFIED)
  im->flags |= RGBA_IMAGE_HAS_ALPHA;
if ((tiff_image.width < 1) || (tiff_image.height < 1) ||
@@ -178,8 +171,8 @@
TIFFClose(tif);
return 0;
  }
-   im->image->w = tiff_image.width;
-   im->image->h = tiff_image.height;
+   im->cache_entry.w = tiff_image.width;
+   im->cache_entry.h = tiff_image.height;
 
TIFFClose(tif);
return 1;
@@ -238,36 +231,26 @@
  }
rgba_image.image = im;
 
-   if (!im->image)
- im->image = evas_common_image_surface_new(im);
-   if (!im->image)
- {
-TIFFClose(tif);
-   return 0;
- }
if (rgba_image.rgba.alpha != EXTRASAMPLE_UNSPECIFIED)
  im->flags |= RGBA_IMAGE_HAS_ALPHA;
-   if ((rgba_image.rgba.width != im->image->w) ||
-   (rgba_image.rgba.height != im->image->h))
+   if ((rgba_image.rgba.width != im->cache_entry.w) ||
+   (rgba_image.rgba.height != im->cache_entry.h))
  {
 TIFFClose(tif);
return 0;
  }
-   im->image->w = rgba_image.rgba.width;
-   im->image->h = rgba_image.rgba.height;
-   rgba_image.num_pixels = num_pixels = im->image->w * im->image->h;
 
-   evas_common_image_surface_alloc(im->image);
-   if (!im->image->data)
+   evas_cache_image_surface_alloc(&im->cache_entry, rgba_image.rgba.width, 
rgba_image.rgba.height);
+   if (!im->image.data)
  {
-   evas_common_image_surface_free(im->image);
-
 TIFFRGBAImageEnd((TIFFRGBAImage *) & rgba_image);
 TIFFClose(tif);
 
return 0;
  }
 
+   rgba_image.num_pixels = num_pixels = im->cache_entry.w * im->cache_entry.h;
+
rgba_image.pper = rgba_image.py = 0;
rast = (uint32 *) _TIFFmalloc(sizeof(uint32) * num_pixels);
 
@@ -285,7 +268,6 @@
  {
 fprintf(stderr, "Evas Tiff loader: no put function");
 
-   evas_common_image_surface_free(im->image);
 _TIFFfree(rast);
 TIFFRGBAImageEnd((TIFFRGBAImage *) & rgba_image);
 TIFFClose(tif);
@@ -305,13 +287,13 @@
 rgba_image.rgba.put.separate = put_separate_and_raster;
  }
  }
+
/*  if (rgba_image.rgba.samplesperpixel == 8)*/
if (rgba_image.rgba.bitspersample == 8)
  {
 if (!TIFFRGBAImageGet((TIFFRGBAImage *) &rgba_image, rast,
   rgba_image.rgba.width, rgba_image.rgba.height))
   {
- evas_common_image_surface_free(im->image);
  _TIFFfree(rast);
  TIFFRGBAImageEnd((TIFFRGBAImage *) & rgba_image);
  TIFFClose(tif);



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Modified Files:
evas_engine.c evas_engine_font.c evas_engine_gradient.c 
evas_engine_image.c 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/xrender_xcb/evas_engine.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- evas_engine.c   17 Jun 2007 03:02:22 -  1.14
+++ evas_engine.c   12 Apr 2008 00:32:29 -  1.15
@@ -761,35 +761,31 @@
 static void
 eng_font_draw(void *data, void *context, void *surface, void *font, int x, int 
y, int w, int h, int ow, int oh, const char *text)
 {
-   Render_Engine *re;
+   Render_Engine*re;
+   RGBA_Image   *im;
 
re = (Render_Engine *)data;
- {
-   static RGBA_Image *im = NULL;
 
-   if (!im)
- {
-im = evas_common_image_new();
-im->image = evas_common_image_surface_new(im);
-im->image->no_free = 1;
- }
-   im->image->w = ((Xcb_Render_Surface *)surface)->w;
-   im->image->h = ((Xcb_Render_Surface *)surface)->h;
-   _xr_render_surface_clips_set((Xcb_Render_Surface *)surface, 
(RGBA_Draw_Context *)context, x, y, w, h);
-   im->image->data = surface;
-   evas_common_draw_context_font_ext_set(context,
- re->xcbinf,
- _xre_font_surface_new,
- _xre_font_surface_free,
- _xre_font_surface_draw);
-   evas_common_font_draw(im, context, font, x, y, text);
-   evas_common_draw_context_font_ext_set(context,
- NULL,
- NULL,
- NULL,
- NULL);
-   evas_common_cpu_end_opt();
- }
+   im = (RGBA_Image *) evas_cache_image_data(evas_common_image_cache_get(),
+ ((Xcb_Render_Surface 
*)surface)->w,
+ ((Xcb_Render_Surface 
*)surface)->h,
+ surface,
+ 0, EVAS_COLORSPACE_ARGB);
+
+   _xr_render_surface_clips_set((Xcb_Render_Surface *)surface, 
(RGBA_Draw_Context *)context, x, y, w, h);
+
+   evas_common_draw_context_font_ext_set(context,
+ re->xcbinf,
+ _xre_font_surface_new,
+ _xre_font_surface_free,
+ _xre_font_surface_draw);
+   evas_common_font_draw(im, context, font, x, y, text);
+   evas_common_draw_context_font_ext_set(context,
+ NULL,
+ NULL,
+ NULL,
+ NULL);
+   evas_common_cpu_end_opt();
 }
 
 /* module advertising code */
===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/xrender_xcb/evas_engine_font.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- evas_engine_font.c  8 Feb 2008 20:42:10 -   1.5
+++ evas_engine_font.c  12 Apr 2008 00:32:29 -  1.6
@@ -167,7 +167,7 @@

fs = fg->ext_dat;
if (!fs) return;
-   target_surface = (Xcb_Render_Surface *)(surface->image->data);
+   target_surface = (Xcb_Render_Surface *)(surface->image.data);
a = (dc->col.col >> 24) & 0xff;
r = (dc->col.col >> 16) & 0xff;
g = (dc->col.col >> 8 ) & 0xff;
===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/xrender_xcb/evas_engine_gradient.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- evas_engine_gradient.c  1 Oct 2006 18:26:47 -   1.5
+++ evas_engine_gradient.c  12 Apr 2008 00:32:29 -  1.6
@@ -159,18 +159,19 @@
int op = dc->render_op, cuse = dc->clip.use;
RGBA_Image  *im;
 
-   im = evas_common_image_create(w, h);
-   if (!im) 
+im = (RGBA_Image*) 
evas_cache_image_empty(evas_common_image_cache_get());
+   if (!im)
  {
_xr_render_surface_free(gr->surface);
gr->surface = NULL;
return;
  }
+evas_cache_image_surface_alloc(&im->cache_entry, w, h);
dc->render_op = _EVAS_RENDER_FILL;
dc->clip.use = 0;
evas_common_gradient_draw(im, dc, 0, 0, w, h, gr->grad);
-   _xr_render_surface_argb_pixels_fill(gr->surface, w, h, im->image->data, 
0, 0, w, h);
-   evas_common_image_

E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/loaders/gif


Modified Files:
evas_image_load_gif.c 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/modules/loaders/gif/evas_image_load_gif.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- evas_image_load_gif.c   5 Nov 2006 05:07:52 -   1.5
+++ evas_image_load_gif.c   12 Apr 2008 00:32:29 -  1.6
@@ -94,15 +94,8 @@
} while (rec != TERMINATE_RECORD_TYPE);
 
if (alpha >= 0) im->flags |= RGBA_IMAGE_HAS_ALPHA;
-   if (!im->image)
- im->image = evas_common_image_surface_new(im);
-   if (!im->image)
- {
-DGifCloseFile(gif);
-   return 0;
- }
-   im->image->w = w;
-   im->image->h = h;
+   im->cache_entry.w = w;
+   im->cache_entry.h = h;
 
DGifCloseFile(gif);
return 1;
@@ -241,20 +234,9 @@
} while (rec != TERMINATE_RECORD_TYPE);
 
if (alpha >= 0) im->flags |= RGBA_IMAGE_HAS_ALPHA;
-   if (!im->image)
- im->image = evas_common_image_surface_new(im);
-   if (!im->image)
- {
-DGifCloseFile(gif);
-   return 0;
- }
-   im->image->w = w;
-   im->image->h = h;
-
-   evas_common_image_surface_alloc(im->image);
-   if (!im->image->data)
+   evas_cache_image_surface_alloc(&im->cache_entry, w, h);
+   if (!im->image.data)
  {
-   evas_common_image_surface_free(im->image);
 DGifCloseFile(gif);
 for (i = 0; i < h; i++)
   {
@@ -267,7 +249,7 @@
bg = gif->SBackGroundColor;
cmap = (gif->Image.ColorMap ? gif->Image.ColorMap : gif->SColorMap);
 
-   ptr = im->image->data;
+   ptr = im->image.data;
per_inc = 100.0 / (((double)w) * h);
 
for (i = 0; i < h; i++)



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Modified Files:
evas_engine.c evas_engine_font.c evas_engine_gradient.c 
evas_engine_image.c 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/xrender_x11/evas_engine.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- evas_engine.c   7 Apr 2008 23:07:23 -   1.21
+++ evas_engine.c   12 Apr 2008 00:32:28 -  1.22
@@ -529,11 +529,11 @@
_xre_image_border_get((XR_Image *)image, l, r, t, b);
 }
 
-static const char *
+static char *
 eng_image_comment_get(void *data, void *image, char *key)
 {
if (!image) return NULL;
-   return ((XR_Image *)image)->comment;
+   return strdup(((XR_Image *)image)->comment);
 }
 
 static char *
@@ -551,6 +551,10 @@
if (!image) return;
im = (XR_Image *)image;
if (im->cs.space == cspace) return;
+
+   if (im->im) evas_cache_image_drop(&im->im->cache_entry);
+   im->im = NULL;
+
switch (cspace)
  {
   case EVAS_COLORSPACE_ARGB:
@@ -560,15 +564,11 @@
 im->cs.data = NULL;
 im->cs.no_free = 0;
  }
-   if (im->im) evas_cache_image_drop(im->im);
-   im->im = NULL;
break;
   case EVAS_COLORSPACE_YCBCR422P601_PL:
   case EVAS_COLORSPACE_YCBCR422P709_PL:
if ((im->free_data) && (im->data)) free(im->data);
im->data = NULL;
-   if (im->im) evas_cache_image_drop(im->im);
-   im->im = NULL;
if (im->cs.data)
  {
 if (!im->cs.no_free) free(im->cs.data);
@@ -693,7 +693,7 @@
  }
im = (XR_Image *)image;
if (im->im)
- evas_common_load_image_data_from_file(im->im);
+ evas_cache_image_load_data(&im->im->cache_entry);
switch (im->cs.space)
  {
   case EVAS_COLORSPACE_ARGB:
@@ -832,35 +832,32 @@
 static void
 eng_font_draw(void *data, void *context, void *surface, void *font, int x, int 
y, int w, int h, int ow, int oh, const char *text)
 {
-   Render_Engine *re;
-   
+   Render_Engine*re;
+   RGBA_Image   *im;
+
re = (Render_Engine *)data;
- {
-   static RGBA_Image *im = NULL;
-   
-   if (!im)
- {
-im = evas_common_image_new();
-im->image = evas_common_image_surface_new(im);
-im->image->no_free = 1;
- }
-   im->image->w = ((Xrender_Surface *)surface)->w;
-   im->image->h = ((Xrender_Surface *)surface)->h;
-   _xr_render_surface_clips_set((Xrender_Surface *)surface, 
(RGBA_Draw_Context *)context, x, y, w, h);
-   im->image->data = surface;
-   evas_common_draw_context_font_ext_set(context,
- re->xinf,
- _xre_font_surface_new,
- _xre_font_surface_free,
- _xre_font_surface_draw);
-   evas_common_font_draw(im, context, font, x, y, text);
-   evas_common_draw_context_font_ext_set(context,
- NULL,
- NULL,
- NULL,
- NULL);
-   evas_common_cpu_end_opt();
- }
+
+   _xr_render_surface_clips_set((Xrender_Surface *)surface, (RGBA_Draw_Context 
*)context, x, y, w, h);
+
+   im = (RGBA_Image *) evas_cache_image_data(evas_common_image_cache_get(),
+ ((Xrender_Surface *)surface)->w,
+ ((Xrender_Surface *)surface)->h,
+ surface,
+ 0, EVAS_COLORSPACE_ARGB);
+   evas_common_draw_context_font_ext_set(context,
+ re->xinf,
+ _xre_font_surface_new,
+ _xre_font_surface_free,
+ _xre_font_surface_draw);
+   evas_common_font_draw(im, context, font, x, y, text);
+   evas_common_draw_context_font_ext_set(context,
+ NULL,
+ NULL,
+ NULL,
+ NULL);
+   evas_common_cpu_end_opt();
+
+   evas_cache_image_drop(&im->cache_entry);
 }
 
 /* module advertising code */
===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/xrender_x11/evas_engine_font.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- evas_engine_font.c  7 Apr 2008 23:07:23 -   1.4
+++ evas_engine_font.c  12 Apr 2008 00:32:28

E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/loaders/eet


Modified Files:
evas_image_load_eet.c 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/modules/loaders/eet/evas_image_load_eet.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- evas_image_load_eet.c   14 Mar 2008 16:49:48 -  1.9
+++ evas_image_load_eet.c   12 Apr 2008 00:32:29 -  1.10
@@ -42,15 +42,8 @@
return 0;
  }
if (alpha) im->flags |= RGBA_IMAGE_HAS_ALPHA;
-   if (!im->image)
- im->image = evas_common_image_surface_new(im);
-   if (!im->image)
- {
-   eet_close(ef);
-   return 0;
- }
-   im->image->w = w;
-   im->image->h = h;
+   im->cache_entry.w = w;
+   im->cache_entry.h = h;
eet_close(ef);
return 1;
 }
@@ -65,7 +58,7 @@
DATA32   nas = 0;
 
if ((!file) || (!key)) return 0;
-   if ((im->image) && (im->image->data)) return 1;
+   if (im->image.data) return 1;
ef = eet_open((char *)file, EET_FILE_MODE_READ);
if (!ef) return 0;
body = eet_data_image_read(ef, (char *)key,
@@ -82,18 +75,10 @@
return 0;
  }
if (alpha) im->flags |= RGBA_IMAGE_HAS_ALPHA;
-   if (!im->image)
- im->image = evas_common_image_surface_new(im);
-   if (!im->image)
- {
-   free(body);
-   eet_close(ef);
-   return 0;
- }
-   im->image->w = w;
-   im->image->h = h;
-   im->image->data = body;
-   im->image->no_free = 0;
+   im->cache_entry.w = w;
+   im->cache_entry.h = h;
+   im->image.data = body;
+   im->image.no_free = 0;
if (alpha)
  {
end = body +(w * h);
@@ -111,7 +96,7 @@
 if (b > a) b = a;
 *p = ARGB_JOIN(a, r, g, b);
  }
-   if ((ALPHA_SPARSE_INV_FRACTION * nas) >= (im->image->w * im->image->h))
+   if ((ALPHA_SPARSE_INV_FRACTION * nas) >= (im->cache_entry.w * 
im->cache_entry.h))
  im->flags |= RGBA_IMAGE_ALPHA_SPARSE;
  }
 // result is already premultiplied now if u compile with edje   



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/loaders/edb


Modified Files:
evas_image_load_edb.c 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/modules/loaders/edb/evas_image_load_edb.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- evas_image_load_edb.c   5 Nov 2006 05:07:52 -   1.5
+++ evas_image_load_edb.c   12 Apr 2008 00:32:29 -  1.6
@@ -73,16 +73,8 @@
return 0;
  }
if (alpha) im->flags |= RGBA_IMAGE_HAS_ALPHA;
-   if (!im->image)
- im->image = evas_common_image_surface_new(im);
-   if (!im->image)
- {
-   free(ret);
-   e_db_close(db);
-   return 0;
- }
-   im->image->w = w;
-   im->image->h = h;
+   im->cache_entry.w = w;
+   im->cache_entry.h = h;
free(ret);
e_db_close(db);
return 1;
@@ -145,19 +137,9 @@
return 0;
  }
if (alpha) im->flags |= RGBA_IMAGE_HAS_ALPHA;
-   if (!im->image)
- im->image = evas_common_image_surface_new(im);
-   if (!im->image)
- {
-   free(ret);
-   e_db_close(db);
-   return 0;
- }
-   im->image->w = w;
-   im->image->h = h;
body = &(ret[8]);
-   evas_common_image_surface_alloc(im->image);
-   if (!im->image->data)
+   evas_cache_image_surface_alloc(&im->cache_entry, w, h);
+   if (!im->image.data)
  {
free(ret);
e_db_close(db);
@@ -169,11 +151,11 @@
  {
 int x;
 
-memcpy(im->image->data, body, w * h * sizeof(DATA32));
-for (x = 0; x < (w * h); x++) SWAP32(im->image->data[x]);
+memcpy(im->image.data, body, w * h * sizeof(DATA32));
+for (x = 0; x < (w * h); x++) SWAP32(im->image.data[x]);
  }
 #else
-   memcpy(im->image->data, body, w * h * sizeof(DATA32));
+   memcpy(im->image.data, body, w * h * sizeof(DATA32));
 #endif
  }
else
@@ -181,13 +163,13 @@
uLongf dlen;
 
dlen = w * h * sizeof(DATA32);
-   uncompress((Bytef *)im->image->data, &dlen, (Bytef *)body,
+   uncompress((Bytef *)im->image.data, &dlen, (Bytef *)body,
   (uLongf)(size - 32));
 #ifdef WORDS_BIGENDIAN
  {
 int x;
 
-for (x = 0; x < (w * h); x++) SWAP32(im->image->data[x]);
+for (x = 0; x < (w * h); x++) SWAP32(im->image.data[x]);
  }
 #endif
  }



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Modified Files:
evas_outbuf.c 


Log Message:


cedric's cache changes patch

===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_ddraw/evas_outbuf.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- evas_outbuf.c   8 Sep 2007 10:42:30 -   1.4
+++ evas_outbuf.c   12 Apr 2008 00:32:27 -  1.5
@@ -117,24 +117,23 @@
(buf->priv.mask.g == 0x00ff00) &&
(buf->priv.mask.b == 0xff))
  {
-im = evas_cache_image_empty(evas_common_image_cache_get());
-im->image->w = width;
-im->image->h = height;
-im->image->data = NULL;
-im->image->no_free = 1;
+im = (RGBA_Image*) 
evas_cache_image_empty(evas_common_image_cache_get());
+if (!im) return NULL;
+im = (RGBA_Image*) evas_cache_image_size_set(&im->cache_entry, width, 
height);
+if (!im) return NULL;
+im->image.no_free = 1;
 ddob = evas_software_ddraw_output_buffer_new(buf->priv.dd.depth,
  width,
  height,
  NULL);
 im->extended_info = ddob;
-im->image->data = (DATA32 
*)evas_software_ddraw_output_buffer_data(ddob, &bpl);
+im->image.data = (DATA32 
*)evas_software_ddraw_output_buffer_data(ddob, &bpl);
  }
else
  {
 im = evas_cache_image_empty(evas_common_image_cache_get());
-im->image->w = width;
-im->image->h = height;
-evas_common_image_surface_alloc(im->image);
+if (!im) return NULL;
+evas_cache_image_surface_alloc(&im->cache_entry, width, height);
 im->extended_info = ddob;
 if ((buf->rot == 0) || (buf->rot == 180))
   ddob = evas_software_ddraw_output_buffer_new(buf->priv.dd.depth,



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Modified Files:
evas_gl_common.h evas_gl_gradient.c evas_gl_image.c 
evas_gl_texture.c 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/gl_common/evas_gl_common.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- evas_gl_common.h25 Dec 2007 11:12:39 -  1.16
+++ evas_gl_common.h12 Apr 2008 00:32:26 -  1.17
@@ -21,7 +21,7 @@
 #include 
 
 #ifdef BUILD_ENGINE_GL_GLEW
-# include 
+#include 
 #endif /* BUILD_ENGINE_GL_GLEW */
 
 #include 
@@ -196,8 +196,8 @@
 void  evas_gl_common_ycbcr601pl_texture_update(Evas_GL_Texture 
*tex, unsigned char **rows, int w, int h, int smooth);
 
 Evas_GL_Image*evas_gl_common_image_load(Evas_GL_Context *gc, const char 
*file, const char *key, Evas_Image_Load_Opts *lo);
-Evas_GL_Image*evas_gl_common_image_new_from_data(Evas_GL_Context *gc, int 
w, int h, int *data, int alpha, int cspace);
-Evas_GL_Image*evas_gl_common_image_new_from_copied_data(Evas_GL_Context 
*gc, int w, int h, int *data, int alpha, int cspace);
+Evas_GL_Image*evas_gl_common_image_new_from_data(Evas_GL_Context *gc, int 
w, int h, DATA32 *data, int alpha, int cspace);
+Evas_GL_Image*evas_gl_common_image_new_from_copied_data(Evas_GL_Context 
*gc, int w, int h, DATA32 *data, int alpha, int cspace);
 Evas_GL_Image*evas_gl_common_image_new(Evas_GL_Context *gc, int w, int h, 
int alpha, int cspace);
 void  evas_gl_common_image_free(Evas_GL_Image *im);
 void  evas_gl_common_image_dirty(Evas_GL_Image *im);
===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/gl_common/evas_gl_gradient.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- evas_gl_gradient.c  4 Aug 2007 12:33:12 -   1.7
+++ evas_gl_gradient.c  12 Apr 2008 00:32:26 -  1.8
@@ -1,7 +1,5 @@
 #include "evas_gl_private.h"
 
-static void _evas_gl_common_gradient_texture_build(Evas_GL_Context *gc, 
Evas_GL_Gradient *gr);
-
 Evas_GL_Gradient *
 evas_gl_common_gradient_new(void)
 {
@@ -211,9 +209,10 @@
  {
RGBA_Image *im;
int op = dc->render_op, cuse = dc->clip.use;
-   
-   im = evas_common_image_create(w, h);
-   if (!im) return;
+
+   im = (RGBA_Image *) 
evas_cache_image_empty(evas_common_image_cache_get());
+if (!im) return;
+im = (RGBA_Image *) evas_cache_image_size_set(&im->cache_entry, w, h);
dc->render_op = _EVAS_RENDER_FILL;
dc->clip.use = 0;
evas_common_gradient_draw(im, dc, 0, 0, w, h, gr->grad);
@@ -221,8 +220,9 @@
  gr->tex = evas_gl_common_texture_new(gc, im, 0);
else
  evas_gl_common_texture_update(gr->tex, im, 0);
-   
-   evas_common_image_delete(im);
+
+   evas_cache_image_drop(&im->cache_entry);
+
dc->render_op = op;
dc->clip.use = cuse;
if (!gr->tex) return;
===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/gl_common/evas_gl_image.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- evas_gl_image.c 25 Dec 2007 11:12:39 -  1.10
+++ evas_gl_image.c 12 Apr 2008 00:32:26 -  1.11
@@ -3,9 +3,9 @@
 Evas_GL_Image *
 evas_gl_common_image_load(Evas_GL_Context *gc, const char *file, const char 
*key, Evas_Image_Load_Opts *lo)
 {
-   Evas_GL_Image *im;
-   RGBA_Image *im_im;
-   Evas_List *l;
+   Evas_GL_Image*im;
+   RGBA_Image   *im_im;
+   Evas_List*l;
 
im_im = evas_common_load_image_from_file(file, key, lo);
if (!im_im) return NULL;
@@ -15,7 +15,7 @@
im = l->data;
if (im->im == im_im)
  {
- evas_cache_image_drop(im_im);
+ evas_cache_image_drop(&im_im->cache_entry);
 gc->images = evas_list_remove_list(gc->images, l);
 gc->images = evas_list_prepend(gc->images, im);
 im->references++;
@@ -42,7 +42,7 @@
 }
 
 Evas_GL_Image *
-evas_gl_common_image_new_from_data(Evas_GL_Context *gc, int w, int h, int 
*data, int alpha, int cspace)
+evas_gl_common_image_new_from_data(Evas_GL_Context *gc, int w, int h, DATA32 
*data, int alpha, int cspace)
 {
Evas_GL_Image *im;
Evas_List *l;
@@ -50,9 +50,9 @@
for (l = gc->images; l; l = l->next)
  {
im = l->data;
-   if (((void *)(im->im->image->data) == (void *)data) &&
-   (im->im->image->w == w) &&
-   (im->im->image->h == h))
+   if (((void *)(im->im->image.data) == (void *)data) &&
+   (im->im->cache_entry.w == w) &&
+   (im->im->cache_entry.h == h))
  {
 gc->images = evas_list

E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Modified Files:
evas_engine.c evas_engine.h evas_x_buffer.c 


Log Message:


cedric's cache changes patch

===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16_x11/evas_engine.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- evas_engine.c   11 Oct 2007 14:43:05 -  1.6
+++ evas_engine.c   12 Apr 2008 00:32:27 -  1.7
@@ -2,7 +2,7 @@
 #include "evas_private.h"
 #include "evas_engine.h"
 #include "Evas_Engine_Software_16_X11.h"
-#include "evas_soft16.h"
+#include "evas_common_soft16.h"
 
 /* function tables - filled in later (func and parent func) */
 static Evas_Func func, pfunc;
@@ -65,13 +65,6 @@
 }
 
 static void
-_tmp_out_free(Soft16_Image *tmp_out)
-{
-   free(tmp_out->pixels);
-   free(tmp_out);
-}
-
-static void
 _tmp_out_alloc(Render_Engine *re)
 {
Tilebuf_Rect *r;
@@ -85,9 +78,9 @@
 
if (re->tmp_out)
  {
-   if ((re->tmp_out->w < w) || (re->tmp_out->h < h))
+   if ((re->tmp_out->cache_entry.w < w) || (re->tmp_out->cache_entry.h < 
h))
  {
-_tmp_out_free(re->tmp_out);
+ evas_cache_image_drop(&re->tmp_out->cache_entry);
 re->tmp_out = NULL;
  }
  }
@@ -96,14 +89,9 @@
  {
Soft16_Image *im;
 
-   im = calloc(1, sizeof(Soft16_Image));
-   im->w = w;
-   im->h = h;
-   im->stride = w + ((w % 4) ? (4 - (w % 4)) : 0);
-   im->have_alpha = 0;
-   im->references = 1;
-   im->free_pixels = 1;
-   im->pixels = malloc(h * im->stride * sizeof(DATA16));
+im = (Soft16_Image *) 
evas_cache_image_empty(evas_common_soft16_image_cache_get());
+im->flags.have_alpha = 0;
+evas_cache_image_surface_alloc(&im->cache_entry, w, h);
 
re->tmp_out = im;
  }
@@ -115,7 +103,7 @@
 {
Render_Engine *re;
Evas_Engine_Info_Software_16_X11 *info;
-   X_Output_Buffer *xob;
+/*X_Output_Buffer *xob; */
XGCValues gcv;

info = (Evas_Engine_Info_Software_16_X11 *)in;
@@ -144,7 +132,8 @@
evas_common_font_init();
evas_common_draw_init();
evas_common_tilebuf_init();
-   
+   evas_common_soft16_image_init();
+
/* render engine specific data */
re = calloc(1, sizeof(Render_Engine));
e->engine.data.output = re;
@@ -179,7 +168,7 @@
  evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE);
if (re->tmp_out)
  {
-_tmp_out_free(re->tmp_out);
+ evas_cache_image_drop(&re->tmp_out->cache_entry);
 re->tmp_out = NULL;
  }
  }
@@ -203,11 +192,12 @@
if (re->gc) XFreeGC(re->disp, re->gc);
if (re->tb) evas_common_tilebuf_free(re->tb);
if (re->rects) evas_common_tilebuf_free_render_rects(re->rects);
-   if (re->tmp_out) _tmp_out_free(re->tmp_out);
+   if (re->tmp_out) evas_cache_image_drop(&re->tmp_out->cache_entry);
free(re);
 
evas_common_font_shutdown();
evas_common_image_shutdown();
+   evas_common_soft16_image_shutdown();
 }
 
 static void
@@ -237,7 +227,7 @@
  }
if (re->tmp_out)
  {
-   _tmp_out_free(re->tmp_out);
+evas_cache_image_drop(&re->tmp_out->cache_entry);
re->tmp_out = NULL;
  }
 }
@@ -343,7 +333,7 @@
if (re->rot == 0)
  {
*cx = ux; *cy = uy; *cw = uw; *ch = uh;
-   return &re->shbuf->im;
+   return re->shbuf->im;
  }
else
  {
@@ -449,10 +439,10 @@
DATA16 *dp, *sp;
int y, x, d_dir;
 
-   d = &re->shbuf->im;
+   d = re->shbuf->im;
s = re->tmp_out;
 
-   if ((w < 1) || (h < 1) || (out_x >= d->w) || (out_y >= d->h))
+   if ((w < 1) || (h < 1) || (out_x >= d->cache_entry.w) || (out_y >= 
d->cache_entry.h))
  return;
 
if (re->rot == 90)
@@ -524,7 +514,7 @@
else return;
 
evas_software_x11_x_output_buffer_paste
- (re->shbuf, re->draw, re->gc, 0, 0, re->shbuf->im.w, re->shbuf->im.h, 1);
+ (re->shbuf, re->draw, re->gc, 0, 0, re->shbuf->im->cache_entry.w, 
re->shbuf->im->cache_entry.h, 1);
XSetClipMask(re->disp, re->gc, None);
 }
 
@@ -546,7 +536,7 @@
  }
if (re->tmp_out)
  {
-   _tmp_out_free(re->tmp_out);
+evas_cache_image_drop(&re->tmp_out->cache_entry);
re->tmp_out = NULL;
  }
 }
===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16_x11/evas_engine.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- evas_engine.h   29 Apr 2007 15:45:40 -  1.1
+++ evas_engine.h   12 Apr 2008 00:32:27 -  1.2
@@ -8,13 +8,13 @@
 #include 
 #include 
 
-#include "evas_soft16.h"
+#include "evas_common_soft16.h"
 
 typedef struct _X_Output_Buffer   X_Output_Buffer;
 
 struct _X_Output_Buff

E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Modified Files:
evas_outbuf.c 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_x11/evas_outbuf.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- evas_outbuf.c   9 Mar 2008 09:35:12 -   1.18
+++ evas_outbuf.c   12 Apr 2008 00:32:28 -  1.19
@@ -330,6 +330,7 @@
Outbuf_Region  *obr;
int bpl = 0;
int use_shm = 1;
+   int alpha;
 
if ((buf->onebuf) && (buf->priv.x.shm))
  {
@@ -360,7 +361,7 @@
  im = buf->priv.onebuf;
  for (yy = y; yy < (y + h); yy++)
{
-  memset(im->image->data + (im->image->w * yy) + x,
+  memset(im->image.data + (im->cache_entry.w * yy) + x,
  0, w * sizeof(DATA32));
}
   }
@@ -375,26 +376,26 @@
*cy = y;
*cw = w;
*ch = h;
-   
+
+alpha = ((buf->priv.x.mask) || (buf->priv.destination_alpha));
+
use_shm = buf->priv.x.shm;
if ((buf->rot == 0) &&
(buf->priv.mask.r == 0xff) &&
(buf->priv.mask.g == 0x00ff00) &&
(buf->priv.mask.b == 0xff))
  {
-im = evas_cache_image_empty(evas_common_image_cache_get());
-im->image->w = buf->w;
-im->image->h = buf->h;
-im->image->data = NULL;
-im->image->no_free = 1;
-im->extended_info = obr;
 obr->xob = evas_software_x11_x_output_buffer_new(buf->priv.x.disp,
  buf->priv.x.vis,
  buf->priv.x.depth,
  buf->w, buf->h,
  use_shm,
  NULL);
-im->image->data = (DATA32 *) 
evas_software_x11_x_output_buffer_data(obr->xob, &bpl);
+ im = (RGBA_Image *) 
evas_cache_image_data(evas_common_image_cache_get(),
+   buf->w, buf->h,
+   (DATA32 *) 
evas_software_x11_x_output_buffer_data(obr->xob, &bpl),
+   alpha, 
EVAS_COLORSPACE_ARGB);
+im->extended_info = obr;
 if (buf->priv.x.mask)
   obr->mxob = 
evas_software_x11_x_output_buffer_new(buf->priv.x.disp,
 
buf->priv.x.vis,
@@ -405,10 +406,9 @@
  }
else
  {
-im = evas_cache_image_empty(evas_common_image_cache_get());
-im->image->w = buf->w;
-im->image->h = buf->h;
-evas_common_image_surface_alloc(im->image);
+im = (RGBA_Image *) 
evas_cache_image_empty(evas_common_image_cache_get());
+ im->flags |= alpha ? RGBA_IMAGE_HAS_ALPHA : 0;
+ evas_cache_image_surface_alloc(&im->cache_entry, buf->w, buf->h);
 im->extended_info = obr;
 if ((buf->rot == 0) || (buf->rot == 180))
   obr->xob = 
evas_software_x11_x_output_buffer_new(buf->priv.x.disp,
@@ -431,22 +431,14 @@
 use_shm,
 NULL);
  }
-   if ((buf->priv.x.mask) || (buf->priv.destination_alpha))
- {
-im->flags |= RGBA_IMAGE_HAS_ALPHA;
-/* FIXME: faster memset! */
-memset(im->image->data, 0, w * h * sizeof(DATA32));
- }
-   buf->priv.onebuf = im;
+   if (alpha)
+  /* FIXME: faster memset! */
+  memset(im->image.data, 0, w * h * sizeof(DATA32));
+
+buf->priv.onebuf = im;
return im;
  }
-   
-   
-   
-   
-   
-   
-   
+
obr = calloc(1, sizeof(Outbuf_Region));
obr->x = x;
obr->y = y;
@@ -464,32 +456,30 @@
 //   use_shm = 0; /* 630 -> 1006 fps */
 //   if ((w * h) < (200 * 200)) use_shm = 0; /* 630 -> 962 fps */
 
+   alpha = ((buf->priv.x.mask) || (buf->priv.destination_alpha));
+
if ((buf->rot == 0) &&
(buf->priv.mask.r == 0xff) &&
(buf->priv.mask.g == 0x00ff00) &&
(buf->priv.mask.b == 0xff))
  {
-   im = evas_cache_image_empty(evas_common_image_cache_get());
-   im->image->w = w;
-   im->image->h = h;
-   im->image->data = NULL;
-   im->image->no_free = 1;
-   im->extended_info = obr;
obr->xob = _find_xob(buf->priv.x.disp,

E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Modified Files:
evas_engine.c 


Log Message:


cedric's cache changes patch

===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_generic/evas_engine.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- evas_engine.c   23 Jul 2007 14:22:57 -  1.20
+++ evas_engine.c   12 Apr 2008 00:32:28 -  1.21
@@ -336,7 +336,7 @@
 
if (!image) return 1;
im = image;
-   switch (im->cs.space)
+   switch (im->cache_entry.space)
  {
   case EVAS_COLORSPACE_ARGB:
if (im->flags & RGBA_IMAGE_HAS_ALPHA) return 1;
@@ -353,7 +353,7 @@
 
if (!image) return EVAS_COLORSPACE_ARGB;
im = image;
-   return im->cs.space;
+   return im->cache_entry.space;
 }
 
 static void *
@@ -363,12 +363,12 @@
 
if (!image) return NULL;
im = image;
-   if (im->cs.space != EVAS_COLORSPACE_ARGB)
+   if (im->cache_entry.space != EVAS_COLORSPACE_ARGB)
  {
im->flags &= ~RGBA_IMAGE_HAS_ALPHA;
return im;
  }
-   im = evas_cache_image_alone(im);
+   im = (RGBA_Image *) evas_cache_image_alone(&im->cache_entry);
evas_common_image_colorspace_dirty(im);
 
if (has_alpha)
@@ -415,41 +415,10 @@
 eng_image_colorspace_set(void *data, void *image, int cspace)
 {
RGBA_Image *im;
-   
+
if (!image) return;
im = image;
-   if (im->cs.space == cspace) return;
-   switch (cspace)
- {
-  case EVAS_COLORSPACE_ARGB:
-   if (im->cs.data)
- {
-if (!im->cs.no_free) free(im->cs.data);
-im->cs.data = NULL;
-im->cs.no_free = 0;
- }
-   break;
-  case EVAS_COLORSPACE_YCBCR422P601_PL:
-  case EVAS_COLORSPACE_YCBCR422P709_PL:
-   if (im->image->no_free)
- {
-im->image->data = NULL;
-im->image->no_free = 0;
-evas_common_image_surface_alloc(im->image);
- }
-   if (im->cs.data)
- {
-if (!im->cs.no_free) free(im->cs.data);
- }
-   im->cs.data = calloc(1, im->image->h * sizeof(unsigned char *) * 2);
-   im->cs.no_free = 0;
-   break;
-  default:
-   abort();
-   break;
- }
-   im->cs.space = cspace;
-   evas_common_image_colorspace_dirty(im);
+   evas_cache_image_colorspace(&im->cache_entry, cspace);
 }
 
 static void
@@ -494,8 +463,8 @@
RGBA_Image *im;
 
im = image;
-   if (w) *w = im->image->w;
-   if (h) *h = im->image->h;
+   if (w) *w = im->cache_entry.w;
+   if (h) *h = im->cache_entry.h;
 }
 
 static void *
@@ -513,7 +482,7 @@
RGBA_Image*  im = image;
 
if (!image) return NULL;
-   im = evas_cache_image_dirty(im, x, y, w, h);
+   im = (RGBA_Image *) evas_cache_image_dirty(&im->cache_entry, x, y, w, h);
return im;
 }
 
@@ -528,13 +497,13 @@
return NULL;
  }
im = image;
-   evas_common_load_image_data_from_file(im);
-   switch (im->cs.space)
+   evas_cache_image_load_data(&im->cache_entry);
+   switch (im->cache_entry.space)
  {
   case EVAS_COLORSPACE_ARGB:
if (to_write)
-  im = evas_cache_image_alone(im);
-   *image_data = im->image->data;
+  im = (RGBA_Image *) evas_cache_image_alone(&im->cache_entry);
+   *image_data = im->image.data;
break;
   case EVAS_COLORSPACE_YCBCR422P601_PL:
   case EVAS_COLORSPACE_YCBCR422P709_PL:
@@ -554,19 +523,19 @@
 
if (!image) return NULL;
im = image;
-   switch (im->cs.space)
+   switch (im->cache_entry.space)
  {
   case EVAS_COLORSPACE_ARGB:
-   if (image_data != im->image->data)
+   if (image_data != im->image.data)
  {
 int w, h;
 
-w = im->image->w;
-h = im->image->h;
-im2 = eng_image_new_from_data(data, w, h, image_data, 
+w = im->cache_entry.w;
+h = im->cache_entry.h;
+im2 = eng_image_new_from_data(data, w, h, image_data,
   eng_image_alpha_get(data, image),
   eng_image_colorspace_get(data, 
image));
- evas_cache_image_drop(im);
+ evas_cache_image_drop(&im->cache_entry);
 im = im2;
  }
break;
@@ -596,8 +565,8 @@
 
if (!image) return;
im = image;
-   if (im->cs.space == EVAS_COLORSPACE_ARGB)
- evas_common_load_image_data_from_file(im);
+   if (im->cache_entry.space == EVAS_COLORSPACE_ARGB)
+ evas_cache_image_load_data(&im->cache_entry);
evas_common_image_colorspace_normalize(im);
 #ifdef BUILD_PTHREAD
if (cpunum > 1)



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's 

E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/engines/common


Modified Files:
evas_blit_main.c evas_font_draw.c evas_gradient_main.c 
evas_image_data.c evas_image_load.c evas_image_main.c 
evas_line_main.c evas_pipe.c evas_polygon_main.c 
evas_rectangle_main.c evas_scale_sample.c evas_scale_smooth.c 
evas_scale_smooth_scaler.c evas_scale_smooth_scaler_down.c 
evas_scale_smooth_scaler_noscale.c 
evas_scale_smooth_scaler_up.c 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/lib/engines/common/evas_blit_main.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- evas_blit_main.c13 Sep 2007 14:35:01 -  1.8
+++ evas_blit_main.c12 Apr 2008 00:32:25 -  1.9
@@ -32,7 +32,7 @@
 
/* clip clip clip */
if (w <= 0) return;
-   if (src_x + w > src->image->w) w = src->image->w - src_x;
+   if (src_x + w > src->cache_entry.w) w = src->cache_entry.w - src_x;
if (w <= 0) return;
if (src_x < 0)
  {
@@ -43,7 +43,7 @@
if (w <= 0) return;
 
if (h <= 0) return;
-   if (src_y + h > src->image->h) h = src->image->h - src_y;
+   if (src_y + h > src->cache_entry.h) h = src->cache_entry.h - src_y;
if (h <= 0) return;
if (src_y < 0)
  {
@@ -54,7 +54,7 @@
if (h <= 0) return;
 
if (w <= 0) return;
-   if (dst_x + w > dst->image->w) w = dst->image->w - dst_x;
+   if (dst_x + w > dst->cache_entry.w) w = dst->cache_entry.w - dst_x;
if (w <= 0) return;
if (dst_x < 0)
  {
@@ -65,7 +65,7 @@
if (w <= 0) return;
 
if (h <= 0) return;
-   if (dst_y + h > dst->image->h) h = dst->image->h - dst_y;
+   if (dst_y + h > dst->cache_entry.h) h = dst->cache_entry.h - dst_y;
if (h <= 0) return;
if (dst_y < 0)
  {
@@ -78,13 +78,13 @@
if (dst == src)
  {
/* src after dst - go forward */
-   if (((src_y * src->image->w) + src_x) > ((dst_y * dst->image->w) + 
dst_x))
+   if (((src_y * src->cache_entry.w) + src_x) > ((dst_y * 
dst->cache_entry.w) + dst_x))
  {
 func = evas_common_draw_func_copy_get(w, 0);
 for (y = 0; y < h; y++)
   {
- src_ptr = src->image->data + ((y + src_y) * src->image->w) + 
src_x;
- dst_ptr = dst->image->data + ((y + dst_y) * dst->image->w) + 
dst_x;
+ src_ptr = src->image.data + ((y + src_y) * 
src->cache_entry.w) + src_x;
+ dst_ptr = dst->image.data + ((y + dst_y) * 
dst->cache_entry.w) + dst_x;
  func(src_ptr, dst_ptr, w);
   }
  }
@@ -94,8 +94,8 @@
 func = evas_common_draw_func_copy_get(w, 1);
 for (y = h - 1; y >= 0; y--)
   {
- src_ptr = src->image->data + ((y + src_y) * src->image->w) + 
src_x;
- dst_ptr = dst->image->data + ((y + dst_y) * dst->image->w) + 
dst_x;
+ src_ptr = src->image.data + ((y + src_y) * 
src->cache_entry.w) + src_x;
+ dst_ptr = dst->image.data + ((y + dst_y) * 
dst->cache_entry.w) + dst_x;
  func(src_ptr, dst_ptr, w);
   }
  }
@@ -105,8 +105,8 @@
func = evas_common_draw_func_copy_get(w, 0);
for (y = 0; y < h; y++)
  {
-src_ptr = src->image->data + ((y + src_y) * src->image->w) + src_x;
-dst_ptr = dst->image->data + ((y + dst_y) * dst->image->w) + dst_x;
+src_ptr = src->image.data + ((y + src_y) * src->cache_entry.w) + 
src_x;
+dst_ptr = dst->image.data + ((y + dst_y) * dst->cache_entry.w) + 
dst_x;
 func(src_ptr, dst_ptr, w);
  }
  }
===
RCS file: /cvs/e/e17/libs/evas/src/lib/engines/common/evas_font_draw.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -3 -r1.34 -r1.35
--- evas_font_draw.c26 Aug 2007 08:21:57 -  1.34
+++ evas_font_draw.c12 Apr 2008 00:32:25 -  1.35
@@ -146,9 +146,9 @@
 
fi = fn->fonts->data;

-   im = dst->image->data;
-   im_w = dst->image->w;
-   im_h = dst->image->h;
+   im = dst->image.data;
+   im_w = dst->cache_entry.w;
+   im_h = dst->cache_entry.h;
 
ext_x = 0; ext_y = 0; ext_w = im_w; ext_h = im_h;
if (dc->clip.use)
===
RCS file: /cvs/e/e17/libs/evas/src/lib/engines/common/evas_gradient_main.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- evas_gradient_main.c6 May 2007 11:29:37 -   1.15
+++ evas_gradient_main.c12 Apr 2008 00:32:25 -  1.16
@@ -432,7 +432,7 @@
float   angle;
int direct_copy = 0, buf_step = 0;
 
-   if (!dst || !dc || !gr || !dst || !dst->image || !dst->imag

E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Modified Files:
evas_outbuf.c 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_xcb/evas_outbuf.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- evas_outbuf.c   9 Mar 2008 13:21:15 -   1.19
+++ evas_outbuf.c   12 Apr 2008 00:32:28 -  1.20
@@ -508,24 +508,19 @@
(buf->priv.mask.g == 0x00ff00) &&
(buf->priv.mask.b == 0xff))
  {
-   im = evas_cache_image_empty(evas_common_image_cache_get());
-   im->image->w = w;
-   im->image->h = h;
-   im->image->data = NULL;
-   im->image->no_free = 1;
+   im = (RGBA_Image *) 
evas_cache_image_empty(evas_common_image_cache_get());
+if (!im) return NULL;
+im = (RGBA_Image *) evas_cache_image_size_set(&im->cache_entry, w, h);
+if (!im) return NULL;
+
im->extended_info = obr;
obr->xcbob = _find_xcbob(buf->priv.x.conn,
  buf->priv.x.depth,
  w, h,
  use_shm,
  NULL);
-/* obr->xcbob = evas_software_xcb_x_output_buffer_new(buf->priv.x.conn, */
-/*buf->priv.x.depth, */
-/*w, */
-/*h, */
-/*use_shm, */
-/*NULL); */
-   im->image->data = (DATA32 
*)evas_software_xcb_x_output_buffer_data(obr->xcbob, &bpl);
+im->image.no_free = 1;
+   im->image.data = (DATA32 
*)evas_software_xcb_x_output_buffer_data(obr->xcbob, &bpl);
if (buf->priv.x.mask)
  obr->mxcbob = _find_xcbob(buf->priv.x.conn,
 1, w, h,
@@ -541,9 +536,8 @@
else
  {
 im = evas_cache_image_empty(evas_common_image_cache_get());
-   im->image->w = w;
-   im->image->h = h;
-evas_common_image_surface_alloc(im->image);
+if (!im) return NULL;
+evas_cache_image_surface_alloc(&im->cache_entry, w, h);
im->extended_info = obr;
if ((buf->rot == 0) || (buf->rot == 180))
  obr->xcbob = _find_xcbob(buf->priv.x.conn,
@@ -585,7 +579,7 @@
  {
im->flags |= RGBA_IMAGE_HAS_ALPHA;
/* FIXME: faster memset! */
-   memset(im->image->data, 0, w * h * sizeof(DATA32));
+   memset(im->image.data, 0, w * h * sizeof(DATA32));
  }
buf->priv.pending_writes = evas_list_append(buf->priv.pending_writes, im);
return im;
@@ -832,7 +826,7 @@
if (!conv_func) return;
 
data = evas_software_xcb_x_output_buffer_data(obr->xcbob, &bpl);
-   src_data = update->image->data;
+   src_data = update->image.data;
if (buf->rot == 0)
  {
obr->x = x;



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Modified Files:
Makefile.am evas_engine.c 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_16/Makefile.am,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- Makefile.am 14 Mar 2008 16:49:48 -  1.11
+++ Makefile.am 12 Apr 2008 00:32:27 -  1.12
@@ -15,17 +15,7 @@
 
 pkg_LTLIBRARIES = module.la
 module_la_SOURCES  = \
-evas_engine.c \
-evas_soft16.h \
-evas_soft16_dither_mask.c \
-evas_soft16_main.c \
-evas_soft16_image_cache.c \
-evas_soft16_image_unscaled.c \
-evas_soft16_image_scaled_sampled.c \
-evas_soft16_font.c \
-evas_soft16_rectangle.c \
-evas_soft16_polygon.c \
-evas_soft16_line.c
+evas_engine.c
 
 module_la_LIBADD = $(top_builddir)/src/lib/libevas.la
 module_la_LDFLAGS = @create_shared_lib@ -module -avoid-version
@@ -35,17 +25,4 @@
 endif
 
 EXTRA_DIST = \
-evas_engine.c \
-evas_soft16.h \
-evas_soft16_dither_mask.c \
-evas_soft16_main.c \
-evas_soft16_image_cache.c \
-evas_soft16_image_unscaled.c \
-evas_soft16_image_scaled_sampled.c \
-evas_soft16_font.c \
-evas_soft16_rectangle.c \
-evas_soft16_polygon.c \
-evas_soft16_line.c \
-evas_soft16_scanline_fill.c \
-evas_soft16_scanline_blend.c
-
+evas_engine.c
===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_engine.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- evas_engine.c   26 Oct 2007 18:53:39 -  1.11
+++ evas_engine.c   12 Apr 2008 00:32:27 -  1.12
@@ -1,6 +1,6 @@
 #include "evas_common.h"
 #include "evas_private.h"
-#include "evas_soft16.h"
+#include "evas_common_soft16.h"
 
 /*
  *
@@ -330,7 +330,7 @@
 
if (!image) return 0;
im = image;
-   return im->have_alpha;
+   return im->flags.have_alpha;
 }
 
 static int
@@ -394,7 +394,7 @@
 static void *
 eng_image_load(void *data, const char *file, const char *key, int *error, 
Evas_Image_Load_Opts *lo)
 {
-   return soft16_image_load(file, key, error, lo);
+   return evas_cache_image_request(evas_common_soft16_image_cache_get(), file, 
key, lo, error);
 }
 
 static void *
@@ -406,7 +406,7 @@
cspace, __FUNCTION__, __FILE__, __LINE__);
return NULL;
  }
-   return soft16_image_new(w, h, -1, alpha, (DATA16 *)image_data, 0);
+   return evas_cache_image_data(evas_common_soft16_image_cache_get(), w, h, 
image_data, alpha, EVAS_COLORSPACE_RGB565_A5P);
 }
 
 static void *
@@ -418,13 +418,13 @@
cspace, __FUNCTION__, __FILE__, __LINE__);
return NULL;
  }
-   return soft16_image_new(w, h, -1, alpha, (DATA16 *)image_data, 1);
+   return evas_cache_image_copied_data(evas_common_soft16_image_cache_get(), 
w, h, image_data, alpha, EVAS_COLORSPACE_RGB565_A5P);
 }
 
 static void
 eng_image_free(void *data, void *image)
 {
-   soft16_image_free(image);
+   evas_cache_image_drop((Image_Entry *) image);
 }
 
 static void
@@ -436,8 +436,8 @@
if (h) *h = 0;
if (!image) return;
im = image;
-   if (w) *w = im->w;
-   if (h) *h = im->h;
+   if (w) *w = im->cache_entry.w;
+   if (h) *h = im->cache_entry.h;
 }
 
 static void *
@@ -446,10 +446,10 @@
if (!image) return NULL;
if ((w <= 0) || (h <= 0))
  {
-   soft16_image_free(image);
+evas_cache_image_drop((Image_Entry *) image);
return NULL;
  }
-   return soft16_image_size_set(image, w, h);
+   return evas_cache_image_size_set((Image_Entry *) image, w, h);
 }
 
 static void
@@ -483,27 +483,10 @@
  }
 
im = image;
-   soft16_image_load_data(im);
+   evas_cache_image_load_data(&im->cache_entry);
 
if (to_write)
- {
-   if (im->references > 1)
- {
-Soft16_Image *im_new;
-
-im_new = soft16_image_new(im->w, im->h, im->stride, im->have_alpha,
-  im->pixels, 1);
-if (!im_new)
-  {
- if (image_data) *image_data = NULL;
- return im;
-  }
-soft16_image_free(im);
-im = im_new;
- }
-   if (im->cache_key)
- soft16_image_cache_del(im);
- }
+ im = (Soft16_Image *) evas_cache_image_alone(&im->cache_entry);
 
if (image_data) *image_data = (DATA32 *) im->pixels;
 
@@ -520,17 +503,22 @@
old_im = image;
if ((DATA16 *)image_data == old_im->pixels) return old_im;
 
-   new_im = soft16_image_new(old_im->w, old_im->h, old_im->stride,
-old_im->have_alpha, (DATA16 *)image_data, 0);
-   soft16_image_free(old_im);
+   new_im = (Soft16_Image *) 
evas_cache_image_copied_data(evas_common_soft16_image_cache_get(), 
old_im->cache_entry.w, old_im->cache_entry.h, image_data, 
old_im->flags.have_al

E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Modified Files:
evas_engine.c evas_x_main.c 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/gl_x11/evas_engine.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -3 -r1.27 -r1.28
--- evas_engine.c   4 Aug 2007 07:04:45 -   1.27
+++ evas_engine.c   12 Apr 2008 00:32:26 -  1.28
@@ -1,12 +1,20 @@
+#ifdef HAVE_GL_GLEW_H
+# include 
+#else
+# include 
+#endif
+
+#include "evas_gl_common.h"
+
 #include 
 #include 
 #include 
-#include 
+
 #include "evas_common.h"
 #include "evas_private.h"
 #include "evas_engine.h"
 #include "Evas_Engine_GL_X11.h"
-#include "evas_gl_common.h"
+
 
 /* function tables - filled in later (func and parent func) */
 static Evas_Func func, pfunc;
@@ -15,9 +23,6 @@
 static Colormap eng_best_colormap_get(Display *disp, int screen);
 static int eng_best_depth_get(Display *disp, int screen);
 
-static void eng_font_hinting_set(void *data, void *font, int hinting);
-static int eng_font_hinting_can_hint(void *data, int hinting);
-
 typedef struct _Render_Engine Render_Engine;
 
 struct _Render_Engine
@@ -548,7 +553,7 @@
 {
Evas_GL_Image *im_new;
 
-   im_new = evas_gl_common_image_new_from_copied_data(im->gc, 
im->im->image->w, im->im->image->h, im->im->image->data,
+   im_new = evas_gl_common_image_new_from_copied_data(im->gc, 
im->im->cache_entry.w, im->im->cache_entry.h, im->im->image.data,
   
eng_image_alpha_get(data, image),
   
eng_image_colorspace_get(data, image));
if (!im_new) return im;
@@ -615,6 +620,7 @@
im = image;
/* FIXME: can move to gl_common */
if (im->cs.space == cspace) return;
+   evas_cache_image_colorspace(&im->im->cache_entry, cspace);
switch (cspace)
  {
   case EVAS_COLORSPACE_ARGB:
@@ -624,20 +630,16 @@
 im->cs.data = NULL;
 im->cs.no_free = 0;
  }
-   if (!im->im->image->no_free)
- evas_common_image_surface_alloc(im->im->image);
break;
   case EVAS_COLORSPACE_YCBCR422P601_PL:
   case EVAS_COLORSPACE_YCBCR422P709_PL:
-   evas_common_image_surface_dealloc(im->im->image);
-   im->im->image->data = NULL;
if (im->tex) evas_gl_common_texture_free(im->tex);
im->tex = NULL;
if (im->cs.data)
  {
 if (!im->cs.no_free) free(im->cs.data);
  }
-   im->cs.data = calloc(1, im->im->image->h * sizeof(unsigned char *) * 2);
+   im->cs.data = calloc(1, im->im->cache_entry.h * sizeof(unsigned char *) 
* 2);
im->cs.no_free = 0;
break;
   default:
@@ -712,8 +714,8 @@
*h = 0;
return;
  }
-   if (w) *w = ((Evas_GL_Image *)image)->im->image->w;
-   if (h) *h = ((Evas_GL_Image *)image)->im->image->h;
+   if (w) *w = ((Evas_GL_Image *)image)->im->cache_entry.w;
+   if (h) *h = ((Evas_GL_Image *)image)->im->cache_entry.h;
 }
 
 static void *
@@ -729,7 +731,7 @@
if ((eng_image_colorspace_get(data, image) == 
EVAS_COLORSPACE_YCBCR422P601_PL) ||
(eng_image_colorspace_get(data, image) == 
EVAS_COLORSPACE_YCBCR422P709_PL))
  w &= ~0x1;
-   if ((im_old) && (im_old->im->image->w == w) && (im_old->im->image->h == h))
+   if ((im_old) && (im_old->im->cache_entry.w == w) && 
(im_old->im->cache_entry.h == h))
  return image;
if (im_old)
  {
@@ -776,7 +778,7 @@
  }
im = image;
eng_window_use(re->win);
-   evas_common_load_image_data_from_file(im->im);
+   evas_cache_image_load_data(&im->im->cache_entry);
switch (im->cs.space)
  {
   case EVAS_COLORSPACE_ARGB:
@@ -786,7 +788,7 @@
   {
  Evas_GL_Image *im_new;
  
- im_new = evas_gl_common_image_new_from_copied_data(im->gc, 
im->im->image->w, im->im->image->h, im->im->image->data,
+ im_new = evas_gl_common_image_new_from_copied_data(im->gc, 
im->im->cache_entry.w, im->im->cache_entry.h, im->im->image.data,
 
eng_image_alpha_get(data, image),
 
eng_image_colorspace_get(data, image));
  if (!im_new)
@@ -800,7 +802,7 @@
 else
   evas_gl_common_image_dirty(im);
  }
-   *image_data = im->im->image->data;
+   *image_data = im->im->image.data;
break;
   case EVAS_COLORSPACE_YCBCR422P601_PL:
   case EVAS_COLORSPACE_YCBCR422P709_PL:
@@ -826,12 +828,12 @@
switch (im->cs.space)
  {
   case EVAS_COLORSPACE_ARGB:
-   if (image_data != im->im->image->data)
+   if (image_data != im->im->image.

E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Modified Files:
evas_engine.c evas_engine.h 


Log Message:


cedric's cache changes patch

===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16_ddraw/evas_engine.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- evas_engine.c   8 Oct 2007 19:03:03 -   1.1
+++ evas_engine.c   12 Apr 2008 00:32:27 -  1.2
@@ -2,7 +2,7 @@
 #include "evas_private.h"
 #include "evas_engine.h"
 #include "Evas_Engine_Software_16_DDraw.h"
-#include "evas_soft16.h"
+#include "evas_common_soft16.h"
 
 /* function tables - filled in later (func and parent func) */
 static Evas_Func func, pfunc;
@@ -144,6 +144,7 @@
evas_common_font_init();
evas_common_draw_init();
evas_common_tilebuf_init();
+evas_common_soft16_image_init();
 
/* render engine specific data */
re = calloc(1, sizeof(Render_Engine));
@@ -209,6 +210,7 @@
 
evas_common_font_shutdown();
evas_common_image_shutdown();
+   evas_common_soft16_image_shutdown();
 }
 
 static void
===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16_ddraw/evas_engine.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- evas_engine.h   30 Mar 2008 16:01:57 -  1.2
+++ evas_engine.h   12 Apr 2008 00:32:27 -  1.3
@@ -5,7 +5,7 @@
 #include 
 #include 
 
-#include "evas_soft16.h"
+#include "evas_common_soft16.h"
 
 typedef struct _DDraw_Output_Buffer   DDraw_Output_Buffer;
 



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Modified Files:
evas_engine.c 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/gl_glew/evas_engine.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- evas_engine.c   5 Aug 2007 07:22:44 -   1.1
+++ evas_engine.c   12 Apr 2008 00:32:26 -  1.2
@@ -572,6 +572,7 @@
im = image;
/* FIXME: can move to gl_common */
if (im->cs.space == cspace) return;
+   evas_cache_image_colorspace(&im->im.cache_entry, cspace);
switch (cspace)
  {
   case EVAS_COLORSPACE_ARGB:
@@ -581,13 +582,9 @@
 im->cs.data = NULL;
 im->cs.no_free = 0;
  }
-   if (!im->im->image->no_free)
- evas_common_image_surface_alloc(im->im->image);
break;
   case EVAS_COLORSPACE_YCBCR422P601_PL:
   case EVAS_COLORSPACE_YCBCR422P709_PL:
-   evas_common_image_surface_dealloc(im->im->image);
-   im->im->image->data = NULL;
if (im->tex) evas_gl_common_texture_free(im->tex);
im->tex = NULL;
if (im->cs.data)
@@ -844,14 +841,10 @@
static RGBA_Image *im = NULL;
 
if (!im)
- {
-im = evas_common_image_new();
-im->image = evas_common_image_surface_new(im);
-im->image->no_free = 1;
- }
-   im->image->w = re->window->width;
-   im->image->h = re->window->height;
-   im->image->data = NULL;
+  im = (RGBA_Image *) 
evas_cache_image_empty(evas_common_image_cache_get());
+if (!im) return ;
+evas_cache_image_surface_alloc(&im->cache_entry, re->window->width, 
re->window->height);
+
evas_common_draw_context_font_ext_set(context,
  re->window->gl_context,
  evas_gl_font_texture_new,



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Modified Files:
evas_outbuf.c 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/fb/evas_outbuf.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- evas_outbuf.c   16 Jul 2007 07:25:34 -  1.3
+++ evas_outbuf.c   12 Apr 2008 00:32:26 -  1.4
@@ -14,7 +14,7 @@
/* FIXME: impliment */
printf("destroying fb info.. not implemented WARNING. LEAK!\n");
if (buf->priv.back_buf)
- evas_common_image_delete(buf->priv.back_buf);
+ evas_cache_image_drop(&buf->priv.back_buf->cache_entry);
free(buf);
 }
 
@@ -182,7 +182,7 @@
  {
 DATA32 *src_data;
 
-src_data = buf->priv.back_buf->image->data + (y * buf->w) + x;
+src_data = buf->priv.back_buf->image.data + (y * buf->w) + x;
 if (buf->rot == 0 || buf->rot == 180)
   {
  conv_func(src_data, data,
@@ -216,12 +216,13 @@
RGBA_Image *im;
 
*cx = 0; *cy = 0; *cw = w; *ch = h;
-   im = evas_common_image_create(w, h);
+   im = (RGBA_Image *) 
evas_cache_image_empty(evas_common_image_cache_get());
+im->flags |= RGBA_IMAGE_HAS_ALPHA;
+im = (RGBA_Image *) evas_cache_image_size_set(&im->cache_entry, w, h);
 
 /* handle framebuffers with alpha channel */
 if (buf->priv.fb.fb->fb_var.transp.length > 0) {
-   im->flags |= RGBA_IMAGE_HAS_ALPHA;
-   memset(im->image->data, 0, w * h * sizeof(DATA32));
+   memset(im->image.data, 0, w * h * sizeof(DATA32));
 }
 return im;
  }
@@ -231,7 +232,7 @@
 void
 evas_fb_outbuf_fb_free_region_for_update(Outbuf *buf, RGBA_Image *update)
 {
-   if (update != buf->priv.back_buf) evas_common_image_delete(update);
+   if (update != buf->priv.back_buf) 
evas_cache_image_drop(&update->cache_entry);
 }
 
 void
@@ -304,7 +305,7 @@
  {
 DATA32 *src_data;
 
-src_data = update->image->data;
+src_data = update->image.data;
 if (buf->rot == 0 || buf->rot == 180)
   {
  conv_func(src_data, data,
@@ -333,7 +334,7 @@
  return;
if (buf->priv.back_buf)
  {
-   evas_common_image_delete(buf->priv.back_buf);
+   evas_cache_image_drop(&buf->priv.back_buf->cache_entry);
buf->priv.back_buf = NULL;
  }
if (buf->priv.fb.fb)
@@ -382,7 +383,7 @@
if (buf->priv.back_buf)
  {
if (have_backbuf) return;
-   evas_common_image_delete(buf->priv.back_buf);
+evas_cache_image_drop(&buf->priv.back_buf->cache_entry);
buf->priv.back_buf = NULL;
  }
else
@@ -392,7 +393,8 @@
  {
 if (buf->priv.fb.fb->fb_var.bits_per_pixel  < 24)
   {
- buf->priv.back_buf = evas_common_image_create(buf->w, buf->h);
+ buf->priv.back_buf = (RGBA_Image *) 
evas_cache_image_empty(evas_common_image_cache_get());
+  buf->priv.back_buf = (RGBA_Image *) 
evas_cache_image_size_set(&buf->priv.back_buf->cache_entry, buf->w, buf->h);
   }
  }
  }



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Modified Files:
evas_engine.h evas_outbuf.c 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/buffer/evas_engine.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- evas_engine.h   2 Apr 2006 07:47:31 -   1.3
+++ evas_engine.h   12 Apr 2008 00:32:26 -  1.4
@@ -19,15 +19,15 @@
 
 struct _Outbuf
 {
-   int w, h;
-   Outbuf_Depthdepth;
+   int   w, h;
+   Outbuf_Depth  depth;
 
-   void   *dest;
-   int dest_row_bytes;
+   void *dest;
+   int   dest_row_bytes;
 
-   int alpha_level;
-   DATA32  color_key;
-   charuse_color_key : 1;
+   int   alpha_level;
+   DATA32color_key;
+   char  use_color_key : 1;
 
struct {
   void * (*new_update_region) (int x, int y, int w, int h, int *row_bytes);
@@ -35,7 +35,7 @@
} func;
 
struct {
-  RGBA_Image  *back_buf;
+  RGBA_Image*back_buf;
} priv;
 };
 
===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/buffer/evas_outbuf.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- evas_outbuf.c   20 Jan 2008 04:15:31 -  1.12
+++ evas_outbuf.c   12 Apr 2008 00:32:26 -  1.13
@@ -12,7 +12,7 @@
 {
if (buf->priv.back_buf)
  {
-   evas_common_image_delete(buf->priv.back_buf);
+evas_cache_image_drop(&buf->priv.back_buf->cache_entry);
  }
free(buf);
 }
@@ -48,29 +48,25 @@
if ((buf->depth == OUTBUF_DEPTH_RGB_24BPP_888_888) ||
(buf->depth == OUTBUF_DEPTH_BGR_24BPP_888_888))
  bpp = 3;
+
if ((buf->depth == OUTBUF_DEPTH_ARGB_32BPP__) &&
(buf->dest) && (buf->dest_row_bytes == (buf->w * sizeof(DATA32
  {
for (y = 0; y < h; y++)
  memset(((unsigned char *)(buf->dest)) + (y * buf->dest_row_bytes), 
 0, w * bpp);
-   buf->priv.back_buf = evas_common_image_new();
-   buf->priv.back_buf->image = 
evas_common_image_surface_new(buf->priv.back_buf);
-   buf->priv.back_buf->image->w = w;
-   buf->priv.back_buf->image->h = h;
-   buf->priv.back_buf->image->data = buf->dest;
-   buf->priv.back_buf->image->no_free = 1;
-   buf->priv.back_buf->flags |= RGBA_IMAGE_HAS_ALPHA;
+   buf->priv.back_buf = (RGBA_Image *) 
evas_cache_image_data(evas_common_image_cache_get(),
+  w, h,
+  buf->dest,
+  1, 
EVAS_COLORSPACE_ARGB);
  }
else if ((buf->depth == OUTBUF_DEPTH_RGB_32BPP_888_) &&
(buf->dest) && (buf->dest_row_bytes == (buf->w * sizeof(DATA32
  {
-   buf->priv.back_buf = evas_common_image_new();
-   buf->priv.back_buf->image = 
evas_common_image_surface_new(buf->priv.back_buf);
-   buf->priv.back_buf->image->w = w;
-   buf->priv.back_buf->image->h = h;
-   buf->priv.back_buf->image->data = buf->dest;
-   buf->priv.back_buf->image->no_free = 1;
+buf->priv.back_buf = (RGBA_Image *) 
evas_cache_image_data(evas_common_image_cache_get(),
+  w, h,
+  buf->dest,
+  0, 
EVAS_COLORSPACE_ARGB);
  }
 
return buf;
@@ -88,13 +84,13 @@
if (buf->priv.back_buf->flags & RGBA_IMAGE_HAS_ALPHA)
  {
 int  ww = w;
-ptr = buf->priv.back_buf->image->data + (y * 
buf->priv.back_buf->image->w) + x;
+ptr = buf->priv.back_buf->image.data + (y * 
buf->priv.back_buf->cache_entry.w) + x;
 while (h--)
   {
  while (w--)
*ptr++ = 0;
  w = ww;
- ptr += (buf->priv.back_buf->image->w - w);
+ ptr += (buf->priv.back_buf->cache_entry.w - w);
   }
  }
return buf->priv.back_buf;
@@ -102,16 +98,20 @@
else
  {
*cx = 0; *cy = 0; *cw = w; *ch = h;
-   im = evas_common_image_create(w, h);
-   if (im)
- {
+   im = (RGBA_Image *) 
evas_cache_image_empty(evas_common_image_cache_get());
+if (im)
+  {
 if (((buf->depth == OUTBUF_DEPTH_ARGB_32BPP__)) ||
 ((buf->depth == OUTBUF_DEPTH_BGRA_32BPP__)))
  

E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Modified Files:
Makefile.am 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/Makefile.am,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- Makefile.am 8 Oct 2007 19:03:50 -   1.15
+++ Makefile.am 12 Apr 2008 00:32:26 -  1.16
@@ -22,4 +22,6 @@
 software_16 \
 software_16_x11 \
 direct3d \
-software_16_ddraw
+software_16_ddraw \
+software_16_sdl
+



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Modified Files:
evas_outbuf.c 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/direct3d/evas_outbuf.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- evas_outbuf.c   17 Aug 2007 09:12:22 -  1.1
+++ evas_outbuf.c   12 Apr 2008 00:32:26 -  1.2
@@ -133,10 +133,8 @@
  }
else
  {
-im = evas_cache_image_empty(evas_common_image_cache_get());
-im->image->w = width;
-im->image->h = height;
-evas_common_image_surface_alloc(im->image);
+im = (RGBA_Image*) 
evas_cache_image_empty(evas_common_image_cache_get());
+evas_cache_image_surface_alloc(&im->cache_entry, width, height);
 im->extended_info = d3dob;
 if ((buf->rot == 0) || (buf->rot == 180))
   d3dob = evas_direct3d_output_buffer_new(buf->priv.d3d.depth,



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Modified Files:
evas_cache_engine_image.c evas_cache_image.c 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/lib/cache/evas_cache_engine_image.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- evas_cache_engine_image.c   14 Mar 2008 16:49:47 -  1.5
+++ evas_cache_engine_image.c   12 Apr 2008 00:32:25 -  1.6
@@ -3,6 +3,144 @@
 #include "evas_common.h"
 #include "evas_private.h"
 
+static void
+_evas_cache_engine_image_make_dirty(Evas_Cache_Engine_Image *cache,
+Engine_Image_Entry *eim)
+{
+   eim->flags.cached = 1;
+   eim->flags.dirty = 1;
+   eim->flags.loaded = 1;
+   eim->flags.activ = 0;
+   cache->dirty = evas_object_list_prepend(cache->dirty, eim);
+}
+
+static void
+_evas_cache_engine_image_make_active(Evas_Cache_Engine_Image *cache,
+ Engine_Image_Entry *eim,
+ const char *key)
+{
+   eim->flags.cached = 1;
+   eim->flags.activ = 1;
+   eim->flags.dirty = 0;
+   cache->activ = evas_hash_add(cache->activ, key, eim);
+}
+
+static void
+_evas_cache_engine_image_make_inactive(Evas_Cache_Engine_Image *cache,
+   Engine_Image_Entry *eim,
+   const char *key)
+{
+   eim->flags.cached = 1;
+   eim->flags.dirty = 0;
+   eim->flags.activ = 0;
+   cache->inactiv = evas_hash_add(cache->inactiv, key, eim);
+   cache->lru = evas_object_list_prepend(cache->lru, eim);
+   cache->usage += cache->func.mem_size_get(eim);
+}
+
+static void
+_evas_cache_engine_image_remove_activ(Evas_Cache_Engine_Image *cache,
+  Engine_Image_Entry *eim)
+{
+   if (eim->flags.cached)
+ {
+if (eim->flags.dirty)
+  {
+ cache->dirty = evas_object_list_remove(cache->dirty, eim);
+  }
+else
+  if (eim->flags.activ)
+{
+   cache->activ = evas_hash_del(cache->activ, eim->cache_key, eim);
+}
+  else
+{
+   cache->usage -= cache->func.mem_size_get(eim);
+   cache->inactiv = evas_hash_del(cache->inactiv, eim->cache_key, 
eim);
+   cache->lru = evas_object_list_remove(cache->lru, eim);
+}
+eim->flags.cached = 0;
+eim->flags.dirty = 0;
+eim->flags.activ = 0;
+ }
+}
+
+static Engine_Image_Entry *
+_evas_cache_engine_image_alloc(Evas_Cache_Engine_Image *cache,
+   Image_Entry *ie,
+   const char *hkey)
+{
+   Engine_Image_Entry   *eim;
+
+   assert(cache);
+
+   if (cache->func.alloc)
+ eim = cache->func.alloc();
+   else
+ eim = malloc(sizeof (Engine_Image_Entry));
+
+   if (!eim) goto on_error;
+   memset(eim, 0, sizeof (Engine_Image_Entry));
+
+   eim->cache = cache;
+   if (ie)
+ {
+eim->w = ie->w;
+eim->h = ie->h;
+eim->src = ie;
+eim->flags.need_parent = 1;
+ }
+   else
+ {
+eim->w = -1;
+eim->h = -1;
+eim->flags.need_parent = 0;
+eim->src = NULL;
+ }
+
+   eim->flags.cached = 0;
+   eim->references = 0;
+   eim->cache_key = hkey;
+
+   if (hkey)
+ _evas_cache_engine_image_make_active(cache, eim, hkey);
+   else
+ _evas_cache_engine_image_make_dirty(cache, eim);
+
+   return eim;
+
+ on_error:
+   if (eim)
+ evas_cache_engine_image_drop(eim);
+   evas_stringshare_del(hkey);
+   evas_cache_image_drop(ie);
+   return NULL;
+}
+
+static void
+_evas_cache_engine_image_dealloc(Evas_Cache_Engine_Image *cache, 
Engine_Image_Entry *eim)
+{
+   Image_Entry   *im;
+
+   if (cache->func.debug) cache->func.debug("delete", eim);
+
+   _evas_cache_engine_image_remove_activ(cache, eim);
+
+   im = eim->src;
+   cache->func.destructor(eim);
+   if (im) evas_cache_image_drop(im);
+
+   if (cache->func.delete)
+ {
+cache->func.delete(eim);
+ }
+   else
+ {
+memset(eim, 0, sizeof (Engine_Image_Entry));
+free(eim);
+ }
+}
+
 EAPI int
 evas_cache_engine_image_usage_get(Evas_Cache_Engine_Image *cache)
 {
@@ -42,11 +180,57 @@
new->usage = 0;
 
new->dirty = NULL;
+   new->lru = NULL;
new->activ = NULL;
+   new->inactiv = NULL;
 
new->parent = parent;
parent->references++;
 
+   new->brother = NULL;
+
+   return new;
+}
+
+EAPI Evas_Cache_Engine_Image *
+evas_cache_engine_image_dup(const Evas_Cache_Engine_Image_Func *cb, 
Evas_Cache_Engine_Image *brother)
+{
+   Evas_Cache_Engine_Image *new;
+
+   new = malloc(sizeof (Evas_Cache_Engine_Image));
+   if (!new)
+ return NULL;
+
+   new->func = brother->func;
+
+#define ORD(Func) if (cb->Func) new->func.Func = cb->Func;
+
+   ORD(key)

E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Modified Files:
evas_imaging.c 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/lib/imaging/evas_imaging.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- evas_imaging.c  14 Mar 2008 16:49:47 -  1.13
+++ evas_imaging.c  12 Apr 2008 00:32:25 -  1.14
@@ -24,7 +24,7 @@
im = calloc(1, sizeof(Evas_Imaging_Image));
if (!im)
  {
-evas_cache_image_drop(image);
+evas_cache_image_drop(&image->cache_entry);
return NULL;
  }
im->image = image;
@@ -35,7 +35,7 @@
 evas_imaging_image_free(Evas_Imaging_Image *im)
 {
if (!im) return;
-   evas_cache_image_drop(im->image);
+   evas_cache_image_drop(&im->image->cache_entry);
free(im);
 }
 
@@ -43,8 +43,8 @@
 evas_imaging_image_size_get(const Evas_Imaging_Image *im, int *w, int *h)
 {
if (!im) return;
-   if (w) *w = im->image->image->w;
-   if (h) *h = im->image->image->h;
+   if (w) *w = im->image->cache_entry.w;
+   if (h) *h = im->image->cache_entry.h;
 }
 
 EAPI Evas_Bool



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Modified Files:
Makefile.am evas_common.h 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/lib/include/Makefile.am,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- Makefile.am 4 Nov 2007 09:21:45 -   1.14
+++ Makefile.am 12 Apr 2008 00:32:25 -  1.15
@@ -7,4 +7,5 @@
 evas_macros.h \
 evas_mmx.h \
 evas_common.h \
+evas_common_soft16.h \
 evas_blend_ops.h
===
RCS file: /cvs/e/e17/libs/evas/src/lib/include/evas_common.h,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -3 -r1.94 -r1.95
--- evas_common.h   14 Mar 2008 16:49:48 -  1.94
+++ evas_common.h   12 Apr 2008 00:32:25 -  1.95
@@ -134,13 +134,14 @@
 
 typedef struct _Evas_Hash_ElEvas_Hash_El;
 
+typedef struct _Image_Entry Image_Entry;
+typedef struct _Engine_Image_Entry  Engine_Image_Entry;
+
 typedef struct _RGBA_Image_Loadopts   RGBA_Image_Loadopts;
 typedef struct _RGBA_Pipe_Op  RGBA_Pipe_Op;
 typedef struct _RGBA_Pipe RGBA_Pipe;
 typedef struct _RGBA_Pipe_Thread_Info RGBA_Pipe_Thread_Info;
 typedef struct _RGBA_ImageRGBA_Image;
-typedef struct _RGBA_Engine_Image RGBA_Engine_Image;
-typedef struct _RGBA_Surface  RGBA_Surface;
 typedef struct _RGBA_Image_Span   RGBA_Image_Span;
 typedef struct _RGBA_Draw_Context RGBA_Draw_Context;
 typedef struct _RGBA_Gradient RGBA_Gradient;
@@ -198,7 +199,8 @@
RGBA_IMAGE_ALPHA_ONLY= (1 << 3),
RGBA_IMAGE_ALPHA_TILES   = (1 << 4),
RGBA_IMAGE_ALPHA_SPARSE  = (1 << 5),
-   RGBA_IMAGE_LOADED= (1 << 6)
+   RGBA_IMAGE_LOADED= (1 << 6),
+   RGBA_IMAGE_NEED_DATA = (1 << 7)
 } RGBA_Image_Flags;
 
 typedef enum _Convert_Pal_Mode
@@ -258,6 +260,72 @@
void *data;
 };
 
+struct _RGBA_Image_Loadopts
+{
+   int  scale_down_by; // if > 1 then use this
+   double   dpi; // if > 0.0 use this
+   int  w, h; // if > 0 use this
+};
+
+struct _Image_Entry
+{
+  Evas_Object_List   _list_data;
+
+  Evas_Cache_Image  *cache;
+
+  const char*cache_key;
+
+  const char*file;
+  const char*key;
+
+  time_t timestamp;
+  time_t laststat;
+
+  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;
+  } flags;
+
+  intreferences;
+
+  unsigned char  scale;
+
+  RGBA_Image_Loadoptsload_opts;
+  intspace;
+  intw;
+  inth;
+};
+
+struct _Engine_Image_Entry
+{
+   Evas_Object_List  _list_data;
+
+   /* Upper Engine data. */
+   Image_Entry  *src;
+
+   /* Cache stuff. */
+   Evas_Cache_Engine_Image  *cache;
+   const char   *cache_key;
+
+   struct
+   {
+ unsigned intcached : 1;
+ unsigned intactiv : 1;
+ unsigned intdirty : 1;
+ unsigned intloaded : 1;
+ unsigned intneed_parent : 1;
+   } flags;
+
+   int   references;
+   int   w;
+   int   h;
+};
+
 struct _Cutout_Rect
 {
int   x, y, w, h;
@@ -302,14 +370,6 @@
unsigned char  anti_alias : 1;
 };
 
-struct _RGBA_Surface
-{
-   intw, h;
-   DATA32*data;
-   RGBA_Image*im;
-   char   no_free : 1;
-};
-
 struct _RGBA_Pipe_Op
 {
RGBA_Draw_Context context;
@@ -359,72 +419,39 @@
int x, y, w, h;
 };
 
-struct _RGBA_Image_Loadopts
-{
-   intscale_down_by; // if > 1 then use this
-   double dpi; // if > 0.0 use this
-   intw, h; // if > 0 use this
-};
-
 struct _RGBA_Image
 {
-   Evas_Object_List _list_data;
-   RGBA_Surface*image;
+   Image_Entry  cache_entry;
+
RGBA_Image_Flags flags;
struct
  {
void   *module;
void   *loader;
-   char   *file;
-   char   *real_file;
-   char   *key;
+/* char   *real_file; */
char   *comment;
 // int format;
  } info;
 
void*extended_info;
RGBA_Pipe   *pipe;
-   int  references;
-   RGBA_Image_Loadopts  load_opts;
-   unsigned charscale;
-
int  ref;
 
+/*unsigned charscale; */
+
/* Colorspace stuf

E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Modified Files:
Makefile.am 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/lib/engines/Makefile.am,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- Makefile.am 4 Nov 2007 09:21:45 -   1.8
+++ Makefile.am 12 Apr 2008 00:32:25 -  1.9
@@ -2,4 +2,4 @@
 MAINTAINERCLEANFILES = Makefile.in
 
 SUBDIRS = \
-common
+common common_16



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib


Modified Files:
Makefile.am 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/lib/Makefile.am,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -3 -r1.28 -r1.29
--- Makefile.am 14 Mar 2008 16:49:47 -  1.28
+++ Makefile.am 12 Apr 2008 00:32:25 -  1.29
@@ -30,6 +30,7 @@
  cache/libevas_cache.la \
  imaging/libevas_imaging.la \
  engines/common/libevas_engine_common.la \
+ engines/common_16/libevas_engine_common_16.la \
  -lm \
  @fnmatch_libs@ \
  @dlopen_libs@ \
@@ -45,7 +46,8 @@
  file/libevas_file.la \
  cache/libevas_cache.la \
  imaging/libevas_imaging.la \
- engines/common/libevas_engine_common.la
+ engines/common/libevas_engine_common.la \
+ engines/common_16/libevas_engine_common_16.la
 
 libevas_la_LDFLAGS  = @create_shared_lib@ -version-info @version_info@
 



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Modified Files:
evas_object_image.c 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_image.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -3 -r1.61 -r1.62
--- evas_object_image.c 8 Feb 2008 22:35:19 -   1.61
+++ evas_object_image.c 12 Apr 2008 00:32:25 -  1.62
@@ -1121,18 +1121,17 @@
 else break;
  }
  }
-   im = evas_cache_image_empty(evas_common_image_cache_get());
+   im = (RGBA_Image*) evas_cache_image_data(evas_common_image_cache_get(),
+o->cur.image.w,
+o->cur.image.h,
+data,
+o->cur.has_alpha,
+EVAS_COLORSPACE_ARGB);
if (im)
  {
-   if (o->cur.has_alpha) im->flags |= RGBA_IMAGE_HAS_ALPHA;
-
-im->image->data = data;
-im->image->w = o->cur.image.w;
-im->image->h = o->cur.image.h;
-im->image->no_free = 1;
 ok = evas_common_save_image_to_file(im, file, key, quality, compress);
 
-   evas_cache_image_drop(im);
+   evas_cache_image_drop(&im->cache_entry);
  }
return ok;
 }
@@ -2332,7 +2331,7 @@
 evas_object_image_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
 {
Evas_Object_Image *o;
-   void *data;
+   DATA32 *data;
int w, h, stride;
int a;
 
@@ -2354,7 +2353,7 @@
o->engine_data = 
obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output,
  
o->engine_data,
  0,
- (DATA32**) 
&data);
+ &data);
if (!data)
  return 0;
 
@@ -2365,8 +2364,8 @@
  a = (*((DATA32*)(data)) >> 24) & 0xff;
  break;
case EVAS_COLORSPACE_RGB565_A5P:
- data = ((DATA16*)(data) + (h * stride));
- data = ((DATA8*)(data) + ((y * stride) + x));
+   data = (void*) ((DATA16*)(data) + (h * stride));
+ data = (void*) ((DATA8*)(data) + ((y * stride) + x));
  a = (*((DATA8*)(data))) & 0x1f;
  break;
default:



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir : e17/libs/evas


Modified Files:
configure.in 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/configure.in,v
retrieving revision 1.252
retrieving revision 1.253
diff -u -3 -r1.252 -r1.253
--- configure.in11 Apr 2008 23:41:44 -  1.252
+++ configure.in12 Apr 2008 00:32:24 -  1.253
@@ -335,14 +335,6 @@
 fi
 AM_CONDITIONAL(BUILD_ENGINE_SOFTWARE_16_X11, test 
"x$have_evas_software_16_x11" = "xyes")
 
-### if software 16 x11 is enabled - build software_16 (the generic 16bit
-### engine). later enable it fb_16 or other "16" bit engines are enabled.
-have_evas_software_16="no"
-if test "x$have_evas_software_16_x11" = "xyes" -o 
"x$have_evas_software_16_ddraw" = "xyes"; then
-   have_evas_software_16="yes"
-fi
-AM_CONDITIONAL(BUILD_ENGINE_SOFTWARE_16, test "x$have_evas_software_16" = 
"xyes")
-
 ###
 ## Check if we should build the software_xcb engine
 want_evas_software_xcb="no";
@@ -428,6 +420,19 @@
 fi
 AM_CONDITIONAL(BUILD_ENGINE_SDL, test "x$have_evas_sdl" = "xyes")
 
+## Check if we want to use some SDL primitive
+sdl_primitive="no";
+
+AC_ARG_ENABLE(sdl-primitive,
+  AC_HELP_STRING([--enable-sdl-primitive], []),
+  [ sdl_primitive=$enableval ]
+)
+AC_MSG_RESULT($sdl_primitive)
+
+if test "x$sdl_primitive" = "xyes"; then
+  AC_DEFINE(ENGINE_SDL_PRIMITIVE, 1, [Use SDL primitive when possible])
+fi
+
 ###
 ## Check if we should build the fb engine
 want_evas_fb="no";
@@ -1518,6 +1523,20 @@
   )
 fi
 
+### if software 16 x11 is enabled - build software_16 (the generic 16bit
+### engine). later enable it fb_16 or other "16" bit engines are enabled.
+have_evas_software_16="no"
+if test "x$have_evas_software_16_x11" = "xyes"; then
+   have_evas_software_16="yes"
+fi
+if test "x$have_evas_sdl" = "xyes"; then
+   have_evas_software_16="yes"
+fi
+if test "x$have_evas_software_16_ddraw" = "xyes"; then
+   have_evas_software_16="yes"
+fi
+AM_CONDITIONAL(BUILD_ENGINE_SOFTWARE_16, test "x$have_evas_software_16" = 
"xyes")
+
 #
 ## Fill in flags
 
@@ -1591,6 +1610,7 @@
 src/lib/engines/common/evas_op_mask/Makefile
 src/lib/engines/common/evas_op_mul/Makefile
 src/lib/engines/common/evas_op_sub/Makefile
+src/lib/engines/common_16/Makefile
 src/modules/Makefile
 src/modules/engines/Makefile
 src/modules/engines/software_generic/Makefile
@@ -1615,6 +1635,7 @@
 src/modules/engines/software_16/Makefile
 src/modules/engines/software_16_x11/Makefile
 src/modules/engines/software_16_ddraw/Makefile
+src/modules/engines/software_16_sdl/Makefile
 src/modules/loaders/Makefile
 src/modules/loaders/edb/Makefile
 src/modules/loaders/eet/Makefile
@@ -1657,15 +1678,17 @@
 echo "  Software Qtopia: $have_evas_qtopia"
 echo "  Software Memory Buffer.: $have_evas_buffer"
 echo "  DirectFB...: $have_evas_directfb"
-echo "  Software SDL...: $have_evas_sdl"
+echo "  Software SDL...: $have_evas_sdl (primitive: 
$sdl_primitive)"
 echo "  OpenGL Glew: $have_evas_gl_glew"
 echo "  OpenGL X11.: $have_evas_gl_x11"
 echo "  Cairo X11..: $have_evas_cairo_x11"
 echo "  XRender X11: $have_evas_xrender_x11"
 echo "  XRender XCB: $have_evas_xrender_xcb"
 echo "  Glitz X11..: $have_evas_glitz_x11"
+echo "  Software 16bit : $have_evas_software_16"
 echo "  Software 16bit X11.: $have_evas_software_16_x11"
 echo "  Software 16bit Directdraw..: $have_evas_software_16_ddraw"
+echo "  Software 16bit SDL.: $have_evas_sdl (primitive: 
$sdl_primitive)"
 # FIXME: opengl engine needs to be fixed and tested lots for all drivers
 # FIXME: xrender engine to be written
 echo



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/savers/tiff


Modified Files:
evas_image_save_tiff.c 


Log Message:


cedric's cache changes patch

===
RCS file: /cvs/e/e17/libs/evas/src/modules/savers/tiff/evas_image_save_tiff.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- evas_image_save_tiff.c  28 Dec 2006 12:48:20 -  1.6
+++ evas_image_save_tiff.c  12 Apr 2008 00:32:30 -  1.7
@@ -22,11 +22,11 @@
int i = 0;
int has_alpha;
 
-   if (!im || !im->image || !im->image->data || !file)
+   if (!im || !im->image.data || !file)
   return 0;
 
has_alpha = im->flags & RGBA_IMAGE_HAS_ALPHA;
-   data = im->image->data;
+   data = im->image.data;
 
tif = TIFFOpen(file, "w");
if (!tif)
@@ -35,8 +35,8 @@
/* None of the TIFFSetFields are checked for errors, but since they */
/* shouldn't fail, this shouldn't be a problem */
 
-   TIFFSetField(tif, TIFFTAG_IMAGELENGTH, im->image->h);
-   TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, im->image->w);
+   TIFFSetField(tif, TIFFTAG_IMAGELENGTH, im->cache_entry.h);
+   TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, im->cache_entry.w);
TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB);
TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
TIFFSetField(tif, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
@@ -67,12 +67,12 @@
 return 0;
  }
 
-   for (y = 0; y < im->image->h; y++)
+   for (y = 0; y < im->cache_entry.h; y++)
  {
 i = 0;
-for (x = 0; x < im->image->w; x++)
+for (x = 0; x < im->cache_entry.w; x++)
   {
- pixel = data[(y * im->image->w) + x];
+ pixel = data[(y * im->cache_entry.w) + x];
 
  r = (pixel >> 16) & 0xff;
  g = (pixel >> 8) & 0xff;



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir : e17/libs/evas


Added Files:
evas-fb.pc.in 


Log Message:


add fb.




-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: cedric raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : devs
Module  : cedric

Dir : devs/cedric




Log Message:
Directory /cvs/e/devs/cedric added to the repository




-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir : e17/libs/evas


Modified Files:
Makefile.am configure.in 


Log Message:


update pkgconfig checks for fb engine. - lars.

===
RCS file: /cvs/e/e17/libs/evas/Makefile.am,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -3 -r1.50 -r1.51
--- Makefile.am 18 Feb 2008 07:20:50 -  1.50
+++ Makefile.am 11 Apr 2008 23:41:44 -  1.51
@@ -10,7 +10,7 @@
   README \
   evas-cairo-x11.pc \
   evas-directfb.pc \
-  evas-framebuffer.pc \
+  evas-fb.pc \
   evas-glitz-x11.pc \
   evas-opengl-x11.pc \
   evas-opengl-glew.pc \
@@ -36,7 +36,7 @@
 evas.pc.in \
 evas-cairo-x11.pc \
 evas-directfb.pc \
-evas-framebuffer.pc \
+evas-fb.pc \
 evas-glitz-x11.pc \
 evas-opengl-x11.pc \
 evas-opengl-glew.pc \
@@ -72,7 +72,7 @@
 endif
 
 if BUILD_ENGINE_FB
-pframebuffer = evas-framebuffer.pc
+pfb = evas-fb.pc
 endif
 
 if BUILD_ENGINE_GLITZ_X11
@@ -125,7 +125,7 @@
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = \
-   evas.pc $(psoftwarex11) $(psoftwarexcb) $(pdirectfb) $(pframebuffer) \
+   evas.pc $(psoftwarex11) $(psoftwarexcb) $(pdirectfb) $(pfb) \
$(psoftwarebuffer) $(psoftwareqtopia) $(popenglx11) $(pcairox11) \
$(pxrenderx11) $(pxrenderxcb) $(pglitzx11) $(psoftwareddraw) 
$(psoftwaresdl) \
$(psoftware16x11) $(pdirect3d) $(psoftwared16draw) $(popenglglew)
===
RCS file: /cvs/e/e17/libs/evas/configure.in,v
retrieving revision 1.251
retrieving revision 1.252
diff -u -3 -r1.251 -r1.252
--- configure.in14 Mar 2008 16:49:47 -  1.251
+++ configure.in11 Apr 2008 23:41:44 -  1.252
@@ -1560,7 +1560,7 @@
 Makefile
 evas-cairo-x11.pc
 evas-directfb.pc
-evas-framebuffer.pc
+evas-fb.pc
 evas-glitz-x11.pc
 evas-opengl-glew.pc
 evas-opengl-x11.pc



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/ecore raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/ecore

Dir : e17/libs/ecore


Modified Files:
configure.in 


Log Message:


This patch add the possibility to delay a timer and to know the
pending time before the next wake up.

They should not affect any current code using the timer.

-- 
Cedric BAIL

===
RCS file: /cvs/e/e17/libs/ecore/configure.in,v
retrieving revision 1.253
retrieving revision 1.254
diff -u -3 -r1.253 -r1.254
--- configure.in28 Mar 2008 14:38:35 -  1.253
+++ configure.in11 Apr 2008 23:39:55 -  1.254
@@ -606,7 +606,7 @@
   AC_MSG_RESULT($want_ecore_evas_fb)
   
   if test "x$want_ecore_evas_fb" = "xyes"; then
-PKG_CHECK_MODULES(EVAS_FRAMEBUFFER, evas-framebuffer,
+PKG_CHECK_MODULES(EVAS_FB, evas-fb,
   [
 AC_DEFINE(BUILD_ECORE_EVAS_FB, 1, [Support for Linux FB in Ecore_Evas])
 have_ecore_evas_fb="yes"



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/ecore raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/ecore

Dir : e17/libs/ecore/src/lib/ecore


Modified Files:
ecore_timer.c 


Log Message:


This patch add the possibility to delay a timer and to know the
pending time before the next wake up.

They should not affect any current code using the timer.

-- 
Cedric BAIL

===
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore/ecore_timer.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- ecore_timer.c   9 Mar 2008 15:56:17 -   1.19
+++ ecore_timer.c   11 Apr 2008 23:39:55 -  1.20
@@ -97,7 +97,61 @@
 }
 
 /**
- * 
+ * Add some delay for the next occurence of a timer.
+ * This doesn't affect the interval of a timer.
+ *
+ * @param   timer The timer to change.
+ * @param   add   The dalay to add to the next iteration.
+ * @ingroup Ecore_Time_Group
+ */
+EAPI void
+ecore_timer_delay(Ecore_Timer *timer, double add)
+{
+   if (!ECORE_MAGIC_CHECK(timer, ECORE_MAGIC_TIMER))
+ {
+   ECORE_MAGIC_FAIL(timer, ECORE_MAGIC_TIMER,
+"ecore_timer_delay");
+   return;
+ }
+
+   if (timer->frozen)
+ {
+   timer->pending += add;
+ }
+   else
+ {
+   timers = _ecore_list2_remove(timers, timer);
+   _ecore_timer_set(timer, timer->at + add, timer->in, timer->func, 
timer->data);
+ }
+}
+
+/**
+ * Get the pending time regarding a timer.
+ *
+ * @param  timer The timer to learn from.
+ * @ingroupEcore_Time_Group
+ */
+EAPI double
+ecore_timer_pending_get(Ecore_Timer *timer)
+{
+   double  now;
+
+   if (!ECORE_MAGIC_CHECK(timer, ECORE_MAGIC_TIMER))
+ {
+   ECORE_MAGIC_FAIL(timer, ECORE_MAGIC_TIMER,
+"ecore_timer_pending_get");
+   return 0;
+ }
+
+   now = ecore_time_get();
+
+   if (timer->frozen)
+ return timer->pending;
+   return timer->at - now;
+}
+
+/**
+ *
  *
  */
 EAPI void



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/edje raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/edje

Dir : e17/libs/edje/data/include


Modified Files:
edje.inc 


Log Message:


santiago's embryo swallow patchs.

===
RCS file: /cvs/e/e17/libs/edje/data/include/edje.inc,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- edje.inc11 Aug 2007 13:20:33 -  1.23
+++ edje.inc11 Apr 2008 23:36:35 -  1.24
@@ -108,6 +108,7 @@
 native   stop_programs_on (part_id);
 native   set_min_size (Float:w, Float:h);
 native   set_max_size (Float:w, Float:h);
+native   part_swallow (part_id, GROUP:str[]);
 
 enum Msg_Type
 {



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/edje raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/edje

Dir : e17/libs/edje/src/lib


Modified Files:
edje_embryo.c 


Log Message:


santiago's embryo swallow patchs.

===
RCS file: /cvs/e/e17/libs/edje/src/lib/edje_embryo.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -3 -r1.59 -r1.60
--- edje_embryo.c   6 Mar 2008 17:52:58 -   1.59
+++ edje_embryo.c   11 Apr 2008 23:36:35 -  1.60
@@ -174,6 +174,7 @@
  * set_clip(part_id, clip_part_id)
  * get_clip(part_id)
  *
+ * part_swallow(part_id, group_name)
  *
  * ADD/DEL CUSTOM OBJECTS UNDER SOLE EMBRYO SCRIPT CONTROL
  *
@@ -2129,6 +2130,42 @@
return 0;
 }
 
+/* part_swallow(part_id, group_name) */
+static Embryo_Cell
+_edje_embryo_fn_part_swallow(Embryo_Program *ep, Embryo_Cell *params)
+{
+   int part_id = 0;
+   char* group_name = 0;
+   Edje *ed;
+   Edje_Real_Part *rp;
+   Evas_Object *new_obj;
+   
+   CHKPARAM(2);
+
+   part_id = params[1];
+   if (part_id < 0) return 0;
+
+   GETSTR(group_name, params[2]);
+   if (!group_name) return 0;
+
+   ed = embryo_program_data_get(ep);
+
+   rp = ed->table_parts[part_id % ed->table_parts_size];
+   if (!rp) return 0;
+
+   new_obj =  edje_object_add(ed->evas);
+   if (!new_obj) return 0;
+
+   if (!edje_object_file_set(new_obj, ed->file->path, group_name)) 
+ {
+evas_object_del(new_obj);
+return 0;
+ }
+   edje_object_part_swallow(ed->obj, rp->part->name, new_obj);
+
+   return 0;
+}
+
 void
 _edje_embryo_script_init(Edje *ed)
 {
@@ -2202,6 +2239,8 @@
embryo_program_native_call_add(ep, "custom_state", 
_edje_embryo_fn_custom_state);
embryo_program_native_call_add(ep, "set_state_val", 
_edje_embryo_fn_set_state_val);
embryo_program_native_call_add(ep, "get_state_val", 
_edje_embryo_fn_get_state_val);
+
+   embryo_program_native_call_add(ep, "part_swallow", 
_edje_embryo_fn_part_swallow);
 
 //   embryo_program_vm_push(ed->collection->script);
 //   _edje_embryo_globals_init(ed);



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/edje raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/edje

Dir : e17/libs/edje/src/bin


Modified Files:
edje_cc_out.c 


Log Message:


santiago's embryo swallow patchs.

===
RCS file: /cvs/e/e17/libs/edje/src/bin/edje_cc_out.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -3 -r1.59 -r1.60
--- edje_cc_out.c   25 Nov 2007 16:22:58 -  1.59
+++ edje_cc_out.c   11 Apr 2008 23:36:35 -  1.60
@@ -12,6 +12,7 @@
 
 typedef struct _Part_Lookup Part_Lookup;
 typedef struct _Program_Lookup Program_Lookup;
+typedef struct _Group_Lookup Group_Lookup;
 typedef struct _String_Lookup Image_Lookup;
 typedef struct _String_Lookup Spectrum_Lookup;
 typedef struct _Slave_Lookup Slave_Lookup;
@@ -31,6 +32,11 @@
int *dest;
 };
 
+struct _Group_Lookup
+{
+   char *name;
+};
+
 struct _String_Lookup
 {
char *name;
@@ -50,8 +56,8 @@
int   val;
 };
 
-static void data_queue_image_pc_lookup(Edje_Part_Collection *pc, char *name, 
int *dest);
-static void data_process_string(Edje_Part_Collection *pc, const char *prefix, 
char *s, void (*func)(Edje_Part_Collection *pc, char *name, int *val));
+static void data_queue_image_pc_lookup(Edje_Part_Collection *pc, char *name, 
char *ptr, int len);
+static void data_process_string(Edje_Part_Collection *pc, const char *prefix, 
char *s, void (*func)(Edje_Part_Collection *pc, char *name, char *ptr, int 
len));
 
 Edje_File *edje_file = NULL;
 Evas_List *edje_collections = NULL;
@@ -77,6 +83,7 @@
 
 static Evas_List *part_lookups = NULL;
 static Evas_List *program_lookups = NULL;
+static Evas_List *group_lookups = NULL;
 static Evas_List *image_lookups = NULL;
 static Evas_List *spectrum_lookups = NULL;
 static Evas_List *part_slave_lookups = NULL;
@@ -821,6 +828,16 @@
 }
 
 void
+data_queue_group_lookup(char *name)
+{
+   Group_Lookup *gl;
+
+   gl = mem_alloc(SZ(Group_Lookup));
+   group_lookups = evas_list_append(group_lookups, gl);
+   gl->name = mem_strdup(name);
+}
+
+void
 data_queue_part_lookup(Edje_Part_Collection *pc, char *name, int *dest)
 {
Part_Lookup *pl;
@@ -975,6 +992,31 @@
free(pl);
  }
 
+   while (group_lookups)
+ {
+Group_Lookup *gl;
+
+gl = group_lookups->data;
+for (l = edje_file->collection_dir->entries; l; l = l->next)
+  {
+ Edje_Part_Collection_Directory_Entry *de;
+ de = l->data;
+ if (!strcmp(de->entry, gl->name))
+   {
+  break;
+   }
+  }
+if (!l)
+  {
+ fprintf(stderr, "%s: Error. unable to find group name %s\n",
+ progname, gl->name);
+ exit(-1);
+  }
+group_lookups = evas_list_remove(group_lookups, gl);
+free(gl->name);
+free(gl);
+ }
+
while (image_lookups)
  {
Image_Lookup *il;
@@ -1069,7 +,7 @@
 }
 
 static void
-data_process_string(Edje_Part_Collection *pc, const char *prefix, char *s, 
void (*func)(Edje_Part_Collection *pc, char *name, int *val))
+data_process_string(Edje_Part_Collection *pc, const char *prefix, char *s, 
void (*func)(Edje_Part_Collection *pc, char *name, char* ptr, int len))
 {
char *p;
char *key;
@@ -1097,78 +1139,72 @@
  {
 if (!strncmp(p, key, keyl))
   {
- Code_Lookup *cl;
-
- cl = mem_alloc(SZ(Code_Lookup));
- if (cl)
+  char *ptr;
+  int len;
+  int inesc = 0;
+ char *name;
+
+  ptr = p;
+  p += keyl;
+ while ((*p))
{
-  int inesc = 0;
-  char *name;
-
-  cl->ptr = p;
-  p += keyl;
-  while ((*p))
-{
-   if (!inesc)
+  if (!inesc)
+{
+   if (*p == '\\') inesc = 1;
+   else if (*p == '\"')
  {
-if (*p == '\\') inesc = 1;
-else if (*p == '\"')
-{
-   /* string concatenation, see below */
-   if (*(p + 1) != '\"')
-  break;
-   else
-  p++;
-}
+/* string concatenation, see below */
+if (*(p + 1) != '\"')
+  break;
+else
+  p++;
  }
-   else
-   

E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib


Modified Files:
Evas.h 


Log Message:


gustavo's size hint patch.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/Evas.h,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -3 -r1.115 -r1.116
--- Evas.h  31 Mar 2008 21:38:37 -  1.115
+++ Evas.h  11 Apr 2008 23:12:19 -  1.116
@@ -51,7 +51,8 @@
EVAS_CALLBACK_RESIZE, /**< Resize Event */
EVAS_CALLBACK_RESTACK, /**< Restack Event */
EVAS_CALLBACK_DEL, /**< Object Being Deleted (called before Free) */
-   EVAS_CALLBACK_HOLD /**< Events go on/off hold */
+   EVAS_CALLBACK_HOLD, /**< Events go on/off hold */
+   EVAS_CALLBACK_CHANGED_SIZE_HINTS /**< Size hints changed event */
 } Evas_Callback_Type; /**< The type of event to trigger the callback */
 
 typedef enum _Evas_Button_Flags
@@ -699,6 +700,13 @@
EAPI void  evas_object_move  (Evas_Object *obj, 
Evas_Coord x, Evas_Coord y);
EAPI void  evas_object_resize(Evas_Object *obj, 
Evas_Coord w, Evas_Coord h);
EAPI void  evas_object_geometry_get  (const Evas_Object 
*obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
+
+   EAPI void  evas_object_size_hint_min_get (const Evas_Object 
*obj, Evas_Coord *w, Evas_Coord *h);
+   EAPI void  evas_object_size_hint_min_set (Evas_Object *obj, 
Evas_Coord w, Evas_Coord h);
+   EAPI void  evas_object_size_hint_max_get (const Evas_Object 
*obj, Evas_Coord *w, Evas_Coord *h);
+   EAPI void  evas_object_size_hint_max_set (Evas_Object *obj, 
Evas_Coord w, Evas_Coord h);
+   EAPI void  evas_object_size_hint_request_get (const Evas_Object 
*obj, Evas_Coord *w, Evas_Coord *h);
+   EAPI void  evas_object_size_hint_request_set (Evas_Object *obj, 
Evas_Coord w, Evas_Coord h);
 
EAPI void  evas_object_show  (Evas_Object *obj);
EAPI void  evas_object_hide  (Evas_Object *obj);



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Modified Files:
evas_object_inform.c evas_object_main.c 


Log Message:


gustavo's size hint patch.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_inform.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- evas_object_inform.c18 Jun 2005 01:00:29 -  1.3
+++ evas_object_inform.c11 Apr 2008 23:12:19 -  1.4
@@ -32,3 +32,9 @@
 {
evas_object_event_callback_call(obj, EVAS_CALLBACK_RESTACK, NULL);
 }
+
+void
+evas_object_inform_call_changed_size_hints(Evas_Object *obj)
+{
+   evas_object_event_callback_call(obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, 
NULL);
+}
===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_main.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -3 -r1.63 -r1.64
--- evas_object_main.c  8 Feb 2008 22:35:19 -   1.63
+++ evas_object_main.c  11 Apr 2008 23:12:19 -  1.64
@@ -671,6 +671,243 @@
 }
 
 /**
+ * @defgroup Evas_Object_Size_Hints_Group Generic Object Size Hints Functions
+ *
+ * Functions that deals with hints about object size.
+ */
+
+/**
+ * Retrieves the size hint for the minimum size.
+ *
+ * This is not a size enforcement in any way, it's just a hint that should
+ * be used whenever appropriate.
+ *
+ * Note that if any of @p w or @p h are @c NULL, the @c NULL
+ * parameters are ignored.
+ *
+ * @param obj The given evas object.
+ * @param   w Pointer to an integer in which to store the minimum width.
+ * @param   h Pointer to an integer in which to store the minimum height.
+ * @ingroup Evas_Object_Size_Hints_Group
+ */
+EAPI void
+evas_object_size_hint_min_get(const Evas_Object *obj, Evas_Coord *w, 
Evas_Coord *h)
+{
+   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+   if (w) *w = 0; if (h) *h = 0;
+   return;
+   MAGIC_CHECK_END();
+   if (obj->delete_me)
+ {
+   if (w) *w = 0; if (h) *h = 0;
+   return;
+ }
+   if (w) *w = obj->size_hints.min.w;
+   if (h) *h = obj->size_hints.min.h;
+}
+
+/**
+ * Sets the size hint for the minimum size.
+ *
+ * This is not a size enforcement in any way, it's just a hint that should
+ * be used whenever appropriate.
+ *
+ * @param obj The given evas object.
+ * @param   w Integer to use as the minimum width hint.
+ * @param   h Integer to use as the minimum height hint.
+ * @ingroup Evas_Object_Size_Hints_Group
+ */
+EAPI void
+evas_object_size_hint_min_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
+{
+   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+   return;
+   MAGIC_CHECK_END();
+   if (obj->delete_me)
+ return;
+
+   obj->size_hints.min.w = w;
+   obj->size_hints.min.h = h;
+
+   evas_object_inform_call_changed_size_hints(obj);
+}
+
+/**
+ * Retrieves the size hint for the maximum size.
+ *
+ * This is not a size enforcement in any way, it's just a hint that should
+ * be used whenever appropriate.
+ *
+ * Note that if any of @p w or @p h are @c NULL, the @c NULL
+ * parameters are ignored.
+ *
+ * @param obj The given evas object.
+ * @param   w Pointer to an integer in which to store the maximum width.
+ * @param   h Pointer to an integer in which to store the maximum height.
+ * @ingroup Evas_Object_Size_Hints_Group
+ */
+EAPI void
+evas_object_size_hint_max_get(const Evas_Object *obj, Evas_Coord *w, 
Evas_Coord *h)
+{
+   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+   if (w) *w = 0; if (h) *h = 0;
+   return;
+   MAGIC_CHECK_END();
+   if (obj->delete_me)
+ {
+   if (w) *w = 0; if (h) *h = 0;
+   return;
+ }
+   if (w) *w = obj->size_hints.max.w;
+   if (h) *h = obj->size_hints.max.h;
+}
+
+/**
+ * Sets the size hint for the maximum size.
+ *
+ * This is not a size enforcement in any way, it's just a hint that should
+ * be used whenever appropriate.
+ *
+ * @param obj The given evas object.
+ * @param   w Integer to use as the maximum width hint.
+ * @param   h Integer to use as the maximum height hint.
+ * @ingroup Evas_Object_Size_Hints_Group
+ */
+EAPI void
+evas_object_size_hint_max_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
+{
+   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+   return;
+   MAGIC_CHECK_END();
+   if (obj->delete_me)
+ return;
+
+   obj->size_hints.max.w = w;
+   obj->size_hints.max.h = h;
+
+   evas_object_inform_call_changed_size_hints(obj);
+}
+
+/**
+ * Retrieves the size request hint.
+ *
+ * This is not a size enforcement in any way, it's just a hint that should
+ * be used whenever appropriate.
+ *
+ * Note that if any of @p w or @p h are @c NULL, the @c NULL
+ * parameters are ignored.
+ *
+ * @param obj The given evas object.
+ * @param   w Pointer to an integer in which to store the requested width.
+ * @param   h Pointer to an integer in which to store the requested height.
+ * @ingroup Evas_Object_

E CVS: libs/evas raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Modified Files:
evas_private.h 


Log Message:


gustavo's size hint patch.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/include/evas_private.h,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -3 -r1.91 -r1.92
--- evas_private.h  21 Mar 2008 07:13:46 -  1.91
+++ evas_private.h  11 Apr 2008 23:12:20 -  1.92
@@ -81,6 +81,10 @@
 #define RENDER_METHOD_INVALID0x
 
 typedef struct _Evas_Layer  Evas_Layer;
+typedef struct _Evas_Size   Evas_Size;
+typedef enum _Evas_Aspect_Control   Evas_Aspect_Control;
+typedef struct _Evas_Aspect Evas_Aspect;
+typedef struct _Evas_Size_Hints Evas_Size_Hints;
 typedef struct _Evas_Font_Dir   Evas_Font_Dir;
 typedef struct _Evas_Font   Evas_Font;
 typedef struct _Evas_Font_Alias Evas_Font_Alias;
@@ -368,6 +372,32 @@
unsigned char delete_me : 1;
 };
 
+struct _Evas_Size
+{
+   Evas_Coord w, h;
+};
+
+enum _Evas_Aspect_Control
+{
+   EVAS_ASPECT_CONTROL_NONE = 0,
+   EVAS_ASPECT_CONTROL_NEITHER = 1,
+   EVAS_ASPECT_CONTROL_HORIZONTAL = 2,
+   EVAS_ASPECT_CONTROL_VERTICAL = 3,
+   EVAS_ASPECT_CONTROL_BOTH = 4
+};
+
+struct _Evas_Aspect
+{
+   Evas_Aspect_Control mode;
+   Evas_Size size;
+};
+
+struct _Evas_Size_Hints
+{
+   Evas_Size min, max, request;
+   Evas_Aspect aspect;
+};
+
 struct _Evas_Object
 {
Evas_Object_List  _list_data;
@@ -440,6 +470,8 @@
   unsigned char deletions_waiting : 1;
} smart;
 
+   Evas_Size_Hints  size_hints;
+
int last_mouse_down_counter;
int last_mouse_up_counter;
int mouse_grabbed;
@@ -727,6 +759,7 @@
 void evas_object_inform_call_move(Evas_Object *obj);
 void evas_object_inform_call_resize(Evas_Object *obj);
 void evas_object_inform_call_restack(Evas_Object *obj);
+void evas_object_inform_call_changed_size_hints(Evas_Object *obj);
 void evas_object_intercept_cleanup(Evas_Object *obj);
 int evas_object_intercept_call_show(Evas_Object *obj);
 int evas_object_intercept_call_hide(Evas_Object *obj);



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: apps/e raster

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir : e17/apps/e/src/modules/conf_wallpaper


Modified Files:
e_int_config_wallpaper_web.c 


Log Message:


massimiliano's updates

===
RCS file: 
/cvs/e/e17/apps/e/src/modules/conf_wallpaper/e_int_config_wallpaper_web.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- e_int_config_wallpaper_web.c27 Mar 2008 08:03:27 -  1.12
+++ e_int_config_wallpaper_web.c11 Apr 2008 23:03:08 -  1.13
@@ -2,7 +2,9 @@
  * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
  */
 
-// Da usare per importare l'immagine : e_int_config_wallpaper_import(NULL);
+/* TODO
+   * notify user if the Flickr query doesn't return any result
+*/
 
 #include "e.h"
 #include "e_mod_main.h"
@@ -11,6 +13,7 @@
 
 #defineMAGIC_IMPORT 0x427781cb
 #define TEMPLATE "/tmp/wallpXX"
+#define FLICKR_QUERY 
"http://api.flickr.com/services/feeds/photos_public.gne?tags=%s&format=rss_200_enc";
 
 typedef struct _Import Import;
 
@@ -30,11 +33,25 @@
Ecore_Con_Url *ecu;
Ecore_Event_Handler *hdata, *hcomplete;
FILE *feed;
-   int ready_for_edj, pending_downloads, busy;
-   char *edj, *ol_val, *tmpdir;
+   int ready_for_media, pending_downloads, busy;
+   char *media, *ol_val, *tmpdir, *flickr_query;
const char *source;
 };
 
+enum parser_states
+{
+   PS_QUIET = -1,
+   PS_RSS_TAG_START,
+   PS_RSS_TAG_END,
+   PS_RSS_TAG_FOUND,
+   PS_GENERATOR_FOUND,
+   PS_ITEM_FOUND,
+   PS_XSM_LINK_FOUND,
+   PS_XSM_ENCLOSURE_FOUND,
+   PS_MEDIA_CONTENT_FOUND,
+   PS_MEDIA_THUMB_FOUND
+};
+
 static void _file_double_click_cb(void *data, Evas_Object *obj, void *ev_info);
 static void _file_click_cb(void *data, Evas_Object *obj, void *ev_info);
 static int  _feed_complete(void *data, int type, void *event);
@@ -52,6 +69,7 @@
 static void _download_media(Import *import);
 static int  _download_media_progress_cb(void *data, const char *file, long int 
dltotal, long int dlnow, long int ultotal, long int ulnow);
 static void _download_media_complete_cb(void *data, const char *file, int 
status);
+static void _get_flickr_images(void *data, void *data2);
 
 EAPI E_Dialog *
 e_int_config_wallpaper_web(E_Config_Dialog *parent)
@@ -60,7 +78,7 @@
E_Dialog *dia;
Import *import;
E_Config_Dialog_Data *cfdata;
-   Evas_Object *o, *ol, *of, *ofm, *osfm;
+   Evas_Object *o, *ol, *of, *ofm, *osfm, *ee, *b;
Evas_Coord mw, mh;
E_Fm2_Config fmc;
 
@@ -86,7 +104,7 @@
 
cfdata->ecu = ecore_con_url_new("http://fake.url";);
 
-   cfdata->ready_for_edj = 0;
+   cfdata->ready_for_media = 0;
cfdata->pending_downloads = 0;
cfdata->busy = 0;
import->cfdata = cfdata;
@@ -104,8 +122,8 @@
ecore_list_free_cb_set(cfdata->names, free);
cfdata->medias = ecore_list_new();
ecore_list_free_cb_set(cfdata->medias, free);
-
-   of = e_widget_framelist_add(evas, "Sources", 1);
+   //of = e_widget_framelist_add(evas, "Sources", 1);
+   of = e_widget_frametable_add(evas, _("Sources"), 0);
ol = e_widget_ilist_add(evas, 24, 24, &cfdata->ol_val);
cfdata->ol = ol;
e_widget_ilist_append(ol, NULL, _("get-e.org - Static"),
@@ -117,14 +135,24 @@
/*e_widget_ilist_append(ol, NULL, _("get-e.org - Local copy"),
  _source_sel_cb, import,
  "http://localhost/get_e_feed.xml";);*/
-   /*e_widget_ilist_append(ol, NULL, "Flickr test",
+   /*e_widget_ilist_append(ol, NULL, "Raster on Flickr",
  _source_sel_cb, import,
- 
"http://api.flickr.com/services/feeds/photos_public.gne?tags=birro&lang=it-it&format=rss_200_enc";);*/
+ 
"http://api.flickr.com/services/feeds/photos_public.gne?tags=rasterman&lang=it-it&format=rss_200_enc";);*/
e_widget_ilist_go(ol);
+
e_widget_min_size_get(ol, &mw, NULL);
e_widget_min_size_set(ol, mw, 320);
-   e_widget_framelist_object_append(of, ol);
-   e_widget_list_object_append(o, of, 1, 0, 0.5);
+
+   //e_widget_framelist_object_append(of, ol);
+   e_widget_frametable_object_append(of, ol, 0, 0, 3, 1, 1, 1, 1, 1);
+
+   cfdata->flickr_query = strdup(_("Enter text here"));
+   ee = e_widget_entry_add(evas, &(cfdata->flickr_query), NULL, NULL, NULL);
+   b = e_widget_button_add(evas, _("Query Flickr"), NULL, _get_flickr_images, 
import, NULL);
+   e_widget_frametable_object_append(of, ee, 0, 1, 2, 1, 1, 1, 1, 0);
+   e_widget_frametable_object_append(of, b, 2, 1, 1, 1, 0, 1, 0, 0);
+
+   e_widget_list_object_append(o, of, 1, 1, 0.5);
 
ofm = e_fm2_add(evas);
memset(&fmc, 0, sizeof(E_Fm2_Config));
@@ -164,7 +192,6 @@
e_widget_list_object_append(cfdata->o, cfdata->osfm, 1, 1, 0.5);
e_widget_min_size_set(osfm, 320, 320);
 
-//   e_widget_min_size_set(o, 580, 370);
e_widget_min_size_get(o, NULL, &mh);
e_dialog_content_set(dia, o, 480, mh);
 
@@ -250,6 +277,7

E CVS: libs/embryo doursse

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : doursse
Project : e17
Module  : libs/embryo

Dir : e17/libs/embryo/src/bin


Modified Files:
embryo_cc_prefix.c embryo_cc_sc.h embryo_cc_sc1.c 
embryo_cc_sc2.c embryo_cc_sc3.c embryo_cc_sc4.c 
embryo_cc_sc5.c embryo_cc_sc6.c embryo_cc_sc7.c 
embryo_cc_scexpand.c embryo_cc_sclist.c embryo_cc_scvars.c 


Log Message:
remove trailing spaces and add indent doc for vi

===
RCS file: /cvs/e/e17/libs/embryo/src/bin/embryo_cc_prefix.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- embryo_cc_prefix.c  28 Mar 2008 18:32:09 -  1.9
+++ embryo_cc_prefix.c  11 Apr 2008 19:06:18 -  1.10
@@ -1,8 +1,9 @@
 /*
  * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
  */
+
 #ifdef HAVE_CONFIG_H
-# include "config.h"
+# include 
 #endif
 
 #include 
@@ -22,7 +23,7 @@
 #include 
 #include   /* dlopen,dlclose,etc */
 #ifdef HAVE_EVIL
-# include   /* for realpath */ 
+# include   /* for realpath */
 #else
 # include 
 # include 
@@ -76,7 +77,7 @@
else
  snprintf(buf, sizeof(buf), "%s/lib", _prefix_path);
_prefix_path_lib = strdup(buf);
-   
+
if (getenv("E_DATA_DIR"))
  snprintf(buf, sizeof(buf), "%s/"SHARE_D, getenv("E_DATA_DIR"));
else
@@ -121,7 +122,7 @@
   _prefix_path_bin = strdup(buf);
   snprintf(buf, sizeof(buf), "%s/lib", _prefix_path);
   _prefix_path_lib = strdup(buf);
-  
+
   /* check if AUTHORS file is there - then our guess is 
right */
   snprintf(buf, sizeof(buf), "%s/"MAGIC_DAT, _prefix_path);
   if (stat(buf, &st) == 0)
@@ -166,7 +167,7 @@
E_FREE(_prefix_path_data);
E_FREE(_prefix_path_lib);
 }
-   
+
 void
 e_prefix_fallback(void)
 {
@@ -207,18 +208,18 @@
 
/* sometimes this isnt the case - so we need to do a more exhaustive search
 * through more parent and subdirs. hre is an example i have seen:
-* 
+*
 * /blah/whatever/exec/bin/exe
 * ->
 * /blah/whatever/exec/bin
 * /blah/whatever/common/share/enlightenment
 * /blah/whatever/exec/lib
 */
-   
+
/* this is pure black magic to try and find data shares */
/* 2. cache file doesn't exist or is invalid - we need to search - this is
 * where the real black magic begins */
-   
+
/* BLACK MAGIC 1:
 * /blah/whatever/dir1/bin
 * /blah/whatever/dir2/share/enlightenment
@@ -227,7 +228,7 @@
  {
DIR*dirp;
struct dirent  *dp;
-   
+
snprintf(buf, sizeof(buf), "%s", _prefix_path);
p = strrchr(buf, '/');
if (p) *p = 0;
@@ -235,7 +236,7 @@
if (dirp)
  {
 char *file;
-
+
 while ((dp = readdir(dirp)))
   {
  if ((strcmp(dp->d_name, ".")) && (strcmp(dp->d_name, "..")))
@@ -253,7 +254,7 @@
 closedir(dirp);
  }
  }
-   
+
/* BLACK MAGIC 2:
 * /blah/whatever/dir1/bin
 * /blah/whatever/share/enlightenment
@@ -270,13 +271,13 @@
 _prefix_path_data = strdup(buf2);
  }
  }
-   
+
/* add more black magic as required as we discover weridnesss - remember
 * this is to save users having to set environment variables to tell
 * e where it lives, so e auto-adapts. so these code snippets are just
 * logic to figure that out for the user
 */
-   
+
/* done. we found it - write cache file */
if (_prefix_path_data)
  {
@@ -328,7 +329,7 @@
int len;
char *p, mode[5] = "";
unsigned long ptr1 = 0, ptr2 = 0;
-   
+
len = strlen(buf);
if (buf[len - 1] == '\n')
  {
@@ -369,7 +370,7 @@
char *path, *p, *cp, *s;
int len, lenexe;
char buf[4096], buf2[4096], buf3[4096];
-   
+
/* 1. is argv0 abs path? */
if (argv0[0] == '/')
  {
===
RCS file: /cvs/e/e17/libs/embryo/src/bin/embryo_cc_sc.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- embryo_cc_sc.h  11 Apr 2008 05:59:42 -  1.15
+++ embryo_cc_sc.h  11 Apr 2008 19:06:18 -  1.16
@@ -9,7 +9,7 @@
  *  Copyright J.E. Hendrix, 1982, 1983
  *  Copyright T. Riemersma, 1997-2003
  *
- *  Version: $Id: embryo_cc_sc.h,v 1.15 2008/04/11 05:59:42 doursse Exp $
+ *  Version: $Id: embryo_cc_sc.h,v 1.16 2008/04/11 19:06:18 doursse Exp $
  *
  *  This software is provided "as-is", without any express or implied warranty.
  *  In no event will the authors be held liable for any damages arising from
@@ -27,6 +27,7 @@
  *  misrepresented as being the original software.
  *  3.  This notice may not be removed or altered from any source distribution.
  */
+
 #ifndef EMBRYO_CC_SC_H
 #define EMBR

E CVS: libs/embryo doursse

2008-04-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : doursse
Project : e17
Module  : libs/embryo

Dir : e17/libs/embryo/src/lib


Modified Files:
embryo_amx.c embryo_args.c embryo_float.c embryo_main.c 
embryo_private.h embryo_rand.c embryo_str.c embryo_time.c 


Log Message:
remove trailing spaces and add indent doc for vi

===
RCS file: /cvs/e/e17/libs/embryo/src/lib/embryo_amx.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- embryo_amx.c27 Jun 2007 10:57:54 -  1.32
+++ embryo_amx.c11 Apr 2008 19:06:18 -  1.33
@@ -19,6 +19,11 @@
  *  misrepresented as being the original software.
  *  3.  This notice may not be removed or altered from any source distribution.
  */
+
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
+
 #include "embryo_private.h"
 
 #define JUMPABS(base, ip) ((Embryo_Cell *)(code + (*ip)))
@@ -37,7 +42,7 @@
 _embryo_byte_swap_16(unsigned short *v)
 {
unsigned char *s, t;
-   
+
s = (unsigned char *)v;
t = s[0]; s[0] = s[1]; s[1] = t;
 }
@@ -46,7 +51,7 @@
 _embryo_byte_swap_32(unsigned int *v)
 {
unsigned char *s, t;
-   
+
s = (unsigned char *)v;
t = s[0]; s[0] = s[3]; s[3] = t;
t = s[1]; s[1] = s[2]; s[2] = t;
@@ -62,7 +67,7 @@
 
hdr = (Embryo_Header *)ep->base;
func_entry = GETENTRY(hdr, natives, index);
-   if ((func_entry->address <= 0) || 
+   if ((func_entry->address <= 0) ||
(func_entry->address > ep->native_calls_size))
  {
ep->error = EMBRYO_ERROR_CALLBACK;
@@ -84,11 +89,11 @@
 {
Embryo_Header*hdr;
Embryo_Func_Stub *func;
-   
+
hdr = (Embryo_Header *)ep->code;
if (index >= (Embryo_Cell)NUMENTRIES(hdr, publics, natives))
  return EMBRYO_ERROR_INDEX;
-   
+
func = GETENTRY(hdr, publics, index);
strcpy(funcname, GETENTRYNAME(hdr, func));
return EMBRYO_ERROR_NONE;
@@ -115,7 +120,7 @@
 _embryo_program_init(Embryo_Program *ep, void *code)
 {
Embryo_Header*hdr;
-   
+
if ((ep->flags & EMBRYO_FLAG_RELOC)) return 1;
ep->code = (unsigned char *)code;
hdr = (Embryo_Header *)ep->code;
@@ -136,30 +141,30 @@
embryo_swap_32((unsigned int *)&hdr->tags);
embryo_swap_32((unsigned int *)&hdr->nametable);
 #endif
-   
+
if (hdr->magic != EMBRYO_MAGIC) return 0;
if ((hdr->file_version < MIN_FILE_VERSION) ||
   (hdr->ep_version > CUR_FILE_VERSION)) return 0;
-   if ((hdr->defsize != sizeof(Embryo_Func_Stub)) && 
+   if ((hdr->defsize != sizeof(Embryo_Func_Stub)) &&
   (hdr->defsize != (2 * sizeof(unsigned int return 0;
if (hdr->defsize == (2 * sizeof(unsigned int)))
  {
unsigned short *len;
-   
+
len = (unsigned short*)((unsigned char*)ep->code + hdr->nametable);
 #ifdef WORDS_BIGENDIAN
embryo_swap_16((unsigned short *)len);
-#endif 
+#endif
if (*len > sNAMEMAX) return 0;
  }
if (hdr->stp <= 0) return 0;
if ((hdr->flags & EMBRYO_FLAG_COMPACT)) return 0;
-   
+
 #ifdef WORDS_BIGENDIAN
  {
Embryo_Func_Stub *fs;
int i, num;
-   
+
/* also align all addresses in the public function, public variable and 
*/
/* public tag tables */
fs = GETENTRY(hdr, publics, 0);
@@ -169,7 +174,7 @@
 embryo_swap_32(&(fs->address));
 fs = (Embryo_Func_Stub *)((unsigned char *)fs + hdr->defsize);
  }
-   
+
fs = GETENTRY(hdr, pubvars, 0);
num = NUMENTRIES(hdr, pubvars, tags);
for (i = 0; i < num; i++)
@@ -177,7 +182,7 @@
 embryo_swap_32(&(fs->address));
 fs = (Embryo_Func_Stub *)((unsigned char *)fs + hdr->defsize);
  }
-   
+
fs = GETENTRY(hdr, tags, 0);
num = NUMENTRIES(hdr, tags, nametable);
for (i = 0; i < num; i++)
@@ -186,13 +191,13 @@
 fs = (Embryo_Func_Stub *)((unsigned char *)fs + hdr->defsize);
  }
  }
-#endif   
+#endif
ep->flags = EMBRYO_FLAG_RELOC;
 
  {
Embryo_Cell cip, code_size;
Embryo_Cell *code;
-   
+
code_size = hdr->dat - hdr->cod;
code = (Embryo_Cell *)((unsigned char *)ep->code + (int)hdr->cod);
for (cip = 0; cip < (code_size / sizeof(Embryo_Cell)); cip++)
@@ -203,7 +208,7 @@
 #ifdef WORDS_BIGENDIAN
 embryo_swap_32(&(code[cip]));
 #endif
-
+
  }
  }
/* init native api for handling floating point - default in embryo */
@@ -235,12 +240,12 @@
 {
Embryo_Program *ep;
void *code_data;
-   
+
if (size < (int)sizeof(Embryo_Header)) return NULL;
-   
+
ep = calloc(1, sizeof(Embryo_Program));
if (!ep) return NULL;
-   
+
code_data = malloc(size);
if (!code_data)
  {
@@ -255,7 +260,7 @@
 }
 
 /**
- * Creates a new Embryo program, with bytecode data that cannot be 
+ * Creates a new Embryo program, with bytecode data that cannot be
  * freed.
  * @param   d