summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCedric BAIL <cedric@efl.so>2013-11-10 09:26:44 +0100
committerCedric BAIL <cedric@efl.so>2013-11-10 09:26:44 +0100
commitaaae3830f098ba589d9ff801ee1c63923443f18d (patch)
tree95ba3e7947fa3dded8d8ded3cf1a85f1093826da /src
parenta157813602b2527d29365acaba9a2ed741d220a4 (diff)
ecore_evas: use portable infrastructure to detect page size.
Diffstat (limited to 'src')
-rw-r--r--src/modules/ecore_evas/engines/extn/ecore_evas_extn_buf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/ecore_evas/engines/extn/ecore_evas_extn_buf.c b/src/modules/ecore_evas/engines/extn/ecore_evas_extn_buf.c
index 39135a3daa..32b2e7bfbd 100644
--- a/src/modules/ecore_evas/engines/extn/ecore_evas_extn_buf.c
+++ b/src/modules/ecore_evas/engines/extn/ecore_evas_extn_buf.c
@@ -18,6 +18,9 @@ _extnbuf_new(const char *base, int id, Eina_Bool sys, int num,
18 Extnbuf *b; 18 Extnbuf *b;
19 char file[PATH_MAX]; 19 char file[PATH_MAX];
20 mode_t mode = S_IRUSR | S_IWUSR; 20 mode_t mode = S_IRUSR | S_IWUSR;
21 int page_size;
22
23 page_size = eina_cpu_page_size();
21 24
22 b = calloc(1, sizeof(Extnbuf)); 25 b = calloc(1, sizeof(Extnbuf));
23 b->fd = -1; 26 b->fd = -1;
@@ -26,7 +29,7 @@ _extnbuf_new(const char *base, int id, Eina_Bool sys, int num,
26 b->w = w; 29 b->w = w;
27 b->h = h; 30 b->h = h;
28 b->stride = w * 4; 31 b->stride = w * 4;
29 b->size = 4096 * (((b->stride * b->h) + (4096 - 1)) / 4096); 32 b->size = page_size * (((b->stride * b->h) + (page_size - 1)) / page_size);
30 b->am_owner = owner; 33 b->am_owner = owner;
31 34
32 snprintf(file, sizeof(file), "/%s-%i.%i", base, id, num); 35 snprintf(file, sizeof(file), "/%s-%i.%i", base, id, num);