wayland_shm: Make EVAS_WAYLAND_SHM_DISABLE_DMABUF use new code
authorDerek Foreman <derekf@osg.samsung.com>
Wed, 8 Nov 2017 16:37:06 +0000 (10:37 -0600)
committerDerek Foreman <derekf@osg.samsung.com>
Wed, 8 Nov 2017 21:12:51 +0000 (15:12 -0600)
Use the new wl_shm allocation functions making the old wl_shm code
unreachable even with the use of the disable env var.

src/modules/evas/engines/wayland_shm/evas_dmabuf.c
src/modules/evas/engines/wayland_shm/evas_outbuf.c

index 9947cb5..de1c3fc 100644 (file)
@@ -423,8 +423,11 @@ _buffer_manager_get(void)
    fd = open("/dev/dri/renderD128", O_RDWR | O_CLOEXEC);
    if (fd < 0) goto err_drm;
 
-   success = _intel_buffer_manager_setup(fd);
-   if (!success) success = _exynos_buffer_manager_setup(fd);
+   if (!getenv("EVAS_WAYLAND_SHM_DISABLE_DMABUF"))
+     {
+        success = _intel_buffer_manager_setup(fd);
+        if (!success) success = _exynos_buffer_manager_setup(fd);
+     }
    if (!success) success = _wl_shm_buffer_manager_setup(fd);
    if (!success) goto err_bm;
 
index d5a6b7e..c962e37 100644 (file)
 Eina_Bool
 _evas_surface_init(Surface *s, int w, int h, int num_buf)
 {
-   if (!getenv("EVAS_WAYLAND_SHM_DISABLE_DMABUF"))
-     if (_evas_dmabuf_surface_create(s, w, h, num_buf)) return EINA_TRUE;
-
-   if (_evas_shm_surface_create(s, w, h, num_buf)) return EINA_TRUE;
-
-   return EINA_FALSE;
+   return _evas_dmabuf_surface_create(s, w, h, num_buf);
 }
 
 static Surface *