Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Modified Files:
        evas_image_load.c evas_image_main.c 


Log Message:


chasing somethnig really bizarre... but this works right now.

===================================================================
RCS file: /cvs/e/e17/libs/evas/src/lib/engines/common/evas_image_load.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -3 -r1.37 -r1.38
--- evas_image_load.c   2 Mar 2007 22:27:52 -0000       1.37
+++ evas_image_load.c   2 Mar 2007 23:12:10 -0000       1.38
@@ -1,10 +1,6 @@
 #include "evas_common.h"
 #include "evas_private.h"
 
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
 extern Evas_List *evas_modules;
 
 EAPI RGBA_Image *
@@ -17,6 +13,7 @@
    char *loader = NULL;
    Evas_Module *em;
    struct stat st;
+//   time_t t;
    
    if (file == NULL) return NULL;
 
@@ -26,12 +23,14 @@
        evas_common_image_ref(im);
        return im;
      }
+//   t = time();
    if (stat(file, &st) < 0) return NULL;
    
    im = evas_common_image_new();
    if (!im) return NULL;
    
    im->timestamp = st.st_mtime;
+//   im->last_stat = t;
    
    if (lo) im->load_opts = *lo;
    
===================================================================
RCS file: /cvs/e/e17/libs/evas/src/lib/engines/common/evas_image_main.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -3 -r1.44 -r1.45
--- evas_image_main.c   2 Mar 2007 22:27:52 -0000       1.44
+++ evas_image_main.c   2 Mar 2007 23:12:10 -0000       1.45
@@ -478,7 +478,8 @@
    char buf[4096 + 1024];
    Evas_Object_List *l;
    struct stat st;
-   static time_t last_stat = 0, t, mt;
+   static time_t last_stat = 0;
+   time_t t, mt = 0;
 
    if ((!file) && (!key)) return NULL;
    if (!file) return NULL;
@@ -500,33 +501,32 @@
        else
          snprintf(buf, sizeof(buf), "//@/%i/%1.5f/%ix%i//%s", 
lo->scale_down_by, lo->dpi, lo->w, lo->h, file);
      }
+//   t = time();
    im = evas_hash_find(images, buf);
-   t = time();
    if (im)
      {
-       if ((t - last_stat) < STAT_GAP)
-         return im;
-       else
+//     if ((t - im->last_stat) < STAT_GAP)
+//       return im;
+//     else
          {
             struct stat st;
             
-            if (stat(file, &st) != 0) return NULL;
+            if (stat(file, &st) < 0) return NULL;
             mt = st.st_mtime;
             if (mt == im->timestamp)
               {
-                 last_stat = t;
+//               im->last_stat = t;
                  return im;
               }
          }
      }
    else
      {
-        if ((t - last_stat) >= STAT_GAP)
-         {
-            if (stat(file, &st) != 0) return NULL;
+//        if ((t - last_stat) >= STAT_GAP)
+//       {
+            if (stat(file, &st) < 0) return NULL;
             mt = st.st_mtime;
-            last_stat = t;
-         }
+//       }
      }
      
    for (l = cache; l; l = l->next)
@@ -550,13 +550,13 @@
          ok++;
        else continue;
        
-        if ((t - last_stat) >= STAT_GAP)
-         {
+//        if ((t - im->last_stat) >= STAT_GAP)
+//       {
             if (im->timestamp == mt)
               ok++;
             else continue;
-         }
-       else ok++;
+//       }
+//     else ok++;
        
        if ((lo->scale_down_by == lo2->scale_down_by) &&
            (lo->dpi == lo2->dpi) && (lo->w == lo2->w) && 
@@ -564,6 +564,7 @@
          ok++;
        else continue;
        
+//     im->last_stat = t;
        return im;
      }
 /*



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to