forked from enlightenment/efl
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:
parent
8c819cf214
commit
39a0ac4315
|
@ -113,7 +113,7 @@ static inline size_t
|
||||||
_evas_common_rgba_image_surface_size(unsigned int w, unsigned int h, Eina_Bool alpha_only)
|
_evas_common_rgba_image_surface_size(unsigned int w, unsigned int h, Eina_Bool alpha_only)
|
||||||
{
|
{
|
||||||
#define PAGE_SIZE (4 * 1024)
|
#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)
|
# define ALIGN_TO_PAGE(Siz) (((Siz / PAGE_SIZE) + (Siz % PAGE_SIZE ? 1 : 0)) * PAGE_SIZE)
|
||||||
#else
|
#else
|
||||||
# define ALIGN_TO_PAGE(Siz) Siz
|
# 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);
|
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
|
#ifndef MAP_HUGETLB
|
||||||
# define MAP_HUGETLB 0
|
# define MAP_HUGETLB 0
|
||||||
#endif
|
#endif
|
||||||
|
@ -169,7 +169,7 @@ _evas_common_rgba_image_surface_mmap(unsigned int w, unsigned int h, Eina_Bool a
|
||||||
static void
|
static void
|
||||||
_evas_common_rgba_image_surface_munmap(void *data, unsigned int w, unsigned int h, Eina_Bool alpha_only)
|
_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;
|
size_t siz;
|
||||||
|
|
||||||
siz = _evas_common_rgba_image_surface_size(w, h, alpha_only);
|
siz = _evas_common_rgba_image_surface_size(w, h, alpha_only);
|
||||||
|
|
Loading…
Reference in New Issue