cedric pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=ffe4bf794e0eb530cc6102cac620134c24ef9059

commit ffe4bf794e0eb530cc6102cac620134c24ef9059
Author: Cedric BAIL <cedric.b...@samsung.com>
Date:   Thu Mar 20 20:46:54 2014 +0900

    e: let's just completely blacklist NVidia driver for Wayland.
---
 src/bin/e_comp_wl.c | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 9df65b9..63344fa 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -225,7 +225,7 @@ static const struct wl_pointer_grab_interface 
_e_drag_grab_interface =
 /* local variables */
 static Ecore_Idler *_module_idler = NULL;
 #ifdef HAVE_WAYLAND_EGL
-static Eina_Bool can_terminate = EINA_TRUE;
+static Eina_Bool black_listed = EINA_FALSE;
 #endif
 
 /* external variables */
@@ -289,17 +289,19 @@ e_comp_wl_init(void)
          * calling eglTerminate. Let's hack around that.... */
         vendor = 
           (const char *)eglQueryString(_e_wl_comp->egl.display, EGL_VENDOR);
-        if (vendor)
+        if (!vendor || !strcmp(vendor, "NVIDIA Corporation"))
+          black_listed = EINA_TRUE;
+        if (black_listed)
           {
-             if (!strcmp(vendor, "NVIDIA Corporation"))
-               can_terminate = EINA_FALSE;
+             ERR("Black listed driver [%s]. Not a supported configuration.", 
vendor);
+             goto err;
           }
 
         /* try to initialize egl */
         if (!eglInitialize(_e_wl_comp->egl.display, &major, &minor))
           {
              ERR("Could not initialize EGL: %m");
-             if (can_terminate) eglTerminate(_e_wl_comp->egl.display);
+             eglTerminate(_e_wl_comp->egl.display);
           }
         else
           {
@@ -316,7 +318,7 @@ e_comp_wl_init(void)
                                    &_e_wl_comp->egl.config, 1, &n) || (n == 
0)))
                {
                   ERR("Could not choose EGL config: %m");
-                  if (can_terminate) eglTerminate(_e_wl_comp->egl.display);
+                  eglTerminate(_e_wl_comp->egl.display);
                }
           }
      }
@@ -381,10 +383,13 @@ err:
      _e_wl_comp->egl.unbind_display(_e_wl_comp->egl.display, 
_e_wl_comp->wl.display);
 
    /* terminate the egl display */
-   if ((_e_wl_comp->egl.display) && (can_terminate))
-     eglTerminate(_e_wl_comp->egl.display);
+   if (!black_listed)
+     {
+        if ((_e_wl_comp->egl.display))
+          eglTerminate(_e_wl_comp->egl.display);
 
-   eglReleaseThread();
+        eglReleaseThread();
+     }
 #endif
 
    /* if we have a display, destroy it */

-- 


Reply via email to