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 -0000      1.9
+++ evas_image_load_eet.c       12 Apr 2008 00:32:29 -0000      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

Reply via email to