summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2013-09-02 18:53:18 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2013-10-28 15:47:15 +0900
commitd76e869a5908a56c04bb8ad9927ef45b1cf70faa (patch)
tree219cbb0efeba2b7e8034fa4d5cd1311e650aaeaa /src/modules
parent808c20f9896d4a92f15a653dd23d7e9088ab84d6 (diff)
evas/cserve2: Fallback to normal cache for mmap
cserve2 can't handle virtual files (mmap-only), by design. Proper support can be added later on, but for now we might want to just fallback to the normal cache functions. Fixes photocam test
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/evas/engines/software_generic/evas_engine.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/modules/evas/engines/software_generic/evas_engine.c b/src/modules/evas/engines/software_generic/evas_engine.c
index 5163a5610b..8b3441444b 100644
--- a/src/modules/evas/engines/software_generic/evas_engine.c
+++ b/src/modules/evas/engines/software_generic/evas_engine.c
@@ -962,7 +962,7 @@ eng_image_mmap(void *data EINA_UNUSED, Eina_File *f, const char *key, int *error
962 *error = EVAS_LOAD_ERROR_NONE; 962 *error = EVAS_LOAD_ERROR_NONE;
963#ifdef EVAS_CSERVE2 963#ifdef EVAS_CSERVE2
964 // FIXME: Need to pass fd to make that useful, so just get the filename for now. 964 // FIXME: Need to pass fd to make that useful, so just get the filename for now.
965 if (evas_cserve2_use_get()) 965 if (evas_cserve2_use_get() && !eina_file_virtual(f))
966 { 966 {
967 Image_Entry *ie; 967 Image_Entry *ie;
968 ie = evas_cache2_image_open(evas_common_image_cache2_get(), 968 ie = evas_cache2_image_open(evas_common_image_cache2_get(),
@@ -1006,7 +1006,7 @@ static void
1006eng_image_free(void *data EINA_UNUSED, void *image) 1006eng_image_free(void *data EINA_UNUSED, void *image)
1007{ 1007{
1008#ifdef EVAS_CSERVE2 1008#ifdef EVAS_CSERVE2
1009 if (evas_cserve2_use_get()) 1009 if (evas_cserve2_use_get() && evas_cache2_image_cached(image))
1010 { 1010 {
1011 evas_cache2_image_close(image); 1011 evas_cache2_image_close(image);
1012 return; 1012 return;
@@ -1031,7 +1031,7 @@ eng_image_size_set(void *data EINA_UNUSED, void *image, int w, int h)
1031 Image_Entry *im = image; 1031 Image_Entry *im = image;
1032 if (!im) return NULL; 1032 if (!im) return NULL;
1033#ifdef EVAS_CSERVE2 1033#ifdef EVAS_CSERVE2
1034 if (evas_cserve2_use_get()) 1034 if (evas_cserve2_use_get() && evas_cache2_image_cached(im))
1035 return evas_cache2_image_size_set(im, w, h); 1035 return evas_cache2_image_size_set(im, w, h);
1036#endif 1036#endif
1037 return evas_cache_image_size_set(im, w, h); 1037 return evas_cache_image_size_set(im, w, h);
@@ -1043,7 +1043,7 @@ eng_image_dirty_region(void *data EINA_UNUSED, void *image, int x, int y, int w,
1043 Image_Entry *im = image; 1043 Image_Entry *im = image;
1044 if (!im) return NULL; 1044 if (!im) return NULL;
1045#ifdef EVAS_CSERVE2 1045#ifdef EVAS_CSERVE2
1046 if (evas_cserve2_use_get()) 1046 if (evas_cserve2_use_get() && evas_cache2_image_cached(im))
1047 return evas_cache2_image_dirty(im, x, y, w, h); 1047 return evas_cache2_image_dirty(im, x, y, w, h);
1048#endif 1048#endif
1049 return evas_cache_image_dirty(im, x, y, w, h); 1049 return evas_cache_image_dirty(im, x, y, w, h);
@@ -1063,7 +1063,7 @@ eng_image_data_get(void *data EINA_UNUSED, void *image, int to_write, DATA32 **i
1063 im = image; 1063 im = image;
1064 1064
1065#ifdef EVAS_CSERVE2 1065#ifdef EVAS_CSERVE2
1066 if (evas_cserve2_use_get()) 1066 if (evas_cserve2_use_get() && evas_cache2_image_cached(&im->cache_entry))
1067 { 1067 {
1068 error = evas_cache2_image_load_data(&im->cache_entry); 1068 error = evas_cache2_image_load_data(&im->cache_entry);
1069 if (err) *err = error; 1069 if (err) *err = error;
@@ -1157,7 +1157,7 @@ eng_image_data_preload_request(void *data EINA_UNUSED, void *image, const Eo *ta
1157 if (!im) return; 1157 if (!im) return;
1158 1158
1159#ifdef EVAS_CSERVE2 1159#ifdef EVAS_CSERVE2
1160 if (evas_cserve2_use_get()) 1160 if (evas_cserve2_use_get() && evas_cache2_image_cached(&im->cache_entry))
1161 { 1161 {
1162 evas_cache2_image_preload_data(&im->cache_entry, target); 1162 evas_cache2_image_preload_data(&im->cache_entry, target);
1163 return; 1163 return;
@@ -1171,7 +1171,7 @@ eng_image_data_preload_cancel(void *data EINA_UNUSED, void *image, const Eo *tar
1171{ 1171{
1172 RGBA_Image *im = image; 1172 RGBA_Image *im = image;
1173#ifdef EVAS_CSERVE2 1173#ifdef EVAS_CSERVE2
1174 if (evas_cserve2_use_get()) 1174 if (evas_cserve2_use_get() && evas_cache2_image_cached(&im->cache_entry))
1175 return; 1175 return;
1176#endif 1176#endif
1177 1177