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

Graphics performance of listview and gridview is bad

    XMLWordPrintable

Details

    Description

      If transparent GridView has a big enough background image, scrolling is not smooth. Same happens for ListView even without transparency if there is a big image visible in the UI. This can be reproduced at least on apalis-imx6 and rasperry pi 3 boards.

      GridView sample:

      import QtQuick 2.0
      import QtQuick.Window 2.2
      
      Window {
          visible: true
          Image {
              // Poor performance on 1920x1080 screen:
              //width: parent.width
              //height: parent.height
              // OK performance:
              width: 1024
              height: 512
              source: "backImg.jpg"
              cache: true
              smooth: false
          }
      
          GridView {
              id: grid
              anchors.fill: parent
      
              cellWidth: width / 3
              cellHeight: cellWidth
              model: 100;
              delegate: Rectangle {
                  height: grid.cellHeight
                  width: grid.cellWidth
                  color: Qt.rgba(Math.random(), Math.random(), Math.random(), 1)
                  opacity: 0.5
              }
          }
      }
      

       ListView sample:

      import QtQuick 2.8
      import QtQuick.Window 2.2
      import QtQuick.Controls 2.1
      
      Window {
          visible: true
          id: root
          Image {
              id: backImage
              source: "preview_l.jpg"
              anchors.fill: parent
              fillMode: Image.PreserveAspectCrop
          }
      
          ListView{
              id: listView
              model: 100
              height: 200
              width: root.width
              orientation: ListView.Horizontal
              delegate: Rectangle {
                  height: 200
                  width: 200
                  color: Qt.rgba(Math.random(), Math.random(), Math.random(), 1)
              }
          }
          Button {
              text: backImage.visible ? "Hide" : "Show"
              anchors.top: listView.bottom
              onClicked: {
                  backImage.visible = !backImage.visible
              }
          }
      }
      

      Attachments

        1. vprofiler_1573_1.vpd
          289 kB
        2. vivante_analyzer.png
          vivante_analyzer.png
          167 kB
        3. listviewtest.zip
          29 kB
        4. gridviewtest.zip
          125 kB
        5. gl_function_calls.png
          gl_function_calls.png
          79 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            srutledg Shawn Rutledge
            sanurmen Sami Nurmenniemi
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes