From e4f5278a4f308297bdcf12c04c8b4600a1294ef7 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 22 Jun 2015 13:38:33 +0200 Subject: 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 --- src/plugins/platforms/windows/qwindowseglcontext.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/windows/qwindowseglcontext.cpp b/src/plugins/platforms/windows/qwindowseglcontext.cpp index 06c9985cac..94377595a0 100644 --- a/src/plugins/platforms/windows/qwindowseglcontext.cpp +++ b/src/plugins/platforms/windows/qwindowseglcontext.cpp @@ -430,7 +430,8 @@ void *QWindowsEGLStaticContext::createWindowSurface(void *nativeWindow, void *na (EGLNativeWindowType) nativeWindow, 0); if (surface == EGL_NO_SURFACE) { *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; -- cgit v1.2.3