forked from enlightenment/efl
* evas: make it possible to call unload_all from surface_alloc.
SVN revision: 49448
This commit is contained in:
parent
2049cf563c
commit
5685faac42
|
@ -1346,7 +1346,10 @@ evas_cache_image_load_data(Image_Entry *im)
|
|||
LKL(im->lock);
|
||||
#endif
|
||||
|
||||
im->flags.in_progress = EINA_TRUE;
|
||||
error = cache->func.load(im);
|
||||
im->flags.in_progress = EINA_FALSE;
|
||||
|
||||
#ifdef BUILD_ASYNC_PRELOAD
|
||||
LKU(im->lock);
|
||||
#endif
|
||||
|
@ -1377,10 +1380,14 @@ evas_cache_image_unload_data(Image_Entry *im)
|
|||
assert(im->cache);
|
||||
cache = im->cache;
|
||||
|
||||
if (im->flags.in_progress) return ;
|
||||
|
||||
evas_cache_image_preload_cancel(im, NULL);
|
||||
|
||||
#ifdef BUILD_ASYNC_PRELOAD
|
||||
LKL(im->lock);
|
||||
#endif
|
||||
if ((!im->flags.loaded) || (!im->file) ||
|
||||
if ((!im->flags.loaded) || (!im->file) ||
|
||||
(!im->info.module) || (im->flags.dirty))
|
||||
{
|
||||
#ifdef BUILD_ASYNC_PRELOAD
|
||||
|
@ -1390,7 +1397,7 @@ evas_cache_image_unload_data(Image_Entry *im)
|
|||
}
|
||||
evas_common_rgba_image_scalecache_dirty(im);
|
||||
cache->func.destructor(im);
|
||||
|
||||
|
||||
#ifdef BUILD_ASYNC_PRELOAD
|
||||
LKU(im->lock);
|
||||
#endif
|
||||
|
|
|
@ -191,8 +191,6 @@ evas_common_rgba_image_unload(Image_Entry *ie)
|
|||
{
|
||||
RGBA_Image *im = (RGBA_Image *) ie;
|
||||
|
||||
evas_cache_image_preload_cancel(ie, NULL);
|
||||
|
||||
if (!ie->flags.loaded) return;
|
||||
if ((!ie->info.module) && (!ie->data1)) return;
|
||||
if (!ie->file) return;
|
||||
|
|
|
@ -507,6 +507,7 @@ struct _RGBA_Image_Loadopts
|
|||
struct _Image_Entry_Flags
|
||||
{
|
||||
Eina_Bool loaded : 1;
|
||||
Eina_Bool in_progress : 1;
|
||||
Eina_Bool dirty : 1;
|
||||
Eina_Bool activ : 1;
|
||||
Eina_Bool need_data : 1;
|
||||
|
|
Loading…
Reference in New Issue