Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.9.6
-
Embedded Linux on imx6 device
Description
The map application is an IVI application that is drawn to a Wayland Compositor. The map rendering is based on the QtQuick textureinthread example, qt5/qtdeclarative/examples/quick/scenegraph/textureinthread
The map rendering runs on its own thread.
It has its own QOpenGLContext similar to qt5/qtdeclarative/examples/quick/scenegraph/textureinthread/threadrenderer.cpp.html#247
It has its own QOffscreenSurface similar to qt5/qtdeclarative/examples/quick/scenegraph/textureinthread/threadrenderer.cpp.html#233
When time to render, the map rendering calls “context->makeCurrent(surface);”that is it makes its own QOpenGLContext current in its own thread, against its own QOffscreenSurface similar to
qt5/qtdeclarative/examples/quick/scenegraph/textureinthread/threadrenderer.cpp.html#91
The issue is tracked down to line 410 of change list https://github.com/qt/qtwayland/commit/bf09c7a1493c01a65ee0f110b37a04e653edc08e
Line 410 changes from “window->updateSurface(true);” to (window->updateSurface(window->isExposed());”, see below.
if (eglSurface == EGL_NO_SURFACE) { - window->updateSurface(true); + window->updateSurface(window->isExposed()); eglSurface = window->eglSurface(); }
The “window->isExposed()” always return false because the window is from a QOffscreenSurface:
QWaylandEglWindow *window = static_cast<QWaylandEglWindow *>(surface);
Since the “window->isExposed();” always returns false, the eglSurface of the window will not get created, or in another word, it always has the value of EGL_NO_SURFACE.
With eglSurface has no surface, the call to eglMakeCurrent(m_eglDisplay, eglSurface, eglSurface, m_context) will create a EGL_KHR_surfaceless_context, https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_surfaceless_context.txt
if (!eglMakeCurrent(m_eglDisplay, eglSurface, eglSurface, m_context)) { qWarning("QWaylandGLContext::makeCurrent: eglError: %x, this: %p \n", eglGetError(), this); window->setCanResize(true); return false; }
This is where the map render goes wrong. The map does get render but it is rendered incorrectly.
This was working correctly with Qt 5.9.4.
Attachments
Issue Links
- relates to
-
QTBUG-67601 [REG 5.9.4 -> 5.9.5] Rendering of transparent QML items broken on i.MX6
-
- Closed
-
-
QTBUG-68605 QtWayland client shows compositor background instead of a grey shadow
-
- Closed
-