Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas
Dir : e17/libs/evas/src/lib/engines/common Modified Files: evas_image_main.c Log Message: oh dear - when i added load opts - i broke speculative caching. fixed! =================================================================== RCS file: /cvs/e/e17/libs/evas/src/lib/engines/common/evas_image_main.c,v retrieving revision 1.42 retrieving revision 1.43 diff -u -3 -r1.42 -r1.43 --- evas_image_main.c 28 Dec 2006 12:37:37 -0000 1.42 +++ evas_image_main.c 2 Mar 2007 22:09:18 -0000 1.43 @@ -472,8 +472,10 @@ EAPI RGBA_Image * evas_common_image_find(const char *file, const char *key, DATA64 timestamp, RGBA_Image_Loadopts *lo) { + RGBA_Image_Loadopts *lo2; RGBA_Image *im; char buf[4096 + 1024]; + Evas_Object_List *l; if ((!file) && (!key)) return NULL; if (!file) return NULL; @@ -497,6 +499,29 @@ } im = evas_hash_find(images, buf); if (im) return im; + for (l = cache; l; l = l->next) + { + int ok; + + im = (RGBA_Image *)l; + ok = 0; + lo2 = &(im->load_opts); + if ((file) && (im->info.file) && + (!strcmp(file, im->info.file))) + ok++; + else if ((!file) && (!im->info.file)) + ok++; + if ((key) && (im->info.key) && + (!strcmp(key, im->info.key))) + ok++; + else if ((!key) && (!im->info.key)) + ok++; + if ((lo->scale_down_by == lo2->scale_down_by) && + (lo->dpi == lo2->dpi) && (lo->w == lo2->w) && + (lo->h == lo2->h)) + ok++; + if (ok >= 3) return im; + } /* for (l = cache; l; l = l->next) { ------------------------------------------------------------------------- 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