Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-57268

GLContextHelper::getEGLDisplay() failed.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.7.2
    • 5.8.0 Beta
    • WebEngine
    • None

    Description

      When running QuickNanoBrowser, GLSurfaceQtEGL::InitializeOneOff() fails with error: "GLContextHelper::getEGLDisplay() failed."

      Call tree:

      qtwebengine/src/core/gl_surface_qt.cpp:
      GLSurfaceQtEGL::InitializeOneOff()
      

      calls

      qtwebengine/src/core/gl_context_qt.cpp:
      void* GLContextHelper::getEGLDisplay() 
      {
        return resourceForContext(QByteArrayLiteral("egldisplay"));
      }
      

      which results in call to

      qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglnativeintarfacehandler.cpp:
      QPlatformNativeInterface::NativeResourceForContextFunction QXcbEglNativeInterfaceHandler::nativeResourceFunctionForContext(const QByteArray &resource) const
      {
          switch (resourceType(resource)) {
          case EglContext:
              return eglContextForContext;
          case EglConfig:
              return eglConfigForContext;
          default:
              break;
          }
          return Q_NULLPTR;
      }
      

      which does not handle "egldisplay" but only "eglcontext" and "eglconfig".

      If in GLContextHelper::getEGLDisplay(), resourceForIntegration() is used instead of resourceForContext(), function called from xcb_egl is:

      qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglnativeinterfacehandler.cpp:
      QPlatformNativeInterface::NativeResourceForIntegrationFunction QXcbEglNativeInterfaceHandler::nativeResourceFunctionForIntegration(const QByteArray &resource) const{
          switch (resourceType(resource)) {
          case EglDisplay:
              return eglDisplay;
          default:
              break;
          }
          return Q_NULLPTR;
      }
      

      which does handle "egldisplay", initialization is done successfully and QuickNanoBrowser runs.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt_webengine_team Qt WebEngine Team
            leporis leporis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes