current->channel++;
cache = current->cache;
- if (!current->flags.loaded)
+ if (!current->flags.loaded && ((Evas_Image_Load_Func*) current->info.module)->threadable)
{
error = cache->func.load(current);
if (cache->func.debug)
ie->cache->pending = eina_list_remove(ie->cache->pending, ie);
ie->preload = NULL;
- ie->flags.preload_done = 1;
+ ie->flags.preload_done = ie->flags.loaded;
while (ie->targets)
{
tmp = ie->targets;
{
ie->cache->preload = eina_list_append(ie->cache->preload, ie);
ie->flags.pending = 0;
-
+
ie->preload = evas_preload_thread_run(_evas_cache_image_async_heavy,
_evas_cache_image_async_end,
_evas_cache_image_async_cancel,
struct _Evas_Image_Load_Func
{
+ Eina_Bool threadable;
Eina_Bool (*file_head) (Image_Entry *ie, const char *file, const char *key, int *error);
Eina_Bool (*file_data) (Image_Entry *ie, const char *file, const char *key, int *error);
};
static Evas_Image_Load_Func evas_image_load_edb_func =
{
+ EINA_TRUE,
evas_image_load_file_head_edb,
evas_image_load_file_data_edb
};
Evas_Image_Load_Func evas_image_load_eet_func =
{
+ EINA_TRUE,
evas_image_load_file_head_eet,
evas_image_load_file_data_eet
};
static Evas_Image_Load_Func evas_image_load_gif_func =
{
+ EINA_TRUE,
evas_image_load_file_head_gif,
evas_image_load_file_data_gif
};
static Evas_Image_Load_Func evas_image_load_jpeg_func =
{
+ EINA_TRUE,
evas_image_load_file_head_jpeg,
evas_image_load_file_data_jpeg
};
static Eina_Bool evas_image_load_file_data_pmaps(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4);
Evas_Image_Load_Func evas_image_load_pmaps_func = {
+ EINA_TRUE,
evas_image_load_file_head_pmaps,
evas_image_load_file_data_pmaps
};
static Evas_Image_Load_Func evas_image_load_png_func =
{
+ EINA_TRUE,
evas_image_load_file_head_png,
evas_image_load_file_data_png
};
Evas_Image_Load_Func evas_image_load_svg_func =
{
+ EINA_FALSE,
evas_image_load_file_head_svg,
evas_image_load_file_data_svg
};
static Evas_Image_Load_Func evas_image_load_tiff_func =
{
+ EINA_TRUE,
evas_image_load_file_head_tiff,
evas_image_load_file_data_tiff
};
static Evas_Image_Load_Func evas_image_load_xpm_func =
{
+ EINA_FALSE,
evas_image_load_file_head_xpm,
evas_image_load_file_data_xpm
};