summaryrefslogtreecommitdiff
path: root/src/lib/evas/cache2
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@samsung.com>2013-05-07 10:50:57 +0900
committerCedric Bail <cedric.bail@samsung.com>2013-05-08 18:16:59 +0900
commitc3f9d3b8b8f2530923353beff4e67661a75f7614 (patch)
tree976fd19448c0ddf755686308335cd427e9ba6ae3 /src/lib/evas/cache2
parent559b1b33012d0577216303ebf127733bf80aea1d (diff)
evas: Make Evas_Loader API public.
Diffstat (limited to 'src/lib/evas/cache2')
-rw-r--r--src/lib/evas/cache2/evas_cache2.c15
-rw-r--r--src/lib/evas/cache2/evas_cache2.h2
2 files changed, 9 insertions, 8 deletions
diff --git a/src/lib/evas/cache2/evas_cache2.c b/src/lib/evas/cache2/evas_cache2.c
index e16c5cb880..a819e385ea 100644
--- a/src/lib/evas/cache2/evas_cache2.c
+++ b/src/lib/evas/cache2/evas_cache2.c
@@ -222,7 +222,7 @@ _evas_cache_image_entry_new(Evas_Cache2 *cache,
222 Image_Timestamp *tstamp, 222 Image_Timestamp *tstamp,
223 const char *file, 223 const char *file,
224 const char *key, 224 const char *key,
225 RGBA_Image_Loadopts *lo, 225 Evas_Image_Load_Opts *lo,
226 int *error) 226 int *error)
227{ 227{
228 Image_Entry *ie; 228 Image_Entry *ie;
@@ -534,7 +534,7 @@ evas_cache2_shutdown(Evas_Cache2 *cache)
534} 534}
535 535
536static void 536static void
537_create_hash_key(char *hkey, const char *path, size_t pathlen, const char *key, size_t keylen, RGBA_Image_Loadopts *lo) 537_create_hash_key(char *hkey, const char *path, size_t pathlen, const char *key, size_t keylen, Evas_Image_Load_Opts *lo)
538{ 538{
539 const char *ckey = "(null)"; 539 const char *ckey = "(null)";
540 size_t size; 540 size_t size;
@@ -618,7 +618,7 @@ _create_hash_key(char *hkey, const char *path, size_t pathlen, const char *key,
618} 618}
619 619
620EAPI Image_Entry * 620EAPI Image_Entry *
621evas_cache2_image_open(Evas_Cache2 *cache, const char *path, const char *key, RGBA_Image_Loadopts *lo, int *error) 621evas_cache2_image_open(Evas_Cache2 *cache, const char *path, const char *key, Evas_Image_Load_Opts *lo, int *error)
622{ 622{
623 size_t size; 623 size_t size;
624 size_t pathlen; 624 size_t pathlen;
@@ -628,8 +628,7 @@ evas_cache2_image_open(Evas_Cache2 *cache, const char *path, const char *key, RG
628 int stat_done = 0, stat_failed = 0; 628 int stat_done = 0, stat_failed = 0;
629 struct stat st; 629 struct stat st;
630 Image_Timestamp tstamp; 630 Image_Timestamp tstamp;
631 Evas_Image_Load_Opts prevent = { 0, 0.0, 0, 0, 0, { 0, 0, 0, 0 }, 631 Evas_Image_Load_Opts prevent;
632 { 0, 0, 0, 0, 0, 0, 0, 0 }, EINA_FALSE };
633 632
634 if ((!path) || ((!path) && (!key))) 633 if ((!path) || ((!path) && (!key)))
635 { 634 {
@@ -637,6 +636,8 @@ evas_cache2_image_open(Evas_Cache2 *cache, const char *path, const char *key, RG
637 return NULL; 636 return NULL;
638 } 637 }
639 638
639 memset(&prevent, 0, sizeof (Evas_Image_Load_Opts));
640
640 pathlen = strlen(path); 641 pathlen = strlen(path);
641 keylen = key ? strlen(key) : 6; 642 keylen = key ? strlen(key) : 6;
642 size = pathlen + keylen + HKEY_LOAD_OPTS_STR_LEN; 643 size = pathlen + keylen + HKEY_LOAD_OPTS_STR_LEN;
@@ -775,7 +776,7 @@ _scaled_image_find(Image_Entry *im, int src_x, int src_y, int src_w, int src_h,
775{ 776{
776 size_t pathlen, keylen, size; 777 size_t pathlen, keylen, size;
777 char *hkey; 778 char *hkey;
778 RGBA_Image_Loadopts lo; 779 Evas_Image_Load_Opts lo;
779 Image_Entry *ret; 780 Image_Entry *ret;
780 781
781 if (((!im->file) || ((!im->file) && (!im->key))) || (!im->data1) || 782 if (((!im->file) || ((!im->file) && (!im->key))) || (!im->data1) ||
@@ -837,7 +838,7 @@ evas_cache2_image_scale_load(Image_Entry *im, int src_x, int src_y, int src_w, i
837{ 838{
838 size_t pathlen, keylen, size; 839 size_t pathlen, keylen, size;
839 char *hkey; 840 char *hkey;
840 RGBA_Image_Loadopts lo; 841 Evas_Image_Load_Opts lo;
841 int error = EVAS_LOAD_ERROR_NONE; 842 int error = EVAS_LOAD_ERROR_NONE;
842 Image_Entry *ret; 843 Image_Entry *ret;
843 844
diff --git a/src/lib/evas/cache2/evas_cache2.h b/src/lib/evas/cache2/evas_cache2.h
index 5fddd1708e..f6ba8f881e 100644
--- a/src/lib/evas/cache2/evas_cache2.h
+++ b/src/lib/evas/cache2/evas_cache2.h
@@ -58,7 +58,7 @@ extern "C" {
58 58
59EAPI Evas_Cache2* evas_cache2_init(const Evas_Cache2_Image_Func *cb); 59EAPI Evas_Cache2* evas_cache2_init(const Evas_Cache2_Image_Func *cb);
60EAPI void evas_cache2_shutdown(Evas_Cache2 *cache); 60EAPI void evas_cache2_shutdown(Evas_Cache2 *cache);
61EAPI Image_Entry * evas_cache2_image_open(Evas_Cache2 *cache, const char *path, const char *key, RGBA_Image_Loadopts *lo, int *error); 61EAPI Image_Entry * evas_cache2_image_open(Evas_Cache2 *cache, const char *path, const char *key, Evas_Image_Load_Opts *lo, int *error);
62EAPI Image_Entry *evas_cache2_image_scale_load(Image_Entry *im, int src_x, int src_y, int src_w, int src_h, int dst_w, int dst_h, int smooth); 62EAPI Image_Entry *evas_cache2_image_scale_load(Image_Entry *im, int src_x, int src_y, int src_w, int src_h, int dst_w, int dst_h, int smooth);
63EAPI int evas_cache2_image_open_wait(Image_Entry *im); 63EAPI int evas_cache2_image_open_wait(Image_Entry *im);
64EAPI void evas_cache2_image_ref(Image_Entry *im); 64EAPI void evas_cache2_image_ref(Image_Entry *im);