Handle context loss in window surface creation too

While this is not what the EGL spec says, we can get EGL_CONTEXT_LOST in
eglCreateWindowSurface too with ANGLE. Handle it the same way like we do
for eglMakeCurrent and eglSwapBuffers (no warning, just return the error
code silently since we may recover from this).

Change-Id: I6b6c57ffd4fca23e1a14a90ef7b18b33f4c96fd2
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
This commit is contained in:
Laszlo Agocs 2015-06-22 13:38:33 +02:00
parent 9e6a61447c
commit e4f5278a4f

View File

@ -430,7 +430,8 @@ void *QWindowsEGLStaticContext::createWindowSurface(void *nativeWindow, void *na
(EGLNativeWindowType) nativeWindow, 0); (EGLNativeWindowType) nativeWindow, 0);
if (surface == EGL_NO_SURFACE) { if (surface == EGL_NO_SURFACE) {
*err = libEGL.eglGetError(); *err = libEGL.eglGetError();
qWarning("%s: Could not create the EGL window surface: 0x%x\n", Q_FUNC_INFO, *err); if (*err != EGL_CONTEXT_LOST)
qWarning("%s: Could not create the EGL window surface: 0x%x\n", Q_FUNC_INFO, *err);
} }
return surface; return surface;