summaryrefslogtreecommitdiff
path: root/src/lib/evas/cache2
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/lib/evas/cache2
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/lib/evas/cache2')
-rw-r--r--src/lib/evas/cache2/evas_cache2.c7
-rw-r--r--src/lib/evas/cache2/evas_cache2.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/evas/cache2/evas_cache2.c b/src/lib/evas/cache2/evas_cache2.c
index 1a033b5453..4b51b3292e 100644
--- a/src/lib/evas/cache2/evas_cache2.c
+++ b/src/lib/evas/cache2/evas_cache2.c
@@ -549,6 +549,13 @@ evas_cache2_shutdown(Evas_Cache2 *cache)
549 free(cache); 549 free(cache);
550} 550}
551 551
552EAPI Eina_Bool
553evas_cache2_image_cached(Image_Entry *ie)
554{
555 if (!ie) return EINA_FALSE;
556 return (ie->cache2 != NULL);
557}
558
552EAPI void 559EAPI void
553evas_cache2_image_cache_key_create(char *hkey, const char *path, size_t pathlen, 560evas_cache2_image_cache_key_create(char *hkey, const char *path, size_t pathlen,
554 const char *key, size_t keylen, 561 const char *key, size_t keylen,
diff --git a/src/lib/evas/cache2/evas_cache2.h b/src/lib/evas/cache2/evas_cache2.h
index 6f8e588493..7cd9c79170 100644
--- a/src/lib/evas/cache2/evas_cache2.h
+++ b/src/lib/evas/cache2/evas_cache2.h
@@ -76,6 +76,7 @@ EAPI Image_Entry * evas_cache2_image_size_set(Image_Entry *im, unsigned int w, u
76EAPI Image_Entry * evas_cache2_image_dirty(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h); 76EAPI Image_Entry * evas_cache2_image_dirty(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
77EAPI Image_Entry * evas_cache2_image_empty(Evas_Cache2 *cache); 77EAPI Image_Entry * evas_cache2_image_empty(Evas_Cache2 *cache);
78EAPI void evas_cache2_image_surface_alloc(Image_Entry *ie, int w, int h); 78EAPI void evas_cache2_image_surface_alloc(Image_Entry *ie, int w, int h);
79EAPI Eina_Bool evas_cache2_image_cached(Image_Entry *ie);
79 80
80EAPI int evas_cache2_flush(Evas_Cache2 *cache); 81EAPI int evas_cache2_flush(Evas_Cache2 *cache);
81EAPI void evas_cache2_limit_set(Evas_Cache2 *cache, int limit); 82EAPI void evas_cache2_limit_set(Evas_Cache2 *cache, int limit);