summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-06-22 13:38:33 +0200
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-06-22 12:02:45 +0000
commite4f5278a4f308297bdcf12c04c8b4600a1294ef7 (patch)
treefb80d8e533c8a87c4e95ac999459ea8096d77c66 /src/plugins
parent9e6a61447c639c236f0d0306c21cf59db478eafe (diff)
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>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/windows/qwindowseglcontext.cpp3
1 files changed, 2 insertions, 1 deletions
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;