forked from enlightenment/efl
oh dear - when i added load opts - i broke speculative caching. fixed!
SVN revision: 28531
This commit is contained in:
parent
8420b86942
commit
635e741438
|
@ -472,8 +472,10 @@ evas_common_image_unstore(RGBA_Image *im)
|
||||||
EAPI RGBA_Image *
|
EAPI RGBA_Image *
|
||||||
evas_common_image_find(const char *file, const char *key, DATA64 timestamp, RGBA_Image_Loadopts *lo)
|
evas_common_image_find(const char *file, const char *key, DATA64 timestamp, RGBA_Image_Loadopts *lo)
|
||||||
{
|
{
|
||||||
|
RGBA_Image_Loadopts *lo2;
|
||||||
RGBA_Image *im;
|
RGBA_Image *im;
|
||||||
char buf[4096 + 1024];
|
char buf[4096 + 1024];
|
||||||
|
Evas_Object_List *l;
|
||||||
|
|
||||||
if ((!file) && (!key)) return NULL;
|
if ((!file) && (!key)) return NULL;
|
||||||
if (!file) return NULL;
|
if (!file) return NULL;
|
||||||
|
@ -497,6 +499,29 @@ evas_common_image_find(const char *file, const char *key, DATA64 timestamp, RGBA
|
||||||
}
|
}
|
||||||
im = evas_hash_find(images, buf);
|
im = evas_hash_find(images, buf);
|
||||||
if (im) return im;
|
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)
|
for (l = cache; l; l = l->next)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue