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 -
This commit is contained in:
Cedric BAIL 2014-01-03 17:53:51 +09:00
parent 8c819cf214
commit 39a0ac4315
1 changed files with 3 additions and 3 deletions

View File

@ -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);