summaryrefslogtreecommitdiff
path: root/legacy/evas/src/lib/engines/common
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2008-12-02 02:32:22 +0000
committerCarsten Haitzler <raster@rasterman.com>2008-12-02 02:32:22 +0000
commit72c25fd2fc3f44205f85f77867c77358c7ab57db (patch)
tree06ae815f9e2126eb794b8c7252cc466c456c874d /legacy/evas/src/lib/engines/common
parent1a897239c71ad8af78dbf80f058a4351e19aaae0 (diff)
quick - evas scalecache put this in svn do i dont lose my patch. i'll revert
and work on gettign the leak fixed. SVN revision: 37898
Diffstat (limited to '')
-rw-r--r--legacy/evas/src/lib/engines/common/evas_image_load.c4
-rw-r--r--legacy/evas/src/lib/engines/common/evas_image_main.c31
-rw-r--r--legacy/evas/src/lib/engines/common/evas_scale_sample.c5
3 files changed, 37 insertions, 3 deletions
diff --git a/legacy/evas/src/lib/engines/common/evas_image_load.c b/legacy/evas/src/lib/engines/common/evas_image_load.c
index 27b2eef786..8d0a94c21b 100644
--- a/legacy/evas/src/lib/engines/common/evas_image_load.c
+++ b/legacy/evas/src/lib/engines/common/evas_image_load.c
@@ -43,6 +43,10 @@ evas_common_load_rgba_image_module_from_file(Image_Entry *ie)
43 char *dot; 43 char *dot;
44 int i; 44 int i;
45 45
46 if (ie->info.loader)
47 {
48 if (!evas_common_load_rgba_image_data_from_file(ie)) return 0;
49 }
46 dot = strrchr (ie->file, '.'); 50 dot = strrchr (ie->file, '.');
47 if (dot) 51 if (dot)
48 { 52 {
diff --git a/legacy/evas/src/lib/engines/common/evas_image_main.c b/legacy/evas/src/lib/engines/common/evas_image_main.c
index 438cfc68b2..623aaa04bc 100644
--- a/legacy/evas/src/lib/engines/common/evas_image_main.c
+++ b/legacy/evas/src/lib/engines/common/evas_image_main.c
@@ -405,7 +405,36 @@ EAPI void
405evas_common_image_set_cache(int size) 405evas_common_image_set_cache(int size)
406{ 406{
407 if (eci != NULL) 407 if (eci != NULL)
408 evas_cache_image_set(eci, size); 408 {
409 Evas_Cache_Image *cache = eci;
410
411 evas_cache_image_set(eci, size);
412 while (cache->scaledmem > (cache->limit >> 2))
413 {
414 Eina_List *l;
415 Image_Entry *ie;
416
417 l = eina_list_last(cache->scaled);
418 while (l)
419 {
420 ie = l->data;
421 if (ie->scalecache.parent) break;
422 l = l->prev;
423 }
424 if (!l)
425 {
426 break;
427 }
428 ie->scalecache.parent->scalecache.mem -= ie->scalecache.dst_w * ie->scalecache.dst_h;
429 cache->scaledmem -= ie->scalecache.dst_w * ie->scalecache.dst_h;
430 cache->scaled =
431 eina_list_remove_list(cache->scaled, l);
432 ie->scalecache.parent->scalecache.others =
433 eina_list_remove(ie->scalecache.parent->scalecache.others, ie);
434 ie->scalecache.parent = NULL;
435 evas_cache_image_drop(ie);
436 }
437 }
409} 438}
410 439
411EAPI int 440EAPI int
diff --git a/legacy/evas/src/lib/engines/common/evas_scale_sample.c b/legacy/evas/src/lib/engines/common/evas_scale_sample.c
index 0d57717760..a1c3d6b022 100644
--- a/legacy/evas/src/lib/engines/common/evas_scale_sample.c
+++ b/legacy/evas/src/lib/engines/common/evas_scale_sample.c
@@ -271,9 +271,10 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
271 /* scale to dst */ 271 /* scale to dst */
272 dptr = dst_ptr; 272 dptr = dst_ptr;
273#ifdef DIRECT_SCALE 273#ifdef DIRECT_SCALE
274 if ((!src->cache_entry.flags.alpha) && 274 if ((dc->render_op == _EVAS_RENDER_COPY) ||
275 ((!src->cache_entry.flags.alpha) &&
275 (!dst->cache_entry.flags.alpha) && 276 (!dst->cache_entry.flags.alpha) &&
276 (!dc->mul.use)) 277 (!dc->mul.use)))
277 { 278 {
278 for (y = 0; y < dst_clip_h; y++) 279 for (y = 0; y < dst_clip_h; y++)
279 { 280 {