diff options
author | Chris Michael <cp.michael@samsung.com> | 2015-06-04 08:52:28 -0400 |
---|---|---|
committer | Chris Michael <cp.michael@samsung.com> | 2015-06-05 10:00:44 -0400 |
commit | 70b674d06c47916bdba191cc591eae395e21756d (patch) | |
tree | 42cc22e1aebaf8dae40d26a14b2cfa7a30cf1def | |
parent | 493e751882cd339d3e3d9329fd43b9e3d5a81448 (diff) |
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.c | 20 |
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) | |||
117 | return EINA_FALSE; | 117 | return EINA_FALSE; |
118 | } | 118 | } |
119 | 119 | ||
120 | ob->egl.surface[0] = | ||
121 | eglCreateWindowSurface(ob->egl.disp, ob->egl.config, | ||
122 | (EGLNativeWindowType)ob->surface, NULL); | ||
123 | if (ob->egl.surface[0] == EGL_NO_SURFACE) | ||
124 | { | ||
125 | ERR("eglCreateWindowSurface() fail for %p. code=%#x", | ||
126 | ob->surface, eglGetError()); | ||
127 | return EINA_FALSE; | ||
128 | } | ||
129 | |||
130 | ob->egl.context[0] = | 120 | ob->egl.context[0] = |
131 | eglCreateContext(ob->egl.disp, ob->egl.config, context, ctx_attr); | 121 | eglCreateContext(ob->egl.disp, ob->egl.config, context, ctx_attr); |
132 | if (ob->egl.context[0] == EGL_NO_CONTEXT) | 122 | if (ob->egl.context[0] == EGL_NO_CONTEXT) |
@@ -137,6 +127,16 @@ _evas_outbuf_egl_setup(Outbuf *ob) | |||
137 | 127 | ||
138 | if (context == EGL_NO_CONTEXT) context = ob->egl.context[0]; | 128 | if (context == EGL_NO_CONTEXT) context = ob->egl.context[0]; |
139 | 129 | ||
130 | ob->egl.surface[0] = | ||
131 | eglCreateWindowSurface(ob->egl.disp, ob->egl.config, | ||
132 | (EGLNativeWindowType)ob->surface, NULL); | ||
133 | if (ob->egl.surface[0] == EGL_NO_SURFACE) | ||
134 | { | ||
135 | ERR("eglCreateWindowSurface() fail for %p. code=%#x", | ||
136 | ob->surface, eglGetError()); | ||
137 | return EINA_FALSE; | ||
138 | } | ||
139 | |||
140 | if (eglMakeCurrent(ob->egl.disp, ob->egl.surface[0], | 140 | if (eglMakeCurrent(ob->egl.disp, ob->egl.surface[0], |
141 | ob->egl.surface[0], ob->egl.context[0]) == EGL_FALSE) | 141 | ob->egl.surface[0], ob->egl.context[0]) == EGL_FALSE) |
142 | { | 142 | { |