free(cache);
}
+EAPI Eina_Bool
+evas_cache2_image_cached(Image_Entry *ie)
+{
+ if (!ie) return EINA_FALSE;
+ return (ie->cache2 != NULL);
+}
+
EAPI void
evas_cache2_image_cache_key_create(char *hkey, const char *path, size_t pathlen,
const char *key, size_t keylen,
EAPI Image_Entry * evas_cache2_image_dirty(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
EAPI Image_Entry * evas_cache2_image_empty(Evas_Cache2 *cache);
EAPI void evas_cache2_image_surface_alloc(Image_Entry *ie, int w, int h);
+EAPI Eina_Bool evas_cache2_image_cached(Image_Entry *ie);
EAPI int evas_cache2_flush(Evas_Cache2 *cache);
EAPI void evas_cache2_limit_set(Evas_Cache2 *cache, int limit);
*error = EVAS_LOAD_ERROR_NONE;
#ifdef EVAS_CSERVE2
// FIXME: Need to pass fd to make that useful, so just get the filename for now.
- if (evas_cserve2_use_get())
+ if (evas_cserve2_use_get() && !eina_file_virtual(f))
{
Image_Entry *ie;
ie = evas_cache2_image_open(evas_common_image_cache2_get(),
eng_image_free(void *data EINA_UNUSED, void *image)
{
#ifdef EVAS_CSERVE2
- if (evas_cserve2_use_get())
+ if (evas_cserve2_use_get() && evas_cache2_image_cached(image))
{
evas_cache2_image_close(image);
return;
Image_Entry *im = image;
if (!im) return NULL;
#ifdef EVAS_CSERVE2
- if (evas_cserve2_use_get())
+ if (evas_cserve2_use_get() && evas_cache2_image_cached(im))
return evas_cache2_image_size_set(im, w, h);
#endif
return evas_cache_image_size_set(im, w, h);
Image_Entry *im = image;
if (!im) return NULL;
#ifdef EVAS_CSERVE2
- if (evas_cserve2_use_get())
+ if (evas_cserve2_use_get() && evas_cache2_image_cached(im))
return evas_cache2_image_dirty(im, x, y, w, h);
#endif
return evas_cache_image_dirty(im, x, y, w, h);
im = image;
#ifdef EVAS_CSERVE2
- if (evas_cserve2_use_get())
+ if (evas_cserve2_use_get() && evas_cache2_image_cached(&im->cache_entry))
{
error = evas_cache2_image_load_data(&im->cache_entry);
if (err) *err = error;
if (!im) return;
#ifdef EVAS_CSERVE2
- if (evas_cserve2_use_get())
+ if (evas_cserve2_use_get() && evas_cache2_image_cached(&im->cache_entry))
{
evas_cache2_image_preload_data(&im->cache_entry, target);
return;
{
RGBA_Image *im = image;
#ifdef EVAS_CSERVE2
- if (evas_cserve2_use_get())
+ if (evas_cserve2_use_get() && evas_cache2_image_cached(&im->cache_entry))
return;
#endif