summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-08-23 14:24:11 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-08-25 14:48:12 -0400
commite4ba40c5bc69b5be6fa8bf197c09c3a94e16fea0 (patch)
treedd1560801d47ce391ca7d3576c241d516dc55f8e
parent77455208525dfc1ecbee9d3eb65459f514ee0b1a (diff)
evas image cache: break out preload complete notification code into function
no functional changes
-rw-r--r--src/lib/evas/cache/evas_cache_image.c31
1 files changed, 19 insertions, 12 deletions
diff --git a/src/lib/evas/cache/evas_cache_image.c b/src/lib/evas/cache/evas_cache_image.c
index 51b0bf1559..ec44a2112c 100644
--- a/src/lib/evas/cache/evas_cache_image.c
+++ b/src/lib/evas/cache/evas_cache_image.c
@@ -394,21 +394,10 @@ _evas_cache_image_async_heavy(void *data)
394} 394}
395 395
396static void 396static void
397_evas_cache_image_async_end(void *data) 397_evas_cache_image_preloaded_notify(Image_Entry *ie)
398{ 398{
399 Image_Entry *ie = (Image_Entry *)data;
400 Image_Entry_Task *task;
401 Evas_Cache_Target *tmp; 399 Evas_Cache_Target *tmp;
402 400
403 evas_cache_image_ref(ie);
404 ie->cache->preload = eina_list_remove(ie->cache->preload, ie);
405 ie->cache->pending = eina_list_remove(ie->cache->pending, ie);
406 ie->preload = NULL;
407 ie->flags.preload_done = ie->flags.loaded;
408 ie->flags.updated_data = 1;
409
410 ie->flags.preload_pending = 0;
411
412 while ((tmp = ie->targets)) 401 while ((tmp = ie->targets))
413 { 402 {
414 ie->targets = (Evas_Cache_Target *) 403 ie->targets = (Evas_Cache_Target *)
@@ -427,6 +416,24 @@ _evas_cache_image_async_end(void *data)
427 } 416 }
428 free(tmp); 417 free(tmp);
429 } 418 }
419}
420
421static void
422_evas_cache_image_async_end(void *data)
423{
424 Image_Entry *ie = (Image_Entry *)data;
425 Image_Entry_Task *task;
426
427 evas_cache_image_ref(ie);
428 ie->cache->preload = eina_list_remove(ie->cache->preload, ie);
429 ie->cache->pending = eina_list_remove(ie->cache->pending, ie);
430 ie->preload = NULL;
431 ie->flags.preload_done = ie->flags.loaded;
432 ie->flags.updated_data = 1;
433
434 ie->flags.preload_pending = 0;
435
436 _evas_cache_image_preloaded_notify(ie);
430 437
431 EINA_LIST_FREE(ie->tasks, task) 438 EINA_LIST_FREE(ie->tasks, task)
432 if (task != &dummy_task) free(task); 439 if (task != &dummy_task) free(task);