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

SwipeView keeps painting adjacent content items

XMLWordPrintable

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

      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

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

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

              Created:
              Updated:

                There are no open Gerrit changes