summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/wayland_shm/evas_shm.c
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-02-09 08:58:03 -0600
committerDerek Foreman <derekf@osg.samsung.com>2017-02-09 09:17:38 -0600
commit2800038ee212de4588471bca5d0773599b93d470 (patch)
tree0e197be8f33085c7a6d130ec385db3ab3e180bc6 /src/modules/evas/engines/wayland_shm/evas_shm.c
parent9540e96107f7f6f759c3a7ed51d90a8883fc2310 (diff)
Revert "vpath usage - simplify to bare minimum to make gustavo happy"
This reverts commit 2037474dc0fd2b360452f2a15abcbe533b57ca37. This causes the wayland_shm engine to seg fault immediately at startup when attempting to create shm buffers. Please make sure when committing changes to the wayland_shm engine to test on intel, exynos, and at least one platform without dmabuf capabilities - or using the EVAS_WAYLAND_SHM_DISABLE_DMABUF env var to disable dmabuf on intel or exynos. Anyone without the time or hardware to fully test changes to wayland_shm can submit a patch to phabricator and assign it to me so I can fully test it before landing.
Diffstat (limited to '')
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_shm.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/modules/evas/engines/wayland_shm/evas_shm.c b/src/modules/evas/engines/wayland_shm/evas_shm.c
index 3b9e7a525c..05c7ec3945 100644
--- a/src/modules/evas/engines/wayland_shm/evas_shm.c
+++ b/src/modules/evas/engines/wayland_shm/evas_shm.c
@@ -82,6 +82,8 @@ static struct wl_shm_pool *
82_shm_pool_make(struct wl_shm *shm, int size, void **data) 82_shm_pool_make(struct wl_shm *shm, int size, void **data)
83{ 83{
84 struct wl_shm_pool *pool; 84 struct wl_shm_pool *pool;
85 static const char tmp[] = "evas-wayland_shm-XXXXXX";
86 const char *path;
85 char *name; 87 char *name;
86 int fd = 0; 88 int fd = 0;
87 Eina_Tmpstr *fullname; 89 Eina_Tmpstr *fullname;
@@ -93,11 +95,15 @@ _shm_pool_make(struct wl_shm *shm, int size, void **data)
93 if (!shm) return NULL; 95 if (!shm) return NULL;
94 96
95 /* create tmp file name */ 97 /* create tmp file name */
96 file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, 98 file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, "(:run:)/");
97 "(:run:)/evas-wayland_shm-XXXXXX"); 99 efl_vpath_file_do(file_obj);
98 fd = eina_file_mkstemp(efl_vpath_file_result_get(file_obj), &fullname); 100 efl_vpath_file_wait(file_obj);
99 efl_del(file_obj); 101 path = efl_vpath_file_result_get(file_obj);
100 102 if ((name = malloc(strlen(path) + sizeof(tmp)))) strcpy(name, path);
103 if (!name) return NULL;
104 strcat(name, tmp);
105
106 fd = eina_file_mkstemp(name, &fullname);
101 if (fd < 0) 107 if (fd < 0)
102 /* try to create tmp file */ 108 /* try to create tmp file */
103 /* if ((fd = mkstemp(name)) < 0) */ 109 /* if ((fd = mkstemp(name)) < 0) */