From 3d0c2db1673c2d594014712030ed3f5217969872 Mon Sep 17 00:00:00 2001 From: Inho Lee Date: Fri, 5 Nov 2021 13:35:55 +0100 Subject: 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 Reviewed-by: Seokha Ko Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp') diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp index ab32ed02..feb15583 100644 --- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp +++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp @@ -185,14 +185,14 @@ void QWaylandBrcmEglWindow::createEglSurfaces() m_count = window()->format().swapBehavior() == QSurfaceFormat::TripleBuffer ? 3 : 2; - m_eglConfig = q_configFromGLFormat(m_eglIntegration->eglDisplay(), brcmFixFormat(window()->format()), true, EGL_PIXMAP_BIT); + EGLConfig eglConfig = q_configFromGLFormat(m_eglIntegration->eglDisplay(), brcmFixFormat(window()->format()), true, EGL_PIXMAP_BIT); - m_format = q_glFormatFromConfig(m_eglIntegration->eglDisplay(), m_eglConfig); + m_format = q_glFormatFromConfig(m_eglIntegration->eglDisplay(), eglConfig); EGLint pixel_format = EGL_PIXEL_FORMAT_ARGB_8888_BRCM; EGLint rt; - eglGetConfigAttrib(m_eglIntegration->eglDisplay(), m_eglConfig, EGL_RENDERABLE_TYPE, &rt); + eglGetConfigAttrib(m_eglIntegration->eglDisplay(), eglConfig, EGL_RENDERABLE_TYPE, &rt); if (rt & EGL_OPENGL_ES_BIT) { pixel_format |= EGL_PIXEL_FORMAT_RENDER_GLES_BRCM; @@ -228,7 +228,7 @@ void QWaylandBrcmEglWindow::createEglSurfaces() EGL_NONE }; - m_eglSurfaces[i] = eglCreatePixmapSurface(m_eglIntegration->eglDisplay(), m_eglConfig, (EGLNativePixmapType)&m_globalImages[5*i], attrs); + m_eglSurfaces[i] = eglCreatePixmapSurface(m_eglIntegration->eglDisplay(), eglConfig, (EGLNativePixmapType)&m_globalImages[5*i], attrs); if (m_eglSurfaces[i] == EGL_NO_SURFACE) qFatal("eglCreatePixmapSurface failed: %x, global image id: %d %d\n", eglGetError(), m_globalImages[5*i], m_globalImages[5*i+1]); m_buffers[i] = new QWaylandBrcmBuffer(mDisplay, m_eglIntegration->waylandBrcm(), size, &m_globalImages[5*i], 5, m_eventQueue); -- cgit v1.2.1