Enlightenment CVS committal

Author  : cedric
Project : e17
Module  : libs/evas

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


Modified Files:
        evas_image_load_gif.c 


Log Message:
        * Make RGBA_IMAGE_HAS_ALPHA and RGBA_IMAGE_ALPHA_SPARSE part of
        Image_Entry flag structure. This fix a bug with 16 bpp software engine.

        * Change image loader module API to take any Image_Entry. Same goes
        for evas_common_image_premul and evas_common_image_set_alpha_sparse.

        * Use new eet API: eet_data_image_read_to_surface.


===================================================================
RCS file: /cvs/e/e17/libs/evas/src/modules/loaders/gif/evas_image_load_gif.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- evas_image_load_gif.c       12 Apr 2008 00:32:29 -0000      1.6
+++ evas_image_load_gif.c       3 Jun 2008 09:09:38 -0000       1.7
@@ -8,8 +8,8 @@
 #include <gif_lib.h>
 
 
-int evas_image_load_file_head_gif(RGBA_Image *im, const char *file, const char 
*key);
-int evas_image_load_file_data_gif(RGBA_Image *im, const char *file, const char 
*key);
+int evas_image_load_file_head_gif(Image_Entry *ie, const char *file, const 
char *key);
+int evas_image_load_file_data_gif(Image_Entry *ie, const char *file, const 
char *key);
 
 Evas_Image_Load_Func evas_image_load_gif_func =
 {
@@ -19,7 +19,7 @@
 
 
 int
-evas_image_load_file_head_gif(RGBA_Image *im, const char *file, const char 
*key)
+evas_image_load_file_head_gif(Image_Entry *ie, const char *file, const char 
*key)
 {
    int                 fd;
    GifFileType        *gif;
@@ -93,16 +93,16 @@
           }
    } while (rec != TERMINATE_RECORD_TYPE);
 
-   if (alpha >= 0) im->flags |= RGBA_IMAGE_HAS_ALPHA;
-   im->cache_entry.w = w;
-   im->cache_entry.h = h;
+   if (alpha >= 0) ie->flags.alpha = 1;
+   ie->w = w;
+   ie->h = h;
 
    DGifCloseFile(gif);
    return 1;
 }
 
 int
-evas_image_load_file_data_gif(RGBA_Image *im, const char *file, const char 
*key)
+evas_image_load_file_data_gif(Image_Entry *ie, const char *file, const char 
*key)
 {
    int                 intoffset[] = { 0, 4, 2, 1 };
    int                 intjump[] = { 8, 8, 4, 2 };
@@ -233,9 +233,9 @@
           }
    } while (rec != TERMINATE_RECORD_TYPE);
 
-   if (alpha >= 0) im->flags |= RGBA_IMAGE_HAS_ALPHA;
-   evas_cache_image_surface_alloc(&im->cache_entry, w, h);
-   if (!im->image.data)
+   if (alpha >= 0) ie->flags.alpha = 1;
+   evas_cache_image_surface_alloc(ie, w, h);
+   if (!evas_cache_image_pixels(ie))
      {
         DGifCloseFile(gif);
         for (i = 0; i < h; i++)
@@ -249,7 +249,7 @@
    bg = gif->SBackGroundColor;
    cmap = (gif->Image.ColorMap ? gif->Image.ColorMap : gif->SColorMap);
 
-   ptr = im->image.data;
+   ptr = evas_cache_image_pixels(ie);
    per_inc = 100.0 / (((double)w) * h);
 
    for (i = 0; i < h; i++)
@@ -273,7 +273,7 @@
            per += per_inc;
          }
      }
-   evas_common_image_premul(im);
+   evas_common_image_premul(ie);
    DGifCloseFile(gif);
    for (i = 0; i < h; i++)
      {



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

Reply via email to