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

SwipeView keeps painting adjacent content items

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • Quick: Controls 2
    •  Kubuntu 19.10, debug build of Qt 5.13 latest
    • Linux/X11

    Description

      While tuning painting performance of an application using Renderdoc, I noticed a SwipeView that keeps painting at least two of its three possible content items. Ideally it would only paint the two currently visible items while swiping between those two, and only the currently visible item while stationary on that item. The best that is currently possible is painting three out of arbitrarily many items, as explained in the documentation after " The following example presents how to use LoaderĀ  to keep a maximum of three pages simultaneously instantiated".

      In fact, unloading items as suggested in the documentation is unnecessary as far as painting is concerned. In the worst case, SlideView paints the current item plus the one or two adjacent items (one when current is beginning or end).

      Attached is a small example. Just count and inspect the glDrawElements() calls in Renderdoc or a similar tool

      Attachments

        1. listview-overpaint.qml
          0.9 kB
          Andreas Hartmetz
        2. swipeview-overpaint.qml
          2 kB
          Andreas Hartmetz
        3. swipeview-overpaint-moving.qml
          3 kB
          Andreas Hartmetz
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            ahartmetz Andreas Hartmetz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes