Even if EGL is not initialized on any EGLDisplay,
eglReleaseThread should succeed
Change-Id: Ie15e8f57305d2a8f81cb6e3ddb623ca8bae08358
Signed-off-by: xuelian.bai <xuelian.bai@samsung.com>
_COREGL_FASTPATH_FUNC_BEGIN();
dpy = _orig_fastpath_eglGetCurrentDisplay();
- AST(dpy != EGL_NO_DISPLAY);
- fastpath_eglMakeCurrent(dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
+
+ /* according to spec,
+ * Even if EGL is not initialized on any EGLDisplay, eglReleaseThread should succeed
+ */
+ if (dpy != EGL_NO_DISPLAY)
+ fastpath_eglMakeCurrent(dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
ret = _orig_fastpath_eglReleaseThread();
goto finish;