forked from enlightenment/efl
* evas: Loader can now tell if they could be used in another thread or not.
xpm and svg loader don't allow preload at this time. SVN revision: 44714
This commit is contained in:
parent
56ec4c946f
commit
7c00860cc1
|
@ -339,7 +339,7 @@ _evas_cache_image_async_heavy(void *data)
|
||||||
current->channel++;
|
current->channel++;
|
||||||
cache = current->cache;
|
cache = current->cache;
|
||||||
|
|
||||||
if (!current->flags.loaded)
|
if (!current->flags.loaded && ((Evas_Image_Load_Func*) current->info.module)->threadable)
|
||||||
{
|
{
|
||||||
error = cache->func.load(current);
|
error = cache->func.load(current);
|
||||||
if (cache->func.debug)
|
if (cache->func.debug)
|
||||||
|
@ -368,7 +368,7 @@ _evas_cache_image_async_end(void *data)
|
||||||
ie->cache->pending = eina_list_remove(ie->cache->pending, ie);
|
ie->cache->pending = eina_list_remove(ie->cache->pending, ie);
|
||||||
|
|
||||||
ie->preload = NULL;
|
ie->preload = NULL;
|
||||||
ie->flags.preload_done = 1;
|
ie->flags.preload_done = ie->flags.loaded;
|
||||||
while (ie->targets)
|
while (ie->targets)
|
||||||
{
|
{
|
||||||
tmp = ie->targets;
|
tmp = ie->targets;
|
||||||
|
|
|
@ -707,6 +707,7 @@ struct _Evas_Func
|
||||||
|
|
||||||
struct _Evas_Image_Load_Func
|
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_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);
|
Eina_Bool (*file_data) (Image_Entry *ie, const char *file, const char *key, int *error);
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,6 +13,7 @@ static Eina_Bool evas_image_load_file_data_edb(Image_Entry *ie, const char *file
|
||||||
|
|
||||||
static Evas_Image_Load_Func evas_image_load_edb_func =
|
static Evas_Image_Load_Func evas_image_load_edb_func =
|
||||||
{
|
{
|
||||||
|
EINA_TRUE,
|
||||||
evas_image_load_file_head_edb,
|
evas_image_load_file_head_edb,
|
||||||
evas_image_load_file_data_edb
|
evas_image_load_file_data_edb
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,6 +13,7 @@ static Eina_Bool evas_image_load_file_data_eet(Image_Entry *ie, const char *file
|
||||||
|
|
||||||
Evas_Image_Load_Func evas_image_load_eet_func =
|
Evas_Image_Load_Func evas_image_load_eet_func =
|
||||||
{
|
{
|
||||||
|
EINA_TRUE,
|
||||||
evas_image_load_file_head_eet,
|
evas_image_load_file_head_eet,
|
||||||
evas_image_load_file_data_eet
|
evas_image_load_file_data_eet
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,6 +12,7 @@ static Eina_Bool evas_image_load_file_data_gif(Image_Entry *ie, const char *file
|
||||||
|
|
||||||
static Evas_Image_Load_Func evas_image_load_gif_func =
|
static Evas_Image_Load_Func evas_image_load_gif_func =
|
||||||
{
|
{
|
||||||
|
EINA_TRUE,
|
||||||
evas_image_load_file_head_gif,
|
evas_image_load_file_head_gif,
|
||||||
evas_image_load_file_data_gif
|
evas_image_load_file_data_gif
|
||||||
};
|
};
|
||||||
|
|
|
@ -36,6 +36,7 @@ static Eina_Bool evas_image_load_file_data_jpeg(Image_Entry *ie, const char *fil
|
||||||
|
|
||||||
static Evas_Image_Load_Func evas_image_load_jpeg_func =
|
static Evas_Image_Load_Func evas_image_load_jpeg_func =
|
||||||
{
|
{
|
||||||
|
EINA_TRUE,
|
||||||
evas_image_load_file_head_jpeg,
|
evas_image_load_file_head_jpeg,
|
||||||
evas_image_load_file_data_jpeg
|
evas_image_load_file_data_jpeg
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,6 +21,7 @@ static Eina_Bool evas_image_load_file_head_pmaps(Image_Entry *ie, const char *fi
|
||||||
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);
|
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 = {
|
Evas_Image_Load_Func evas_image_load_pmaps_func = {
|
||||||
|
EINA_TRUE,
|
||||||
evas_image_load_file_head_pmaps,
|
evas_image_load_file_head_pmaps,
|
||||||
evas_image_load_file_data_pmaps
|
evas_image_load_file_data_pmaps
|
||||||
};
|
};
|
||||||
|
|
|
@ -37,6 +37,7 @@ static Eina_Bool evas_image_load_file_data_png(Image_Entry *ie, const char *file
|
||||||
|
|
||||||
static Evas_Image_Load_Func evas_image_load_png_func =
|
static Evas_Image_Load_Func evas_image_load_png_func =
|
||||||
{
|
{
|
||||||
|
EINA_TRUE,
|
||||||
evas_image_load_file_head_png,
|
evas_image_load_file_head_png,
|
||||||
evas_image_load_file_data_png
|
evas_image_load_file_data_png
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,6 +10,7 @@ static Eina_Bool evas_image_load_file_data_svg(Image_Entry *ie, const char *file
|
||||||
|
|
||||||
Evas_Image_Load_Func evas_image_load_svg_func =
|
Evas_Image_Load_Func evas_image_load_svg_func =
|
||||||
{
|
{
|
||||||
|
EINA_FALSE,
|
||||||
evas_image_load_file_head_svg,
|
evas_image_load_file_head_svg,
|
||||||
evas_image_load_file_data_svg
|
evas_image_load_file_data_svg
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,6 +18,7 @@ static Eina_Bool evas_image_load_file_data_tiff(Image_Entry *ie, const char *fil
|
||||||
|
|
||||||
static Evas_Image_Load_Func evas_image_load_tiff_func =
|
static Evas_Image_Load_Func evas_image_load_tiff_func =
|
||||||
{
|
{
|
||||||
|
EINA_TRUE,
|
||||||
evas_image_load_file_head_tiff,
|
evas_image_load_file_head_tiff,
|
||||||
evas_image_load_file_data_tiff
|
evas_image_load_file_data_tiff
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,6 +15,7 @@ static Eina_Bool evas_image_load_file_data_xpm(Image_Entry *ie, const char *file
|
||||||
|
|
||||||
static Evas_Image_Load_Func evas_image_load_xpm_func =
|
static Evas_Image_Load_Func evas_image_load_xpm_func =
|
||||||
{
|
{
|
||||||
|
EINA_FALSE,
|
||||||
evas_image_load_file_head_xpm,
|
evas_image_load_file_head_xpm,
|
||||||
evas_image_load_file_data_xpm
|
evas_image_load_file_data_xpm
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue