From 48126502434c0c966a744e113b4a420656d8c206 Mon Sep 17 00:00:00 2001 From: Giulio Camuffo Date: Wed, 16 Apr 2014 11:02:30 +0300 Subject: Egl surfaces can now be invalidated, make sure to recreate them Change-Id: Ifae97cc4538989bc45641bda5ce2ec8a7d8980ce Reviewed-by: Laszlo Agocs Reviewed-by: Gunnar Sletta --- src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp') diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp index e7a4b5a2b..04cfbe6b5 100644 --- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp +++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp @@ -113,6 +113,10 @@ bool QWaylandGLContext::makeCurrent(QPlatformSurface *surface) window->setCanResize(false); EGLSurface eglSurface = window->eglSurface(); + if (!eglSurface) { + window->create(); + eglSurface = window->eglSurface(); + } if (!eglMakeCurrent(m_eglDisplay, eglSurface, eglSurface, m_context)) { qWarning("QEGLPlatformContext::makeCurrent: eglError: %x, this: %p \n", eglGetError(), this); return false; -- cgit v1.2.3