devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=70b674d06c47916bdba191cc591eae395e21756d

commit 70b674d06c47916bdba191cc591eae395e21756d
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Thu Jun 4 08:52:28 2015 -0400

    evas-gl-drm: Create eglContext before eglWindowSurface
    
    Summary: We should be creating the eglContext before trying to create
    the window surface.
    
    @fix
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/modules/evas/engines/gl_drm/evas_outbuf.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/modules/evas/engines/gl_drm/evas_outbuf.c 
b/src/modules/evas/engines/gl_drm/evas_outbuf.c
index 4365efe..9df628f 100644
--- a/src/modules/evas/engines/gl_drm/evas_outbuf.c
+++ b/src/modules/evas/engines/gl_drm/evas_outbuf.c
@@ -117,16 +117,6 @@ _evas_outbuf_egl_setup(Outbuf *ob)
         return EINA_FALSE;
      }
 
-   ob->egl.surface[0] =
-     eglCreateWindowSurface(ob->egl.disp, ob->egl.config,
-                            (EGLNativeWindowType)ob->surface, NULL);
-   if (ob->egl.surface[0] == EGL_NO_SURFACE)
-     {
-        ERR("eglCreateWindowSurface() fail for %p. code=%#x",
-            ob->surface, eglGetError());
-        return EINA_FALSE;
-     }
-
    ob->egl.context[0] =
      eglCreateContext(ob->egl.disp, ob->egl.config, context, ctx_attr);
    if (ob->egl.context[0] == EGL_NO_CONTEXT)
@@ -137,6 +127,16 @@ _evas_outbuf_egl_setup(Outbuf *ob)
 
    if (context == EGL_NO_CONTEXT) context = ob->egl.context[0];
 
+   ob->egl.surface[0] =
+     eglCreateWindowSurface(ob->egl.disp, ob->egl.config,
+                            (EGLNativeWindowType)ob->surface, NULL);
+   if (ob->egl.surface[0] == EGL_NO_SURFACE)
+     {
+        ERR("eglCreateWindowSurface() fail for %p. code=%#x",
+            ob->surface, eglGetError());
+        return EINA_FALSE;
+     }
+
    if (eglMakeCurrent(ob->egl.disp, ob->egl.surface[0],
                       ob->egl.surface[0], ob->egl.context[0]) == EGL_FALSE)
      {

-- 


Reply via email to