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

Wayland: Optimize scrolling

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • None
    • QPA: Wayland
    • None
    • Linux/Wayland
    • 6f25f703f (dev)

      Currently we have slower path to scroll the image:

      • copy entire dirty region from front buffer to back buffer to ensure both buffers have the same content
      • scroll the image within back buffer (another copy)
      • begin paint (we already have a valid back buffer after scrolling - we don't copy anything in this case)
      • paint new content
      • end paint and flush

      Optimized path to scroll the image:

      • gather scrolling deltas and regions which are before begin paint
      • in begin paint, prepare new back buffer, but don't copy anything that will be scrolled or painted
      • finalize scroll - use the front buffer image to scroll the data to the back buffer (we haven't copied them yet, we'll copy them with applied scrolling deltas)
      • paint new content
      • end paint and flush

      This path prevents redundant copy from front buffer to back buffer the content which will be scrolled and painted (we'll override these pixels anyway).

      Simple benchmark application: wlscroll.tar.gz

      Results on KWin 6.4, 3840x2160, 200% scale, full screen, dual channel DDR5, AMD Ryzen (fixed clock):

      Mode Draw QPixmap Draw gradient
      Scroll OFF (repaint) ~370 FPS ~71 FPS
      SCROLL ON (dev branch) ~240 FPS ~240 FPS
      SCROLL ON (optimized) ~620 FPS ~580 FPS
      SCROLL ON (XWayland) ~3750 FPS ~2500 FPS

      Related task for XCB backend scrolling optimization: QTBUG-64414

        1. wlscroll.tar.gz
          2 kB
          Błażej Szczygieł
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.graphics.and.multimedia Qt Graphics Team
            zaps166 Błażej Szczygieł
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes