#ifdef BUILD_ASYNC_PRELOAD
LKD(ie->lock);
+ LKD(ie->lock_cancel);
#endif
#ifdef EVAS_FRAME_QUEUING
LKD(ie->lock_references);
#ifdef BUILD_ASYNC_PRELOAD
LKI(ie->lock);
+ LKI(ie->lock_cancel);
ie->targets = NULL;
ie->preload = NULL;
ie->flags.delete_me = 0;
}
current->channel = pchannel;
+
+ // check the unload cancel flag
+ LKL(current->lock_cancel);
+ if (current->unload_cancel)
+ {
+ current->unload_cancel = EINA_FALSE;
+ cache->func.surface_delete(current);
+ current->flags.loaded = 0;
+ current->flags.preload_done = 0;
+ }
+ LKU(current->lock_cancel);
+
LKU(current->lock);
}
evas_cache_image_preload_cancel(im, NULL);
#ifdef BUILD_ASYNC_PRELOAD
- LKL(im->lock);
+ LKL(im->lock_cancel);
+ if (LKT(im->lock) != 0) /* can't get image lock - busy async load */
+ {
+ im->unload_cancel = EINA_TRUE;
+ LKU(im->lock_cancel);
+ return;
+ }
+ LKU(im->lock_cancel);
+// LKL(im->lock);
#endif
if ((!im->flags.loaded) || (!im->file) ||
(!im->info.module) || (im->flags.dirty))
evas_cache_image_preload_data(Image_Entry *im, const void *target)
{
#ifdef BUILD_ASYNC_PRELOAD
+ RGBA_Image *img = (RGBA_Image *)im;
+
assert(im);
assert(im->cache);
- if (im->flags.loaded)
+ if ((im->flags.loaded) && (img->image.data))
{
evas_object_inform_call_image_preloaded((Evas_Object *)target);
return;
}
+ im->flags.loaded = 0;
if (!_evas_cache_image_entry_preload_add(im, target))
- evas_object_inform_call_image_preloaded((Evas_Object *)target);
+ {
+ evas_object_inform_call_image_preloaded((Evas_Object *)target);
+ }
#else
evas_cache_image_load_data(im);
evas_object_inform_call_image_preloaded((Evas_Object *)target);
case EVAS_COLORSPACE_YCBCR422P709_PL:
if (dst->image.no_free)
{
- dst->image.data = NULL;
+ ie_dst->allocated.w = 0;
+ ie_dst->allocated.h = 0;
+ ie_dst->flags.preload_done = 0;
+ ie_dst->flags.loaded = 0;
+ dst->image.data = NULL;
dst->image.no_free = 0;
/* FIXME: Must allocate image.data surface cleanly. */
}
* causes only speed-down side-effect and no memory usage gain;
* it will be loaded again for the very next rendering for this image.
*/
- if ((dounload) ||
- ((im->cache_entry.flags.loaded) &&
- ((!im->cs.no_free)
+ if (ie->scale_hint != EVAS_IMAGE_SCALE_HINT_DYNAMIC)
+ {
+ if ((dounload) ||
+ ((im->cache_entry.flags.loaded) &&
+ ((!im->cs.no_free)
#ifdef EVAS_CSERVE
- || (ie->data1)
+ || (ie->data1)
#endif
- ) &&
- (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888)))
- {
- if ((dounload) || (im->cache.orig_usage <
- (im->cache.newest_usage / 20)))
+ ) &&
+ (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888)))
{
- evas_common_rgba_image_unload(&im->cache_entry);
+ if ((dounload) || (im->cache.orig_usage <
+ (im->cache.newest_usage / 20)))
+ {
+ evas_common_rgba_image_unload(&im->cache_entry);
+ }
}
}
#endif