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

QT quick hardware rendering window damage area tracking

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Won't Do
    • P2: Important
    • None
    • 5.15.0 RC2
    • None
    • Linux/Wayland

    Description

      In Wayland environment, when qtqcuik uses qsgrenderinterface:: software to render, go to qwaylandshmbackingstore and submit the damage area to Wayland server through

      void qwaylandwindow:: commit (qwaylandbuffer * buffer, const qregion & damage)
      
      mSurface->damage(rect.x(), rect.y(), rect.width(), rect.height());
      
      void QWaylandWindow::damage(const QRect &rect) { 
      mSurface->damage(rect.x(), rect.y(), rect.width(), rect.height());
      }

      In this way, Wayland synthesizer can realize window local region synthesis and improve performance.

      However, when we use OpenGL to render for the back-end, we do not carry out the image tracking of the displayed, but the implementation of this part is missing in the code. For this, can we suggest that we also implement the image tracking in the Wayland plugin to render the back-end such as OpenGL and Vulkan. This is also of great benefit to improve the efficiency of the synthesizer.

      The following is the data I track dirty. At this time, a rectangle is moving horizontally in the window. You can view the changes of the second row and the penultimate row,  the x-axis offset.

      qt.quick.dirty: QQuickWindowPrivate::updateDirtyNodes():
      qt.quick.dirty: QSGNode: QQuickRectangle(0xace2b0, parent=0xac0810, geometry=49.8384,6 28x28) Position
      qt.scenegraph.renderloop: (RT) sceneGraphChanged
      qt.quick.dirty: QSGNode: QQuickRectangle(0xa67860, parent=0xa4be70, geometry=0,0 51.5101x6) Size
      qt.scenegraph.renderloop: (RT) - sync complete, waking Gui
      qt.scenegraph.renderloop: (RT) - rendering started
      qt.scenegraph.renderloop: - unlock after sync
      qt.scenegraph.renderloop: - advancing animations
      qt.scenegraph.renderloop: update from item QQuickWindowQmlImpl(0x88baf0 exposed, visibility=QWindow::Windowed, flags=QFlags<Qt::WindowType>(Window), title="Hello World", geometry=3098,174 640x480)
      qt.scenegraph.renderloop: update from item QQuickWindowQmlImpl(0x88baf0 exposed, visibility=QWindow::Windowed, flags=QFlags<Qt::WindowType>(Window), title="Hello World", geometry=3098,174 640x480)
      qt.scenegraph.renderloop: update from item QQuickWindowQmlImpl(0x88baf0 exposed, visibility=QWindow::Windowed, flags=QFlags<Qt::WindowType>(Window), title="Hello World", geometry=3098,174 640x480)
      qt.scenegraph.renderloop: update from item QQuickWindowQmlImpl(0x88baf0 exposed, visibility=QWindow::Windowed, flags=QFlags<Qt::WindowType>(Window), title="Hello World", geometry=3098,174 640x480)
      qt.scenegraph.renderloop: - animations done..
      qt.scenegraph.time.renderloop: Frame prepared with 'threaded' renderloop, polish=0, lock=0, blockedForSync=11, animations=0 - (on Gui thread) QQuickWindowQmlImpl(0x88baf0 exposed, visibility=QWindow::Windowed, flags=QFlags<Qt::WindowType>(Window), title="Hello World", geometry=3098,174 640x480)
      qt.scenegraph.renderloop: - polish and sync update request
      qt.scenegraph.renderloop: polishAndSync (normal) QQuickWindowQmlImpl(0x88baf0 exposed, visibility=QWindow::Windowed, flags=QFlags<Qt::WindowType>(Window), title="Hello World", geometry=3098,174 640x480)
      qt.scenegraph.renderloop: - lock for sync
      qt.scenegraph.renderloop: - wait for sync
      qt.scenegraph.time.renderer: time in renderer: total=16ms, preprocess=0, updates=0, binding=0, rendering=16
      qt.scenegraph.renderloop: (RT) - rendering done
      qt.scenegraph.time.renderloop: Frame rendered with 'threaded' renderloop in 16ms, sync=0, render=16, swap=0 - (on render thread)
      qt.scenegraph.renderloop: (RT) --- begin processEvents()
      qt.scenegraph.renderloop: (RT) WM_RequestSync
      qt.scenegraph.renderloop: (RT) --- done processEvents()
      qt.scenegraph.renderloop: (RT) syncAndRender()
      qt.scenegraph.renderloop: (RT) - updatePending, doing sync
      qt.scenegraph.renderloop: (RT) sync()
      qt.quick.dirty: QQuickWindowPrivate::updateDirtyNodes():
      qt.quick.dirty: QSGNode: QQuickRectangle(0xace2b0, parent=0xac0810, geometry=50.4871,6 28x28) Position
      qt.scenegraph.renderloop: (RT) sceneGraphChanged

      When oepngl and vullkan are back-end rendering, it is recommended to implement the damage tracking function in the platform abstraction.

       

       

      Attachments

        Issue Links

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

          Activity

            People

              qt.team.graphics.and.multimedia Qt Graphics Team
              yaobingxiao Michael Aaron
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes