cedric pushed a commit to branch efl-1.8.

http://git.enlightenment.org/core/efl.git/commit/?id=4eca8910fc29ebfa1bc7fc2fc82668c0dcd05add

commit 4eca8910fc29ebfa1bc7fc2fc82668c0dcd05add
Author: Cedric BAIL <[email protected]>
Date:   Fri Jan 3 17:53:51 2014 +0900

    evas: disable use of mmap on windows for allocating pixels buffer.
    
    We do have mmap provided by Evil, but there is no implementation yet of
    an anonymous map support. Also it is not clear how the memory system of
    windows does actually work, so not sure this optimization is relevant
    to windows at all. Thus we disable it for the time being and unbreak
    the windows support.
    
    - cherry-pick me -
---
 src/lib/evas/common/evas_image_main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/evas/common/evas_image_main.c 
b/src/lib/evas/common/evas_image_main.c
index 75767dc..eed7dec 100644
--- a/src/lib/evas/common/evas_image_main.c
+++ b/src/lib/evas/common/evas_image_main.c
@@ -113,7 +113,7 @@ static inline size_t
 _evas_common_rgba_image_surface_size(unsigned int w, unsigned int h, Eina_Bool 
alpha_only)
 {
 #define PAGE_SIZE (4 * 1024)
-#ifdef HAVE_SYS_MMAN_H
+#if defined (HAVE_SYS_MMAN_H) && (!defined (_WIN32))
 # define ALIGN_TO_PAGE(Siz) (((Siz / PAGE_SIZE) + (Siz % PAGE_SIZE ? 1 : 0)) * 
PAGE_SIZE)
 #else
 # define ALIGN_TO_PAGE(Siz) Siz
@@ -140,7 +140,7 @@ _evas_common_rgba_image_surface_mmap(unsigned int w, 
unsigned int h, Eina_Bool a
 
    siz = _evas_common_rgba_image_surface_size(w, h, alpha_only);
 
-#ifdef HAVE_SYS_MMAN_H
+#if defined (HAVE_SYS_MMAN_H) && (!defined (_WIN32))
 #ifndef MAP_HUGETLB
 # define MAP_HUGETLB 0
 #endif
@@ -169,7 +169,7 @@ _evas_common_rgba_image_surface_mmap(unsigned int w, 
unsigned int h, Eina_Bool a
 static void
 _evas_common_rgba_image_surface_munmap(void *data, unsigned int w, unsigned 
int h, Eina_Bool alpha_only)
 {
-#ifdef HAVE_SYS_MMAN_H
+#if defined (HAVE_SYS_MMAN_H) && (!defined (_WIN32))
    size_t siz;
 
    siz = _evas_common_rgba_image_surface_size(w, h, alpha_only);

-- 


Reply via email to