diff options
author | Inho Lee <inho.lee@qt.io> | 2021-11-05 13:35:55 +0100 |
---|---|---|
committer | Inho Lee <inho.lee@qt.io> | 2022-02-11 13:00:03 +0100 |
commit | 3d0c2db1673c2d594014712030ed3f5217969872 (patch) | |
tree | a377aa2b2a807a78078f0bfdd0a56c46adcb2dcf /src/hardwareintegration/client/xcomposite-egl | |
parent | e0d6f3cec32b3ce9666ff768cf98ee9c1bd2de79 (diff) | |
download | qtwayland-3d0c2db1673c2d594014712030ed3f5217969872.tar.gz |
Don't keep eglConfig in hardwareintegration
There is no reason to keep eglConfig value as a member variable. Even
this can result in creating wrong surface from the current surface.
And it makes no sense to change alpha bits of the surface format by
supporting decorations.
Task-number: QTBUG-97916
Change-Id: Iaa395d36e83373ea197dc5e14424fcb62cd2cd8b
(cherry picked from commit af884d4aac18e5155649f8a916ea272c11542b7e)
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Seokha Ko <seokha.ko@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/hardwareintegration/client/xcomposite-egl')
-rw-r--r-- | src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp | 7 | ||||
-rw-r--r-- | src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h | 1 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp index b6895ba4..7b5b40d4 100644 --- a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp +++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp @@ -57,7 +57,6 @@ namespace QtWaylandClient { QWaylandXCompositeEGLWindow::QWaylandXCompositeEGLWindow(QWindow *window, QWaylandXCompositeEGLClientBufferIntegration *glxIntegration) : QWaylandWindow(window, glxIntegration->waylandDisplay()) , m_glxIntegration(glxIntegration) - , m_config(q_configFromGLFormat(glxIntegration->eglDisplay(), window->format(), true, EGL_WINDOW_BIT | EGL_PIXMAP_BIT)) { } @@ -98,7 +97,9 @@ void QWaylandXCompositeEGLWindow::createEglSurface() XDestroyWindow(m_glxIntegration->xDisplay(), m_xWindow); } - VisualID visualId = QXlibEglIntegration::getCompatibleVisualId(m_glxIntegration->xDisplay(), m_glxIntegration->eglDisplay(), m_config); + EGLConfig eglConfig = q_configFromGLFormat(m_glxIntegration->eglDisplay(), window()->format(), true, EGL_WINDOW_BIT | EGL_PIXMAP_BIT); + + VisualID visualId = QXlibEglIntegration::getCompatibleVisualId(m_glxIntegration->xDisplay(), m_glxIntegration->eglDisplay(), eglConfig); XVisualInfo visualInfoTemplate; memset(&visualInfoTemplate, 0, sizeof(XVisualInfo)); @@ -118,7 +119,7 @@ void QWaylandXCompositeEGLWindow::createEglSurface() XCompositeRedirectWindow(m_glxIntegration->xDisplay(), m_xWindow, CompositeRedirectManual); XMapWindow(m_glxIntegration->xDisplay(), m_xWindow); - m_surface = eglCreateWindowSurface(m_glxIntegration->eglDisplay(), m_config, reinterpret_cast<EGLNativeWindowType>(m_xWindow), nullptr); + m_surface = eglCreateWindowSurface(m_glxIntegration->eglDisplay(), eglConfig, reinterpret_cast<EGLNativeWindowType>(m_xWindow), nullptr); if (m_surface == EGL_NO_SURFACE) { qFatal("Could not make eglsurface"); } diff --git a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h index 6afbf721..76928193 100644 --- a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h +++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h @@ -69,7 +69,6 @@ private: QWaylandBuffer *m_buffer = nullptr; Window m_xWindow = 0; - EGLConfig m_config; EGLSurface m_surface = EGL_NO_SURFACE; }; |