diff options
author | Jean-Philippe Andre <jp.andre@samsung.com> | 2013-08-26 19:59:24 +0900 |
---|---|---|
committer | Jean-Philippe Andre <jp.andre@samsung.com> | 2013-10-28 15:47:14 +0900 |
commit | 7bf4394198cb6803613200f055c09d32a7256853 (patch) | |
tree | dd086b773950b8e0048670063ba77a5816950f4f /src/lib/evas/cache2 | |
parent | 45456f8cf0a35bc997f2edd435ff34ec9f6abb81 (diff) |
evas/cserve2: Rename _evas_cache_ to _evas_cache2_
Diffstat (limited to 'src/lib/evas/cache2')
-rw-r--r-- | src/lib/evas/cache2/evas_cache2.c | 134 |
1 files changed, 67 insertions, 67 deletions
diff --git a/src/lib/evas/cache2/evas_cache2.c b/src/lib/evas/cache2/evas_cache2.c index 77585abe47..1a033b5453 100644 --- a/src/lib/evas/cache2/evas_cache2.c +++ b/src/lib/evas/cache2/evas_cache2.c | |||
@@ -33,23 +33,23 @@ | |||
33 | // Default LRU size. If 0, all scaled images will be dropped instantly. | 33 | // Default LRU size. If 0, all scaled images will be dropped instantly. |
34 | #define DEFAULT_CACHE_LRU_SIZE (4*1024*1024) | 34 | #define DEFAULT_CACHE_LRU_SIZE (4*1024*1024) |
35 | 35 | ||
36 | static void _evas_cache_image_dirty_add(Image_Entry *im); | 36 | static void _evas_cache2_image_dirty_add(Image_Entry *im); |
37 | static void _evas_cache_image_dirty_del(Image_Entry *im); | 37 | static void _evas_cache2_image_dirty_del(Image_Entry *im); |
38 | static void _evas_cache_image_activ_add(Image_Entry *im); | 38 | static void _evas_cache2_image_activ_add(Image_Entry *im); |
39 | static void _evas_cache_image_activ_del(Image_Entry *im); | 39 | static void _evas_cache2_image_activ_del(Image_Entry *im); |
40 | static void _evas_cache_image_lru_add(Image_Entry *im); | 40 | static void _evas_cache2_image_lru_add(Image_Entry *im); |
41 | static void _evas_cache_image_lru_del(Image_Entry *im); | 41 | static void _evas_cache2_image_lru_del(Image_Entry *im); |
42 | static void _evas_cache2_image_entry_preload_remove(Image_Entry *ie, const void *target); | 42 | static void _evas_cache2_image_entry_preload_remove(Image_Entry *ie, const void *target); |
43 | // static void _evas_cache_image_lru_nodata_add(Image_Entry *im); | 43 | // static void _evas_cache2_image_lru_nodata_add(Image_Entry *im); |
44 | // static void _evas_cache_image_lru_nodata_del(Image_Entry *im); | 44 | // static void _evas_cache2_image_lru_nodata_del(Image_Entry *im); |
45 | 45 | ||
46 | static void | 46 | static void |
47 | _evas_cache_image_dirty_add(Image_Entry *im) | 47 | _evas_cache2_image_dirty_add(Image_Entry *im) |
48 | { | 48 | { |
49 | if (im->flags.dirty) return; | 49 | if (im->flags.dirty) return; |
50 | _evas_cache_image_activ_del(im); | 50 | _evas_cache2_image_activ_del(im); |
51 | _evas_cache_image_lru_del(im); | 51 | _evas_cache2_image_lru_del(im); |
52 | // _evas_cache_image_lru_nodata_del(im); | 52 | // _evas_cache2_image_lru_nodata_del(im); |
53 | im->flags.dirty = 1; | 53 | im->flags.dirty = 1; |
54 | im->flags.cached = 1; | 54 | im->flags.cached = 1; |
55 | im->cache2->dirty = eina_inlist_prepend(im->cache2->dirty, EINA_INLIST_GET(im)); | 55 | im->cache2->dirty = eina_inlist_prepend(im->cache2->dirty, EINA_INLIST_GET(im)); |
@@ -61,7 +61,7 @@ _evas_cache_image_dirty_add(Image_Entry *im) | |||
61 | } | 61 | } |
62 | 62 | ||
63 | static void | 63 | static void |
64 | _evas_cache_image_dirty_del(Image_Entry *im) | 64 | _evas_cache2_image_dirty_del(Image_Entry *im) |
65 | { | 65 | { |
66 | if (!im->flags.dirty) return; | 66 | if (!im->flags.dirty) return; |
67 | if (!im->cache2) return; | 67 | if (!im->cache2) return; |
@@ -71,12 +71,12 @@ _evas_cache_image_dirty_del(Image_Entry *im) | |||
71 | } | 71 | } |
72 | 72 | ||
73 | static void | 73 | static void |
74 | _evas_cache_image_activ_add(Image_Entry *im) | 74 | _evas_cache2_image_activ_add(Image_Entry *im) |
75 | { | 75 | { |
76 | if (im->flags.activ) return; | 76 | if (im->flags.activ) return; |
77 | _evas_cache_image_dirty_del(im); | 77 | _evas_cache2_image_dirty_del(im); |
78 | _evas_cache_image_lru_del(im); | 78 | _evas_cache2_image_lru_del(im); |
79 | // _evas_cache_image_lru_nodata_del(im); | 79 | // _evas_cache2_image_lru_nodata_del(im); |
80 | if (!im->cache_key) return; | 80 | if (!im->cache_key) return; |
81 | im->flags.activ = 1; | 81 | im->flags.activ = 1; |
82 | im->flags.cached = 1; | 82 | im->flags.cached = 1; |
@@ -84,7 +84,7 @@ _evas_cache_image_activ_add(Image_Entry *im) | |||
84 | } | 84 | } |
85 | 85 | ||
86 | static void | 86 | static void |
87 | _evas_cache_image_activ_del(Image_Entry *im) | 87 | _evas_cache2_image_activ_del(Image_Entry *im) |
88 | { | 88 | { |
89 | if (!im->flags.activ) return; | 89 | if (!im->flags.activ) return; |
90 | if (!im->cache_key) return; | 90 | if (!im->cache_key) return; |
@@ -94,12 +94,12 @@ _evas_cache_image_activ_del(Image_Entry *im) | |||
94 | } | 94 | } |
95 | 95 | ||
96 | static void | 96 | static void |
97 | _evas_cache_image_lru_add(Image_Entry *im) | 97 | _evas_cache2_image_lru_add(Image_Entry *im) |
98 | { | 98 | { |
99 | if (im->flags.lru) return; | 99 | if (im->flags.lru) return; |
100 | _evas_cache_image_dirty_del(im); | 100 | _evas_cache2_image_dirty_del(im); |
101 | _evas_cache_image_activ_del(im); | 101 | _evas_cache2_image_activ_del(im); |
102 | // _evas_cache_image_lru_nodata_del(im); | 102 | // _evas_cache2_image_lru_nodata_del(im); |
103 | if (!im->cache_key) return; | 103 | if (!im->cache_key) return; |
104 | im->flags.lru = 1; | 104 | im->flags.lru = 1; |
105 | im->flags.cached = 1; | 105 | im->flags.cached = 1; |
@@ -109,7 +109,7 @@ _evas_cache_image_lru_add(Image_Entry *im) | |||
109 | } | 109 | } |
110 | 110 | ||
111 | static void | 111 | static void |
112 | _evas_cache_image_lru_del(Image_Entry *im) | 112 | _evas_cache2_image_lru_del(Image_Entry *im) |
113 | { | 113 | { |
114 | if (!im->flags.lru) return; | 114 | if (!im->flags.lru) return; |
115 | if (!im->cache_key) return; | 115 | if (!im->cache_key) return; |
@@ -122,19 +122,19 @@ _evas_cache_image_lru_del(Image_Entry *im) | |||
122 | 122 | ||
123 | /* | 123 | /* |
124 | static void | 124 | static void |
125 | _evas_cache_image_lru_nodata_add(Image_Entry *im) | 125 | _evas_cache2_image_lru_nodata_add(Image_Entry *im) |
126 | { | 126 | { |
127 | if (im->flags.lru_nodata) return; | 127 | if (im->flags.lru_nodata) return; |
128 | _evas_cache_image_dirty_del(im); | 128 | _evas_cache2_image_dirty_del(im); |
129 | _evas_cache_image_activ_del(im); | 129 | _evas_cache2_image_activ_del(im); |
130 | _evas_cache_image_lru_del(im); | 130 | _evas_cache2_image_lru_del(im); |
131 | im->flags.lru = 1; | 131 | im->flags.lru = 1; |
132 | im->flags.cached = 1; | 132 | im->flags.cached = 1; |
133 | im->cache2->lru_nodata = eina_inlist_prepend(im->cache2->lru_nodata, EINA_INLIST_GET(im)); | 133 | im->cache2->lru_nodata = eina_inlist_prepend(im->cache2->lru_nodata, EINA_INLIST_GET(im)); |
134 | } | 134 | } |
135 | 135 | ||
136 | static void | 136 | static void |
137 | _evas_cache_image_lru_nodata_del(Image_Entry *im) | 137 | _evas_cache2_image_lru_nodata_del(Image_Entry *im) |
138 | { | 138 | { |
139 | if (!im->flags.lru_nodata) return; | 139 | if (!im->flags.lru_nodata) return; |
140 | im->flags.lru = 0; | 140 | im->flags.lru = 0; |
@@ -177,7 +177,7 @@ _timestamp_build(Image_Timestamp *tstamp, struct stat *st) | |||
177 | } | 177 | } |
178 | 178 | ||
179 | static void | 179 | static void |
180 | _evas_cache_image_entry_delete(Evas_Cache2 *cache, Image_Entry *ie) | 180 | _evas_cache2_image_entry_delete(Evas_Cache2 *cache, Image_Entry *ie) |
181 | { | 181 | { |
182 | if (!ie) return; | 182 | if (!ie) return; |
183 | 183 | ||
@@ -191,10 +191,10 @@ _evas_cache_image_entry_delete(Evas_Cache2 *cache, Image_Entry *ie) | |||
191 | return; | 191 | return; |
192 | } | 192 | } |
193 | 193 | ||
194 | _evas_cache_image_dirty_del(ie); | 194 | _evas_cache2_image_dirty_del(ie); |
195 | _evas_cache_image_activ_del(ie); | 195 | _evas_cache2_image_activ_del(ie); |
196 | _evas_cache_image_lru_del(ie); | 196 | _evas_cache2_image_lru_del(ie); |
197 | // _evas_cache_image_lru_nodata_del(ie); | 197 | // _evas_cache2_image_lru_nodata_del(ie); |
198 | 198 | ||
199 | 199 | ||
200 | if (ie->data1) | 200 | if (ie->data1) |
@@ -220,7 +220,7 @@ _evas_cache_image_entry_delete(Evas_Cache2 *cache, Image_Entry *ie) | |||
220 | } | 220 | } |
221 | 221 | ||
222 | static Image_Entry * | 222 | static Image_Entry * |
223 | _evas_cache_image_entry_new(Evas_Cache2 *cache, | 223 | _evas_cache2_image_entry_new(Evas_Cache2 *cache, |
224 | const char *hkey, | 224 | const char *hkey, |
225 | Image_Timestamp *tstamp, | 225 | Image_Timestamp *tstamp, |
226 | const char *file, | 226 | const char *file, |
@@ -264,15 +264,15 @@ _evas_cache_image_entry_new(Evas_Cache2 *cache, | |||
264 | { | 264 | { |
265 | ERR("couldn't load '%s' '%s' with cserve2!", | 265 | ERR("couldn't load '%s' '%s' with cserve2!", |
266 | ie->file, ie->key ? ie->key : ""); | 266 | ie->file, ie->key ? ie->key : ""); |
267 | _evas_cache_image_entry_delete(cache, ie); | 267 | _evas_cache2_image_entry_delete(cache, ie); |
268 | if (error) | 268 | if (error) |
269 | *error = EVAS_LOAD_ERROR_GENERIC; | 269 | *error = EVAS_LOAD_ERROR_GENERIC; |
270 | return NULL; | 270 | return NULL; |
271 | } | 271 | } |
272 | } | 272 | } |
273 | 273 | ||
274 | if (ie->cache_key) _evas_cache_image_activ_add(ie); | 274 | if (ie->cache_key) _evas_cache2_image_activ_add(ie); |
275 | else _evas_cache_image_dirty_add(ie); | 275 | else _evas_cache2_image_dirty_add(ie); |
276 | 276 | ||
277 | if (error) | 277 | if (error) |
278 | *error = EVAS_LOAD_ERROR_NONE; | 278 | *error = EVAS_LOAD_ERROR_NONE; |
@@ -319,7 +319,7 @@ _evas_cache2_image_preloaded_cb(void *data, Eina_Bool success) | |||
319 | } | 319 | } |
320 | 320 | ||
321 | if (ie->flags.delete_me) | 321 | if (ie->flags.delete_me) |
322 | _evas_cache_image_entry_delete(ie->cache2, ie); | 322 | _evas_cache2_image_entry_delete(ie->cache2, ie); |
323 | } | 323 | } |
324 | 324 | ||
325 | static Eina_Bool | 325 | static Eina_Bool |
@@ -393,7 +393,7 @@ evas_cache2_image_copied_data(Evas_Cache2 *cache, unsigned int w, unsigned int h | |||
393 | (cspace == EVAS_COLORSPACE_YCBCR422601_PL)) | 393 | (cspace == EVAS_COLORSPACE_YCBCR422601_PL)) |
394 | w &= ~0x1; | 394 | w &= ~0x1; |
395 | 395 | ||
396 | im = _evas_cache_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, NULL); | 396 | im = _evas_cache2_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, NULL); |
397 | if (!im) | 397 | if (!im) |
398 | return NULL; | 398 | return NULL; |
399 | 399 | ||
@@ -402,7 +402,7 @@ evas_cache2_image_copied_data(Evas_Cache2 *cache, unsigned int w, unsigned int h | |||
402 | evas_cache2_image_surface_alloc(im, w, h); | 402 | evas_cache2_image_surface_alloc(im, w, h); |
403 | if (cache->func.copied_data(im, w, h, image_data, alpha, cspace) != 0) | 403 | if (cache->func.copied_data(im, w, h, image_data, alpha, cspace) != 0) |
404 | { | 404 | { |
405 | _evas_cache_image_entry_delete(cache, im); | 405 | _evas_cache2_image_entry_delete(cache, im); |
406 | return NULL; | 406 | return NULL; |
407 | } | 407 | } |
408 | 408 | ||
@@ -423,14 +423,14 @@ evas_cache2_image_data(Evas_Cache2 *cache, unsigned int w, unsigned int h, DATA3 | |||
423 | (cspace == EVAS_COLORSPACE_YCBCR422601_PL)) | 423 | (cspace == EVAS_COLORSPACE_YCBCR422601_PL)) |
424 | w &= ~0x1; | 424 | w &= ~0x1; |
425 | 425 | ||
426 | im = _evas_cache_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, NULL); | 426 | im = _evas_cache2_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, NULL); |
427 | if (!im) return NULL; | 427 | if (!im) return NULL; |
428 | im->w = w; | 428 | im->w = w; |
429 | im->h = h; | 429 | im->h = h; |
430 | im->flags.alpha = alpha; | 430 | im->flags.alpha = alpha; |
431 | if (cache->func.data(im, w, h, image_data, alpha, cspace) != 0) | 431 | if (cache->func.data(im, w, h, image_data, alpha, cspace) != 0) |
432 | { | 432 | { |
433 | _evas_cache_image_entry_delete(cache, im); | 433 | _evas_cache2_image_entry_delete(cache, im); |
434 | return NULL; | 434 | return NULL; |
435 | } | 435 | } |
436 | im->references = 1; | 436 | im->references = 1; |
@@ -444,7 +444,7 @@ evas_cache2_image_empty(Evas_Cache2 *cache) | |||
444 | { | 444 | { |
445 | Image_Entry *im; | 445 | Image_Entry *im; |
446 | 446 | ||
447 | im = _evas_cache_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, NULL); | 447 | im = _evas_cache2_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, NULL); |
448 | if (!im) | 448 | if (!im) |
449 | return NULL; | 449 | return NULL; |
450 | 450 | ||
@@ -467,7 +467,7 @@ evas_cache2_image_size_set(Image_Entry *im, unsigned int w, unsigned h) | |||
467 | if ((im->w == w) && (im->h == h)) return im; | 467 | if ((im->w == w) && (im->h == h)) return im; |
468 | 468 | ||
469 | cache = im->cache2; | 469 | cache = im->cache2; |
470 | im2 = _evas_cache_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, | 470 | im2 = _evas_cache2_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, |
471 | NULL); | 471 | NULL); |
472 | if (!im2) goto on_error; | 472 | if (!im2) goto on_error; |
473 | 473 | ||
@@ -486,7 +486,7 @@ evas_cache2_image_size_set(Image_Entry *im, unsigned int w, unsigned h) | |||
486 | 486 | ||
487 | on_error: | 487 | on_error: |
488 | if (im2) | 488 | if (im2) |
489 | _evas_cache_image_entry_delete(cache, im2); | 489 | _evas_cache2_image_entry_delete(cache, im2); |
490 | return NULL; | 490 | return NULL; |
491 | } | 491 | } |
492 | 492 | ||
@@ -510,7 +510,7 @@ evas_cache2_init(const Evas_Cache2_Image_Func *cb) | |||
510 | } | 510 | } |
511 | 511 | ||
512 | static Eina_Bool | 512 | static Eina_Bool |
513 | _evas_cache_image_free_cb(EINA_UNUSED const Eina_Hash *hash, EINA_UNUSED const void *key, void *data, void *fdata) | 513 | _evas_cache2_image_free_cb(EINA_UNUSED const Eina_Hash *hash, EINA_UNUSED const void *key, void *data, void *fdata) |
514 | { | 514 | { |
515 | Eina_List **delete_list = fdata; | 515 | Eina_List **delete_list = fdata; |
516 | *delete_list = eina_list_prepend(*delete_list, data); | 516 | *delete_list = eina_list_prepend(*delete_list, data); |
@@ -526,20 +526,20 @@ evas_cache2_shutdown(Evas_Cache2 *cache) | |||
526 | while (cache->lru) | 526 | while (cache->lru) |
527 | { | 527 | { |
528 | im = (Image_Entry *)cache->lru; | 528 | im = (Image_Entry *)cache->lru; |
529 | _evas_cache_image_entry_delete(cache, im); | 529 | _evas_cache2_image_entry_delete(cache, im); |
530 | } | 530 | } |
531 | /* This is mad, I am about to destroy image still alive, but we need to prevent leak. */ | 531 | /* This is mad, I am about to destroy image still alive, but we need to prevent leak. */ |
532 | while (cache->dirty) | 532 | while (cache->dirty) |
533 | { | 533 | { |
534 | im = (Image_Entry *)cache->dirty; | 534 | im = (Image_Entry *)cache->dirty; |
535 | _evas_cache_image_entry_delete(cache, im); | 535 | _evas_cache2_image_entry_delete(cache, im); |
536 | } | 536 | } |
537 | 537 | ||
538 | delete_list = NULL; | 538 | delete_list = NULL; |
539 | eina_hash_foreach(cache->activ, _evas_cache_image_free_cb, &delete_list); | 539 | eina_hash_foreach(cache->activ, _evas_cache2_image_free_cb, &delete_list); |
540 | while (delete_list) | 540 | while (delete_list) |
541 | { | 541 | { |
542 | _evas_cache_image_entry_delete(cache, eina_list_data_get(delete_list)); | 542 | _evas_cache2_image_entry_delete(cache, eina_list_data_get(delete_list)); |
543 | delete_list = eina_list_remove_list(delete_list, delete_list); | 543 | delete_list = eina_list_remove_list(delete_list, delete_list); |
544 | } | 544 | } |
545 | 545 | ||
@@ -701,7 +701,7 @@ evas_cache2_image_open(Evas_Cache2 *cache, const char *path, const char *key, | |||
701 | * of an image at a given key. we wither find it and keep re-reffing | 701 | * of an image at a given key. we wither find it and keep re-reffing |
702 | * it or we dirty it and get it out */ | 702 | * it or we dirty it and get it out */ |
703 | DBG("Entry on inactive hash was invalid (file changed or deleted)."); | 703 | DBG("Entry on inactive hash was invalid (file changed or deleted)."); |
704 | _evas_cache_image_dirty_add(im); | 704 | _evas_cache2_image_dirty_add(im); |
705 | im = NULL; | 705 | im = NULL; |
706 | } | 706 | } |
707 | 707 | ||
@@ -727,15 +727,15 @@ evas_cache2_image_open(Evas_Cache2 *cache, const char *path, const char *key, | |||
727 | if (ok) | 727 | if (ok) |
728 | { | 728 | { |
729 | /* remove from lru and make it active again */ | 729 | /* remove from lru and make it active again */ |
730 | _evas_cache_image_lru_del(im); | 730 | _evas_cache2_image_lru_del(im); |
731 | _evas_cache_image_activ_add(im); | 731 | _evas_cache2_image_activ_add(im); |
732 | goto on_ok; | 732 | goto on_ok; |
733 | } | 733 | } |
734 | DBG("Entry on inactive hash was invalid (file changed or deleted)."); | 734 | DBG("Entry on inactive hash was invalid (file changed or deleted)."); |
735 | /* as avtive cache find - if we match in lru and its invalid, dirty */ | 735 | /* as avtive cache find - if we match in lru and its invalid, dirty */ |
736 | _evas_cache_image_dirty_add(im); | 736 | _evas_cache2_image_dirty_add(im); |
737 | /* this image never used, so it have to be deleted */ | 737 | /* this image never used, so it have to be deleted */ |
738 | _evas_cache_image_entry_delete(cache, im); | 738 | _evas_cache2_image_entry_delete(cache, im); |
739 | im = NULL; | 739 | im = NULL; |
740 | } | 740 | } |
741 | if (stat_failed) goto on_stat_error; | 741 | if (stat_failed) goto on_stat_error; |
@@ -746,7 +746,7 @@ evas_cache2_image_open(Evas_Cache2 *cache, const char *path, const char *key, | |||
746 | } | 746 | } |
747 | _timestamp_build(&tstamp, &st); | 747 | _timestamp_build(&tstamp, &st); |
748 | DBG("Creating a new entry for key '%s'.", hkey); | 748 | DBG("Creating a new entry for key '%s'.", hkey); |
749 | im = _evas_cache_image_entry_new(cache, hkey, &tstamp, path, key, | 749 | im = _evas_cache2_image_entry_new(cache, hkey, &tstamp, path, key, |
750 | lo, error); | 750 | lo, error); |
751 | if (!im) goto on_stat_error; | 751 | if (!im) goto on_stat_error; |
752 | 752 | ||
@@ -777,7 +777,7 @@ on_stat_error: | |||
777 | else | 777 | else |
778 | *error = EVAS_LOAD_ERROR_GENERIC; | 778 | *error = EVAS_LOAD_ERROR_GENERIC; |
779 | 779 | ||
780 | if (im) _evas_cache_image_entry_delete(cache, im); | 780 | if (im) _evas_cache2_image_entry_delete(cache, im); |
781 | return NULL; | 781 | return NULL; |
782 | } | 782 | } |
783 | 783 | ||
@@ -844,8 +844,8 @@ _scaled_image_find(Image_Entry *im, int src_x, int src_y, int src_w, int src_h, | |||
844 | if (!ret) return NULL; | 844 | if (!ret) return NULL; |
845 | 845 | ||
846 | /* Remove from lru and make it active again */ | 846 | /* Remove from lru and make it active again */ |
847 | _evas_cache_image_lru_del(ret); | 847 | _evas_cache2_image_lru_del(ret); |
848 | _evas_cache_image_activ_add(ret); | 848 | _evas_cache2_image_activ_add(ret); |
849 | 849 | ||
850 | found: | 850 | found: |
851 | ret->references++; | 851 | ret->references++; |
@@ -905,13 +905,13 @@ evas_cache2_image_scale_load(Image_Entry *im, | |||
905 | evas_cache2_image_cache_key_create(hkey, im->file, pathlen, | 905 | evas_cache2_image_cache_key_create(hkey, im->file, pathlen, |
906 | im->key, keylen, &lo); | 906 | im->key, keylen, &lo); |
907 | 907 | ||
908 | ret = _evas_cache_image_entry_new(im->cache2, hkey, NULL, im->file, im->key, | 908 | ret = _evas_cache2_image_entry_new(im->cache2, hkey, NULL, im->file, im->key, |
909 | &lo, &error); | 909 | &lo, &error); |
910 | if (error != EVAS_LOAD_ERROR_NONE) | 910 | if (error != EVAS_LOAD_ERROR_NONE) |
911 | { | 911 | { |
912 | ERR("Failed to create scale image entry with error code %d.", error); | 912 | ERR("Failed to create scale image entry with error code %d.", error); |
913 | 913 | ||
914 | if (ret) _evas_cache_image_entry_delete(im->cache2, ret); | 914 | if (ret) _evas_cache2_image_entry_delete(im->cache2, ret); |
915 | goto parent_out; | 915 | goto parent_out; |
916 | } | 916 | } |
917 | 917 | ||
@@ -957,11 +957,11 @@ evas_cache2_image_close(Image_Entry *im) | |||
957 | 957 | ||
958 | if (im->flags.dirty) | 958 | if (im->flags.dirty) |
959 | { | 959 | { |
960 | _evas_cache_image_entry_delete(cache, im); | 960 | _evas_cache2_image_entry_delete(cache, im); |
961 | return; | 961 | return; |
962 | } | 962 | } |
963 | 963 | ||
964 | _evas_cache_image_lru_add(im); | 964 | _evas_cache2_image_lru_add(im); |
965 | if (cache) | 965 | if (cache) |
966 | evas_cache2_flush(cache); | 966 | evas_cache2_flush(cache); |
967 | } | 967 | } |
@@ -1067,7 +1067,7 @@ evas_cache2_image_writable(Image_Entry *im) | |||
1067 | if (!im->cache_key) | 1067 | if (!im->cache_key) |
1068 | { | 1068 | { |
1069 | if (!im->flags.dirty) | 1069 | if (!im->flags.dirty) |
1070 | _evas_cache_image_dirty_add(im); | 1070 | _evas_cache2_image_dirty_add(im); |
1071 | return im; | 1071 | return im; |
1072 | } | 1072 | } |
1073 | 1073 | ||
@@ -1082,7 +1082,7 @@ evas_cache2_image_writable(Image_Entry *im) | |||
1082 | 1082 | ||
1083 | on_error: | 1083 | on_error: |
1084 | if (im2) | 1084 | if (im2) |
1085 | _evas_cache_image_entry_delete(cache, im2); | 1085 | _evas_cache2_image_entry_delete(cache, im2); |
1086 | return NULL; | 1086 | return NULL; |
1087 | } | 1087 | } |
1088 | 1088 | ||
@@ -1095,7 +1095,7 @@ evas_cache2_image_dirty(Image_Entry *im, unsigned int x, unsigned int y, unsigne | |||
1095 | if (!im->cache_key) | 1095 | if (!im->cache_key) |
1096 | { | 1096 | { |
1097 | if (!im->flags.dirty) | 1097 | if (!im->flags.dirty) |
1098 | _evas_cache_image_dirty_add(im); | 1098 | _evas_cache2_image_dirty_add(im); |
1099 | im2 = im; | 1099 | im2 = im; |
1100 | } | 1100 | } |
1101 | else | 1101 | else |
@@ -1130,7 +1130,7 @@ evas_cache2_flush(Evas_Cache2 *cache) | |||
1130 | 1130 | ||
1131 | im = (Image_Entry *)cache->lru->last; | 1131 | im = (Image_Entry *)cache->lru->last; |
1132 | DBG("Remove unused entry from cache."); | 1132 | DBG("Remove unused entry from cache."); |
1133 | _evas_cache_image_entry_delete(cache, im); | 1133 | _evas_cache2_image_entry_delete(cache, im); |
1134 | } | 1134 | } |
1135 | 1135 | ||
1136 | return cache->usage; | 1136 | return cache->usage; |