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

Unnecessary creation of decoration on certain circumference

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.15.1
    • Fix Version/s: None
    • Component/s: QPA: Wayland
    • Labels:
      None

      Description

      1. preconditions

      QSG_RENDER_LOOP=threaded

      QT_WAYLAND_SHELL_INTEGRATION=ivi-shell

      setPersistentOpenGLContext(true)

      setPersistentSceneGraph(true)

       

      2. short description about this issue

      Black screen occurs when app transitions from foreground -> background -> foreground again. (by using hide/show call)

       

      3. Detail call sequence

      When the app transitions from foreground to background by using hide()

      void QWaylandWindow::setVisible(bool visible)
      -> QWaylandWindow::reset() 
         at this point, delete mShellSurface
      Then, 
      QSGRenderThread::invalidateGraphics() is called
         at this point, current = gl->makeCurrent(fallback ? static_cast<QSurface *>(fallback) : static_cast<QSurface *>(window)); called
      -> bool QWaylandGLContext::makeCurrent(QPlatformSurface *surface) 
      -> window->createDecoration();
      in this function, decoration will be created by "if (mShellSurface && !mShellSurface->wantsDecorations())" statement because mShellSurface was deleted already.
      after that
      FBO (Frame Buffer Object) for decoration is binded to the default frame buffer by below code in QWaylandGLContext::makeCurrent()
      QOpenGLContextPrivate::setCurrentContext(context());
      window->bindContentFBO();
      
      

      Later, when the app switches background->foreground by using show()

      Black screen occurs because the default frame buffer is still exist.

       

      3. Possible solution

      We can avoid this problemm by setting 

      QT_WAYLAND_DISABLE_WINDOWDECORATION=1

      and also we don't have to ship the decoration plugin to the target board.

       

      4. Expectation

      However, creation of decoration in this circumference is unnecessary because we are using ivi-shell. So I guess there may be improvements in qtwayland.

       

       

      *. This issue has been reported by a customer.

       

        Attachments

          Issue Links

          For Gerrit Dashboard: QTBUG-97608
          # Subject Branch Project Status CR V

            Activity

              People

              Assignee:
              inho Inho Lee
              Reporter:
              seokhako Seokha Ko
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes