forked from enlightenment/efl
and try and reduce possible cache deadlocks/issues.
SVN revision: 59064
This commit is contained in:
parent
f2e2d8963a
commit
3d4b3d40a9
|
@ -207,10 +207,12 @@ _evas_cache_image_entry_delete(Evas_Cache_Image *cache, Image_Entry *ie)
|
||||||
if (cache->func.debug) cache->func.debug("deleting", ie);
|
if (cache->func.debug) cache->func.debug("deleting", ie);
|
||||||
#ifdef BUILD_ASYNC_PRELOAD
|
#ifdef BUILD_ASYNC_PRELOAD
|
||||||
if (ie->flags.delete_me == 1) return;
|
if (ie->flags.delete_me == 1) return;
|
||||||
|
LKL(ie->lock);
|
||||||
if (ie->preload)
|
if (ie->preload)
|
||||||
{
|
{
|
||||||
ie->flags.delete_me = 1;
|
ie->flags.delete_me = 1;
|
||||||
_evas_cache_image_entry_preload_remove(ie, NULL);
|
_evas_cache_image_entry_preload_remove(ie, NULL);
|
||||||
|
LKU(ie->lock);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -228,7 +230,10 @@ _evas_cache_image_entry_delete(Evas_Cache_Image *cache, Image_Entry *ie)
|
||||||
cache->func.surface_delete(ie);
|
cache->func.surface_delete(ie);
|
||||||
|
|
||||||
#ifdef BUILD_ASYNC_PRELOAD
|
#ifdef BUILD_ASYNC_PRELOAD
|
||||||
|
LKU(ie->lock);
|
||||||
|
#ifndef SCALECACHE
|
||||||
LKD(ie->lock);
|
LKD(ie->lock);
|
||||||
|
#endif
|
||||||
LKD(ie->lock_cancel);
|
LKD(ie->lock_cancel);
|
||||||
#endif
|
#endif
|
||||||
#ifdef EVAS_FRAME_QUEUING
|
#ifdef EVAS_FRAME_QUEUING
|
||||||
|
@ -303,7 +308,9 @@ _evas_cache_image_entry_new(Evas_Cache_Image *cache,
|
||||||
LKI(ie->lock_references);
|
LKI(ie->lock_references);
|
||||||
#endif
|
#endif
|
||||||
#ifdef BUILD_ASYNC_PRELOAD
|
#ifdef BUILD_ASYNC_PRELOAD
|
||||||
|
#ifndef SCALECACHE
|
||||||
LKI(ie->lock);
|
LKI(ie->lock);
|
||||||
|
#endif
|
||||||
LKI(ie->lock_cancel);
|
LKI(ie->lock_cancel);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -590,12 +597,15 @@ evas_cache_image_shutdown(Evas_Cache_Image *cache)
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// XXX: i smell concurrency problem here
|
||||||
#ifdef BUILD_ASYNC_PRELOAD
|
#ifdef BUILD_ASYNC_PRELOAD
|
||||||
EINA_LIST_FREE(cache->preload, im)
|
EINA_LIST_FREE(cache->preload, im)
|
||||||
{
|
{
|
||||||
|
LKL(im->lock);
|
||||||
/* By doing that we are protecting us from destroying image when the cache is no longuer available. */
|
/* By doing that we are protecting us from destroying image when the cache is no longuer available. */
|
||||||
im->flags.delete_me = 1;
|
im->flags.delete_me = 1;
|
||||||
_evas_cache_image_entry_preload_remove(im, NULL);
|
_evas_cache_image_entry_preload_remove(im, NULL);
|
||||||
|
LKU(im->lock);
|
||||||
}
|
}
|
||||||
evas_async_events_process();
|
evas_async_events_process();
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue