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

Reply via email to