ok = 1;
t = time(NULL);
-
if ((t - im->laststat) > STAT_GAP)
{
stat_done = 1;
}
im = _evas_cache_image_entry_new(cache, hkey, st.st_mtime, file, key, lo, error);
- if (!im)
- return NULL;
+ if (!im) return NULL;
if (cache->func.debug)
cache->func.debug("request", im);
{
int error;
+ im_dirty = evas_cache_image_copied_data
+ (cache, im->w, im->h,
+ evas_cache_image_pixels(im),
+ im->flags.alpha,
+ im->space);
+ if (!im_dirty) goto on_error;
+ if (cache->func.debug)
+ cache->func.debug("dirty-src", im);
+ error = cache->func.dirty(im_dirty, im);
+ if (cache->func.debug)
+ cache->func.debug("dirty-out", im_dirty);
+/*
im_dirty = _evas_cache_image_entry_new(cache, NULL, im->timestamp, im->file, im->key, &im->load_opts, &error);
if (!im_dirty) goto on_error;
cache->func.debug("dirty-out", im_dirty);
if (error != 0) goto on_error;
-
+ */
im_dirty->references = 1;
evas_cache_image_drop(im);
{
int error;
+ im_dirty = evas_cache_image_copied_data
+ (cache, im->w, im->h,
+ evas_cache_image_pixels(im),
+ im->flags.alpha,
+ im->space);
+ if (!im_dirty) goto on_error;
+ if (cache->func.debug)
+ cache->func.debug("dirty-src", im);
+ error = cache->func.dirty(im_dirty, im);
+ if (cache->func.debug)
+ cache->func.debug("dirty-out", im_dirty);
+/*
im_dirty = _evas_cache_image_entry_new(cache, NULL, im->timestamp, im->file, im->key, &im->load_opts, &error);
if (!im_dirty) goto on_error;
cache->func.debug("dirty-out", im_dirty);
if (error != 0) goto on_error;
-
+ */
im_dirty->references = 1;
evas_cache_image_drop(im);
MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
return;
MAGIC_CHECK_END();
+ if (dpi == o->load_opts.dpi) return;
o->load_opts.dpi = dpi;
if (o->cur.file)
{
MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
return;
MAGIC_CHECK_END();
+ if ((o->load_opts.w == w) && (o->load_opts.h == h)) return;
o->load_opts.w = w;
o->load_opts.h = h;
if (o->cur.file)
MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
return;
MAGIC_CHECK_END();
+ if (o->load_opts.scale_down_by == scale_down) return;
o->load_opts.scale_down_by = scale_down;
if (o->cur.file)
{
sci->usage = 0;
sci->usage_count = 0;
sci->populate_me = 0;
+ sci->smooth = smooth;
+ sci->forced_unload = 0;
sci->flop = 0;
sci->im = NULL;
sci->src_x = src_region_x;
sci->src_h = src_region_h;
sci->dst_w = dst_region_w;
sci->dst_h = dst_region_h;
- sci->smooth = smooth;
im->cache.list = eina_list_prepend(im->cache.list, sci);
return sci;
}
EAPI void
evas_common_rgba_image_scalecache_size_set(int size)
{
+#ifdef SCALECACHE
LKL(cache_lock);
if (size != max_cache_size)
{
_cache_prune(NULL, 1);
}
LKU(cache_lock);
+#endif
}
EAPI int
evas_common_rgba_image_scalecache_size_get(void)
{
+#ifdef SCALECACHE
int t;
LKL(cache_lock);
t = max_cache_size;
LKU(cache_lock);
return t;
+#else
+ return 0;
+#endif
}
EAPI void
evas_common_rgba_image_scalecache_flush(void)
{
+#ifdef SCALECACHE
int t;
LKL(cache_lock);
t = max_cache_size;
_cache_prune(NULL, 1);
max_cache_size = t;
LKU(cache_lock);
+#endif
}
EAPI void