evas/cserve2: Fix animated Gifs support with cs2

cserve2 does not support animated Gifs, as the animated icon
logic doesn't match cserve2 logic.
Also, there is probably no need to cache these into shared
buffers anyways :)

Solution: fallback to normal cache (and delete current entry in
the client)
This commit is contained in:
Jean-Philippe Andre 2013-09-27 14:46:48 +09:00
parent f18b71d515
commit 9bb52372bd
3 changed files with 7 additions and 32 deletions

View File

@ -966,7 +966,7 @@ evas_cache2_image_close(Image_Entry *im)
if (references > 0)
return;
if (im->flags.dirty)
if (im->flags.dirty || im->animated.animated)
{
_evas_cache2_image_entry_delete(cache, im);
return;

View File

@ -243,18 +243,10 @@ evas_common_load_rgba_image_module_from_file(Image_Entry *ie)
struct evas_image_foreach_loader_data fdata;
#ifdef EVAS_CSERVE2
if (evas_cserve2_use_get())
{
ERR("This function shouldn't be called anymore!");
// DBG("try cserve2 '%s' '%s'", ie->file, ie->key ? ie->key : "");
// if (evas_cserve2_image_load(ie, ie->file, ie->key, &(ie->load_opts)))
// {
// DBG("try cserve2 '%s' '%s' loaded!",
// ie->file, ie->key ? ie->key : "");
// return EVAS_LOAD_ERROR_NONE;
// }
}
if (evas_cserve2_use_get() && evas_cache2_image_cached(ie))
CRIT("This function shouldn't be called anymore!");
#endif
if (ie->f)
{
len = strlen(eina_file_filename_get(ie->f));
@ -368,25 +360,8 @@ evas_common_load_rgba_image_data_from_file(Image_Entry *ie)
if ((ie->flags.loaded) && (!ie->animated.animated)) return EVAS_LOAD_ERROR_GENERIC;
#ifdef EVAS_CSERVE2
if (ie->data1)
{
ERR("This function shouldn't be called anymore!");
// DBG("try cserve2 image data '%s' '%s'",
// ie->file, ie->key ? ie->key : "");
// if (evas_cserve2_image_data_load(ie))
// {
// RGBA_Image *im = (RGBA_Image *)ie;
// im->image.data = evas_cserve2_image_data_get(ie);
// DBG("try cserve2 image data '%s' '%s' loaded!",
// ie->file, ie->key ? ie->key : "");
// if (im->image.data)
// {
// im->image.no_free = 1;
// return EVAS_LOAD_ERROR_NONE;
// }
// }
// return EVAS_LOAD_ERROR_GENERIC;
}
if (evas_cserve2_use_get() && evas_cache2_image_cached(ie))
CRIT("This function shouldn't be called anymore!");
#endif
if (!ie->info.module) return EVAS_LOAD_ERROR_GENERIC;

View File

@ -663,7 +663,7 @@ evas_common_rgba_image_scalecache_do_cbs(Image_Entry *ie, RGBA_Image *dst,
if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888)
{
#ifdef EVAS_CSERVE2
if (evas_cserve2_use_get())
if (evas_cserve2_use_get() && evas_cache2_image_cached(&im->cache_entry))
evas_cache2_image_load_data(&im->cache_entry);
else
#endif