summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-06-04 08:52:28 -0400
committerChris Michael <cp.michael@samsung.com>2015-06-04 11:53:09 -0400
commit9b4e5abd1849fde20b88615f17dd42a82137a812 (patch)
tree86eda9894e77421e672a169030b14f7246581d9a
parentf5dc72e776d38802a0eea6d2a86365698d2d992f (diff)
downloadefl-9b4e5abd1849fde20b88615f17dd42a82137a812.tar.gz
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.michael@samsung.com>
-rw-r--r--src/modules/evas/engines/gl_drm/evas_outbuf.c20
1 files 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 4365efe237..9df628f47f 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)
{