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

QtWebEngine shows blank content: dual gfx MBP + core_profile + Airplay

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 5.15.1
    • 5.12.2
    • WebEngine
    • None
    • macOS

    Description

      QtWebEngine shows blank content with the following setup:

      o A dual graphics card MacBook pro
      o iPad
      o Connect to iPad using Airplay
      o Qt global shared context is set to CoreProfile
      o NSSupportsAutomaticGraphicsSwitching is not set in bundle plist

      QtWebEngine/Chromium will print opengl errors if it's launched after Airplay is enabled.

      There was a patch to add --use-gl=core_profile flag: https://github.com/qt/qtwebengine-chromium/commit/28831bc8c384ab51ae81a5fdeeb3582ae8d7dde4

      But SwitchableGPUsSupported() method was not updated at that time: https://github.com/qt/qtwebengine-chromium/blob/v5.12.2/chromium/gpu/config/gpu_switching.cc#L57-L59

      bool SwitchableGPUsSupported(const GPUInfo& gpu_info,
                                   const base::CommandLine& command_line) {
      #if defined(OS_MACOSX)
        if (command_line.HasSwitch(switches::kUseGL) &&
            command_line.GetSwitchValueASCII(switches::kUseGL) !=
                gl::kGLImplementationDesktopName) {
          return false;
        }
      

      Official Chromium:
      --use-gl=(not set): do gpu check, core profile
      --use-gl=desktop: do gpu check, compatibility profile

      Qt patched Chromium:
      --use-gl=core_profile: return false before gpu check, core profile
      --use-gl=desktop: do gpu check, compatibility profile

      If --use-gl=core_profile is passed in, SwitchableGPUsSupported() always returns false. Then, kCGLPFAAllowOfflineRenderers is not added when Chromium's pixel format. On the other hand, Qt will always add kCGLPFAAllowOfflineRenderers.

      For example, after connecting to Airplay,
      If kCGLPFAAllowOfflineRenderers is set, the OpenGL context is associated with 2 virtual screens (AMD / Apple Renderer)
      If kCGLPFAAllowOfflineRenderers is not set, the OpenGL context is associated with 3 virtual screens (Intel / AMD / Apple Renderer).

      OpenGL context with different set of renderers are not shareable. Chromium will fail to create a sharing OpenGL context.

      NSSupportsAutomaticGraphicsSwitching is not set because the application needs to switch to discrete GPU for gl rendering.

      Attachments

        Issue Links

          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
              mingxiang Mingxiang Xu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes